by eropple · 12y ago · 0 comments
>I'm more interested in how those layers could be used with my own engine than theirs itself.
You and me both. Also looking at Proton [1] and Allegro [2] for similar reasons. And just came across a Blackberry-backed engine [3] which looks interesting (and also Lua-driven).
I actually have my OWN game engine (based on LuaJIT, thank you ;) that already targets Windows, Android, and iOS, but I'd like to rip out the platform layer and replace it with something that someone else is maintaining. I mean, it works now, but leveraging open source and other developers' efforts would be much better.
I've considered just using SDL 2.0 and calling it good, but I'm tempted to pick up some of the higher-level functionality some of these other engines offer.
None offer all the features I want, unfortunately. One of the big features they mostly miss is really good script/C++ cross-functionality. Aside from that, there are typically one or two other things that make me want to avoid them.
[1] http://www.rtsoft.com/wiki/doku.php?id=proton
http://www.infoq.com/news/2013/05/lua-vm-javascript
https://github.com/kripken/emscripten/issues/457
https://github.com/kripken/emscripten/wiki/Roadmap
Is your engine open source? I anticipate a JS backend to LuaJIT in the not-too-far future.
My engine had a chance to rot for a while; I'll be upgrading to GLES2 as soon as I'm developing on it again. (Pesky clients paying me to do other work has been slowing down development on my game and engine.)
That is one of my hesitations about Proton; they're still on GLES1.
>This would enable your engine to target HTML5 robustly with Emscripten via lua and sdl.
Not a bad thought. Hmm. Not a bad thought at all. In fact, part of the game I've been trying to work on involves an HTML component, and I've been planning to do it in JavaScript, but if I could do it in my own engine...wow. Thanks for rebooting my brain there. :)
>Is your engine open source?
Not yet. There are a (very few) parts that I don't want to publish, for reasons from "they're broken and I want to fix them first" to "this class prevents pirates from copying games in a novel way, and publishing it would just make it easier for them to pirate my games."
http://www.jwz.org/blog/2012/06/i-have-ported-xscreensaver-t...
https://code.google.com/p/gles2-bc/
http://www.gamasutra.com/view/news/177233/Indepth_Bringing_R...
Depending on how difficult it is. Might be an interesting way to bring codebases that target OpenGL ES 1 onto WebGL
I use AngelScript, because the C++ interop is about as good as it gets. Chaiscript isn't bad, but its lack of coherent community scared me off.
I'm using Dub for my C++/Lua bindings, which provides exceptional C++ interop. Dub also is easily modified, and with my modifications I can have C++ objects referenced by smart pointers that are wrapped in Lua objects, and those objects can have additional Lua "tags" added to them that persist for the lifespan of the C++ object (even if all Lua instances of the object are collected).
You just can't beat LuaJIT for speed; speed isn't that important for scripting on desktops, but can be relevant on mobile. And it's hard to beat Lua syntax to enable non-programmer scripting options.
Have you seen the LuaJIT FFI by the way? Very similar to what AngelScript offers. But it's also JIT-compiled by the best dynamic JIT compiler in existence. :)
I'm actually rather disappointed almost nobody is using it. I hope it doesn't get canned.
I actually have my OWN game engine (based on LuaJIT, thank you ;)
This comment would be better if it wasn't snubbing everyone who dared try to shake up the status quo of programming languages. People two hundred years from now won't be using LuaJIT. Therefore why wait two hundred years to invent the future? We could have it within our lifetime, if we remain supportive.
But LuaJIT is the future of scripting. It's truly a stunning achievement.
That being said, the "better" things I'm thinking about could be added to LuaJIT just as well as they could be to other scripting languages. For example, the LuaJIT compiler could try its best to auto-vectorize (really really hard) or could leverage the developer with SIMD-like vector operations that would adapt to whatever SSE/NEON/...-like instructions the target platform has. GCC/Clang already dod this to some extent with their vector extensions. Although for many instructions you still need to use specific intrinsics which are not cross-architecture compatible of course. The ones that are:
- add/subtract - mul/divide - shuffle
Which are already pretty important. One could argue over implementing some "generic" intrinsics and possibly emulating them on platforms that don't have it. But then one could be left scratching one's head when suddenly everything gets slow.... So I can understand the gcc/clang devs.
But there are a lot of people doing that right now. I didn't get a vibe from this one that it could do anything interesting that you can't already do in either LuaJIT or Julia. Other innovative languages I've been tracking include Go, D, Nimrod and Dart.
The world is improved by innovations; it's not improved by script language proliferation, or "me too!" projects. Lua in particular is a very well documented language, and is the de facto standard in video game development. I think the bar has to be pretty high to justify creating a new language.
Yes it would be more fun than figuring out how to get 3d matrices to work and be fast in LuaJIT, if you don't already know how the FFI works. But there's a LOT of value in using LuaJIT, and unless you're bringing something else of value to the table, no, I don't think it's worthwhile backing Yet Another Language.
I know of at least a half dozen other engine-specific scripting languages, and I would wager NONE of them are as robust as Lua, as well known as Lua, as well defined as Lua, or even as well designed as Lua. The value of having a shared language does outweigh every new programmer's desire to write their own language.