Analyzing cross-platform engines for mobile phones

Quest for Mobile 3D Engine

When we started development on our first title, the first thing as usual was to find our needs and select an engine in accordance to them. After considerable debate, we knew what we really needed was a cross-platform engine for mobile phones which should have solid 3D apis and support as many platforms as possible. This hunt coupled with our naivety as it was our first title, led to us the EdgeLib Engine. Our experiences with it was scarring to say the least, but definitely a huge learning experience which we will leave at that for a post in the future. This made us hunt for a new stronger solution, that we can call our base, our motherland, and that is exactly what we found with Airplay SDK now called Marmalade.

Marmalade is what we call a truly cross-platform engine. Supporting over 6 different os’s, and truly abstracting all api from it is a very big deal, and providing extensive support and a huge array of helping tools is unseen for an engine that supports indie developers. Instead of going into all of its features i will just point out at a few that really caught my eye:

Memory Management

Marmalade provides a very nice solution to manage memory. Instead of giving fast alloc calls and calling it a day, marmalade has a system of buckets. You allocate your data inside buckets, and specify the size of each bucket in a configuration file. This way you know exactly how much memory you are consuming in which area. Secondly, with such a system it becomes easier for marmalade to manage memory, so memory leaks are immediately detected. Add to this system an internal system of tracing call-stacks and you get a system which points to the exact code block that’s causing the leak.

Scalable 3D pipeline

Airplay does not only abstract out basic OS API calls from all platforms, but, due to the largely varying hardware of mobile phones, it also has a scalable 3D pipeline. Support between GLES 2 and GLES 1.0-1.1 in itself is a huge feature and couple that with a low level fallback software renderer and you get a game that would run on any phone in the market, may it have a GPU or not.

The Simulator

Airplay has a solid simulator for emulating the game on the PC/Mac . This simulator extends its features way over what any other phone vendor has provided yet, with features like accelerometer simulation, changing graphics drivers, compass simulation and some very detailed metric of your game. It allows you to configure the simulator in real-time to go as close as possible to the real device. Other than that the metrics the simulator provides are a very handy tool to optimize, showing all API calls made and the number of times they were made. It also tells exact memory usage of each bucket, which is again useful in optimizing your game for low memory use.

The Extra Tools

Airplay provides some very neat external tools, which are integrated which the library very well. Airplay has a system of resource groups and build styles, which allows you to sort out your games data in nice little resource files with which you can easily create multiple editions of your game for different phones and handle all the assests easily using these files. The best part, we just need to specify the compression format in the resource file for each texture, and airplay automatically compresses them on first build, and loads them in-game from the compressed file. This removes a lot of headache like manually converting each texture for different compression techniques for different GPUs. Airplay also provides derbh archive module for game data compression, which coupled with texture compression can reduce your games data by 60-70%!

 

The feature set never ends for this beast of an engine. Of course it has its fall at times too but they are always very minor compared to the huge list of features it give us.

 

[highlight type=”one”]We’ll have to say Marmalade is one of the best mobile 3D Engine we have used for Mobile Game Development.[/highlight]

 

4 Comments

Leave a Reply