| OK, just going to answer a few points, to try to wrap this up. :) >I'd argue it's not a silver bullet as a primary language to write an entire game / engine in w/ more discussion continuing along those lines; there seems to be flexibility gained and lost. As a scripting engine that's one thing, but not a catch all for everything. I write a lot of the core "engine" in C++ for speed and lack of garbage creation. The game I've got on the Android market right now has about 3149 lines of C++ code specific to the game (not counting 7400 lines of auto-generated Lua bindings), but 10k lines of Lua code. Most of the game code is in Lua; is that scripting? The engine itself has about 10k lines of C++ code, and very little Lua. I want the engine to be as fast as possible, so it's hard for me to imagine doing it in a language that isn't C or C++. >>>putting up native dialogs, etc. that will be non-native everywhere.
>Why would you do this if you are creating an OpenGL/ES cross-platform game? Use a GL based GUI that will be cross-platform! Geting UI right is really, really hard. For the primary game UI, and dialogs with buttons, sure, all of it happens in GL. But if I want a list dialog, or a grid view, or a WebKit view, I'm not going to want to do my own halfway implementation -- I'm going to want a dialog with a native feel. There's no game anywhere that I've used that really gets anything as simple as a keyboard entry field completely right, if it doesn't use the native UI; there are some things better left to the UI experts. A good friend of mine is a big Scala fan, but I haven't really explored it as an option. The thing that kills Scala for me (without knowing anything else about it) is that most platforms I write for don't already have a guaranteed JVM -- iPhone and Windows being big ones. I mean, sure you almost always have SOME JVM on Windows, but I'd likely want to be shipping a specific JVM. And that means adding multiple megabytes onto my package size. You've got 20Mb on iPhone if you want to be able to download over the air. Adding 5Mb to support a language...isn't an option. LuaJIT takes up about 50k. With all its libraries. And performs on par with Scala. Which is a huge win for me. How much overhead does Scala add to an app on Android? I bet it's more than that, even with the guaranteed JVM (well, DVM) preinstalled. |
And for the wrap up wrap up ;P
> I write a lot of the core "engine" in C++ for speed and lack of garbage creation.
Most definitely. That was all I was getting at is that the core engine should be as fast as possible.
What game on Android Market BTW? Would be glad to check it out and support yah! :)
> Geting UI right is really, really hard... But if I want a list dialog, or a grid view...
Indeed.. UI is hard though I'd say list dialogs and grid view is still GL possible without too much difficulty given various tool kits. Yes a WebKit view is difficult to pull off cross-platform presently. There are options like Awesomium though I've yet to see it used on a mobile platform, however I'm sure something will come up soon.
Yes.. a keyboard entry field depending w/ a GL UI in conjunction with say popping up the default native UI keyboard for touch only devices is something that would need to be fine tuned.
I plan to tackle general GL UI matters at a future point to offer a nicely integrated set of optional components. You are right though it's generally difficult.
For aspects in TyphonRT that require local / native peers the main application container is loaded declaratively with a cross-platform interface component backed by the proper native implementation, so from the devs perspective they can just request the common interface and the platform specific aspects are active behind the scene.
>... most platforms I write for don't already have a guaranteed JVM
Yes, for a desktop release it might be pertinent to distribute a private stripped down JVM. For mobile.. Well.. It's not easily feasible or likely allowed if I recall in the TOS to have a JVM on the iPhone. Cross-compilation is the likely way to go if / when TyphonRT supports iOS.
>How much overhead does Scala add to an app on Android?
Yeah you got me there.. ;) If one uses the Scala standard library that jar file is ~8MB. Whether that can be split up and paired down I'm not sure yet. I'm close to starting on Scala integration (mind you this is optional w/ TyphonRT).
There are also platform aspects of TyphonRT that will reduce overhead for multiple apps installed, but this gets into a bit more conversation here than necessary; essentially though side-loading shared components installed by other apps thus minimizing each app requiring a large download.
So yeah, some work and experimentation ahead. I'll definitely be working on a minimum profile (if possible) for Scala integration.