The Future…

… of this blog is something i’ve been thinking a bit about lately. As i stated earlier i intend to open source the game programming framework i’ve written. This framework allows me to quickly prototype things on my desktop PC without using the emulator or device. To run a project on an Android device or an emulator i need only a single Activity. Here’s the complete code of Newton on Android:

That’s really it. The rest is implemented in a normal Java project that references the framework project. In the Java project of newton i have another class similar to the above which allows starting Newton on the Desktop:

And that’s it again. This is possible by abstracting input, sound and graphics for both plattforms. On Android i hook up listeners to a GLSurfaceView, setup callbacks for the sensors like the accelerometer and do all audio via MediaPlayer and AudioTrack. On the PC/Mac i use Jogl and Java Sound. This application specifics are encapsulated via an interface for which 2 implementations exist. This interface provides methods to create Meshes, Textures, Sound, Music as well as resource managment functions that allow me to transparently work either with assets or files on a file system.

The same is true for native code! The framework project is also a C++ project and produces a single shared library for all the native code that is used in the framework. At the moment only the MP3 decoder is done in native code but i plan on including other things like billboarding of massive arrays of particles and some audio analysis related things as native code.

This is the second iteration of the framework and i started reworking the GUI module. The old one didn’t support animated gui elements so i try to incorporate that in the new one. This will include transitions like fade ins and fade outs. I also rework the skinning a bit to allow 9-patch buttons. User input is limited to non-text input at the moment. If you want to get text from the user a plattform specific dialog box is presented. I’m not sure wheter i will change that to something that fits better with the overall look of a game.

So that’s my plan for the future. I will upload the current state of the framework to google code under the LGPL license later this day. All the upcoming articles will use this framework to reduce code bloat in the postings much like i did with the audio analysis tutorial earlier. The native code shared libraries will be prebuild so you don’t have to have cdt and mingw installed on Winblows (on lunix you usually will have gcc installed). I can only provide 32-bit shared libraries on Winblows as there’s only an experimental 64-bit mingw version which i don’t dare to use. It’s not the intention of the framework to be used for creating desktop games anyway 🙂

One thought on “The Future…

Leave a Reply

Your email address will not be published.