So like we said in the previous lesson, we would be building our game on top a game framework. A game framework refers to a library with built-in interface for handling lots of functionality that are common to the games development ecosystem. No matter what game you build, you are most likely to come across some common themes and issues like:
- Input handling(through keyboard, touch pad, accelerometer or custom input devices)
- Handling file I/O (File Input – to say read image and other assets file while Files output to say store user preferences or store high scores)
- Playing audio
- Rendering graphics
- Interacting with network (for network game or simply to post auto brags to Facebook wall)
The programming language in which you write your game provides some level of abstraction for these tasks. A game framework takes this abstraction to the next level by further creating methods and interfaces which make the process of game building more easier and faster. This ensures that you can concentrate on building the actual mechanics for your game without having to worry about handling these low level details.
There are many good game frameworks targeted at Android Indie game developers. In fact at some point every game developer worth his salt writes some reusable code and builds a personal framework of sort). However the following game framework deserve a special mention.
This framework produces a cross platform code for simultaneous deployment on windows, linux, android devices and google web kit. (
Reportedly the engine will very soon support iOS & MAC OSX as well! The engine now officially supports iOS and MacOs).
Think about it – you write one game and distribute it on Android, iOS, Desktop and Web without any hassles of porting.
Other great features :
1) Good documentation
2) Vibrant,active and a supportive community
3) Box2D support for physics (one of the most powerful features of this framework)
4) Easy Integration with many 3rd party libraries
5) TMX tilemap support (to build games that use tiles)
jPCT 3D Framework
Unity 3D is a powerful multi platform game engine which boasts of some impressive game portfolio. However Unity is free only to the extent of its base application. In that sense this is not truly free.If however you are a high budget, mega release company – Unity is just the right choice.
P.S: There are literally hundreds of other open source game frameworks.You can check out a list of other open source game frameworks here.
You can explore other commercial/ semi-commercial game engine options here.
However not every one of them is made for android game development. Most of the mature game frameworks are implemented in C++. Since we wish to design the game for Android in Java language( the de-facto supported language in Android) a lot of them do not fit into our requirement. We are therefore restricted to using engines which have a Java port.
Game Engine versus Game Framework
While many frameworks like AndEngine are called game engine, there is a difference between ‘frameworks’ and ‘engine’.A game engine normally comes equipped with with lots of tools, such as workflow manager, level editor and others while a Framework is mostly code API which at its best comes with limited sets of tools.
This limitation of frameworks is however an advantage in that it lets the developer define highly custom workflow for each project without having to be tied down by the workflow methodology of any particular game engine.