Which sounds impressive, although I found out that the Flash platform is called a "red-headed stepchild", which implies that it is not well supported.
But generally speaking, the website was minimal, the doc non-existent, and the forum rather quite. I followed a link suggesting I checked out the PlayN questions on Stack-Overflow, and one of the top question was: "PlayN vs libGDX", and all answers said the same thing: use libGDX instead of PlayN. So I went to look at libGDX, and found the website much more impressive and professional, including a slideshow of multiple commercial games made with it.
LibGDX supports the following platforms:
So, no Flash. But even PlayN doesn't really seem to like Flash. And before I start considering Flash, I'd probably go for JavaFX (btw, they had a good demo site too, but it seems Oracle killed it). JavaFX moving forward, and even have plan for 3D. Since JavaFX is now bundled with Java, that means it is available everywhere where Java is, and your app can start faster since part of the engine code is already installed.
But back to LibGDX.They, like PlayN, offer a game engine API. What this gives you, is that it accelerates creating games, compared to having to integrate yourself OpenGL, sounds, 3D object format loaders, physics engines, ... All the important parts are already there, and welded together. And libGDX has already support for 3D, although currently limited. But there are multiple other Java game engines out there. In fact I was planning to use jMonkeyEngine myself, since it is specialized for 3D games (but also support Android). So what does libGDX do? If you do a desktop game (applet also falls in this category, I think), then it just runs you Java code, as we are used to. If you do an Android game, it must translate your Java classes to Android, but since this seems to be how most/all development is done for Android, there are no big surprises there. There are a few quirks, which I'll explain later. For iOS, I haven't fully followed, but the steps are approximately that your Java classes are turned into a .NET app, and then that .NET app is run in a .NET emulator on iOS. This sounds terrible, IMO, and I can't expect good reliability or performance, considering the steps involved. Also, to develop for iOS, I would need to buy a Mac, buy an iPhone, and then pay 400USD for some commercial IDE/platform license, without which it doesn't seem possible to deploy to iOS, at least not with this stack. Finally, for HTML5, they use GWT. I think PlayN uses GWT too for HTML5.
So, since the desktop side of things is business-as-usual, the Apple side of things look grim, and too expensive, this leaves us with two interesting choices: Android and HTML5.
Android seems to be an obvious choice for Java devs, and has few real limitations. You can use most of the normal JDK. This include threads, reflection, ... But there are a few limitations. You need a special version of Googel Guice, if you want that, and dynamic class loading is a bit difficult, and there is no class unloading, and runtime bytecode generation was until recently impossible. But now there are alternatives. Someone ported ASM to Android. But since Androind has it's own instruction set, the would be somewhat involved, even for an ASM pro. The other, but much less efficient, way of doing runtime bytecode generation, works as follow: create your JVM bytecode as usual in RAM, save it to a local storage, use some Android DEX program to translate the JVM bytecode to Android bytecode, and then load the Android bytecode. This works, but it's slow. My impression is that over time, most issues Java devs have with Android will be dealt with, making it the perfect mobile platform for Java devs. But the biggest limitation is most likely going to be the limited resources. You can't just allocate multiple GBs for your game, and Android OS is well-known for killing apps that consume too much resources. I've also seen people claiming it *randomly clears static variables (large arrays, ...)*, to save resources, but I'm not sure if I can believe that.
Compared to GWT, Android seems to be a paradise. GWT is at it's heart not much more then a Java-source-to-JavaScript translator. It's neither an API nor a framework. Here are the packages from the JRE that GWT supports:
This isn't much IMO. There are literally 100s of packages in the JRE. But for modeling data, and processing data, this is mostly what is needed. Be aware that not all classes from these packages are available, nor are all methods/fields of the available classes present in GWT.
Now for the more specific limitations:
On the plus side, there are many projects out there that partly solve those issues. I have seen the following:
The build-in support for dynamic class loading work as such: using some API method, you specify that this part of the code will only be "accessed later". And so GWT works out with actual part of those classes are not directly referenced from the booting class (entry-point), and saves them in a separate JS file, which is loaded later, on demand. This allows the fast start of large applications. But the real limitation, is that the whole application *must be compiled in one go* (and it is said to be pretty slow, as multiple implementations are generated for the different platforms and browsers). So you can't really split your application into several jars, that are build and deployed independently. But at the code level, you can split it in modules, and reuse the modules in multiple application, with the downside that each module is re-compiled for each application. I think that to do rally modular applications, you would have to do separate applications, and wrap them up together by a front-end application. They could talk to each other on the server side, but not sure how they would do that on the client side. But not all is bad; there are multiple good sides to GWT, compared to traditional AJAX development. GWT apps are very portable to all browsers, without much changes, if any, and are optimized at compile time. Still, I think they should work on getting real dynamic class loading, since this is basically possible in JavaScript.
Under GWT, an actor framework would not make much sense, since we are not multi-threaded, but I think that if we had an implementation that was made like an event-bus, using the same API, we could still reuse it in GWT, and that could allow reusing the same code on the client and server.
So far I haven't made up my mind, but I think I'll just try to do a desktop version first, and check out Android later. I doubt I'll try to do an iOS, Flash, or HTML5 version.
--
You received this message because you are subscribed to the Google Groups "AgileWikiDevelopers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to agilewikidevelo...@googlegroups.com.
To post to this group, send email to agilewiki...@googlegroups.com.
Visit this group at http://groups.google.com/group/agilewikidevelopers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
What would make it a lot more interesting would be if web workers could run on the graphics card. It is ideal for it, since web workers do not share memory.I had a lot of fun last night and this morning identifying implementation issues and solutions. But it is all academic at this point. :-)
--