Which Platform to Choose For Your Next Mobile Game?

In this article, we explore several game engines and frameworks, highlighting some of the key advantages each of them offers. After reading this article, you will have several options to choose from to make the next big hit. Note that we only focus on the 2D aspects of these platforms. Let's get started.

1. Cocos2D

Cocos2d is a free, open-source framework, compatible with both Swift and Objective-C. It has support for iOS and OS X, and it also supports Android through the SpriteBuilder Android plugin provided your code is written in Objective-C. Swift support for Android is in development.

Projects in Cocos2d are created through SpriteBuilder, a graphical design environment that you can use to quickly prototype and build games. You are not required to use SpriteBuilder to build your game, however, project creation must be done through SpriteBuilder.

Scene management is done through the CCDirector class, which can utilize numerous Transitions with the CCTransition class. It offers animations through the CCAnimation class and actions, such as move, scale, and rotate, with its CCAction class. Cocos2d has support for particle systems with the CCParticleSystem class and has support for tile maps with the CCTiledMap class.

Cocos2d also uses OpenGL as its rendering engine. It uses Chipmunk as its physics engine. If you enjoy Objective-C or Swift, and you want to develop for multiple platforms (iOS and Android), then Cocos2d is a framework worth considering.

2. Cocos2d-x

Cocos2d-x is a C++ port of Cocos2d that can compile to many other platforms. Cocos2d-x can compile to iOS, Android, Windows Phone, OS X, Windows, and Linux.

Cocos2d-x does not come with SpriteBuilder. However, it does have some interesting projects, such as Cocos Creator, which provides the framework, scene editing, debugging, game preview, and publishing to multiple platforms.

3. Unity

Unity is a mobile game engine that supports C# and UnityScript, a language designed specifically for Unity and modeled after JavaScript. It is cross-platform and can deploy to many platforms, including PlayStation and Xbox. There is a free edition available and a professional edition offering more features. More information is available on the Unity website.

There is a built-in sprite editor in which you can visually slice your images and an animator window that allows you to lay out and organize animations and add key frame animations to sprites. It is also possible to visually design particle systems within the Unity editor.

Unity uses its own proprietary physics engine. Unity has a built-in camera, which makes navigating in the game world simple. You can visually lay out scenes and Unity has a user interface system with components, such as buttons, sliders, and menus. There is also support for sprite packing within the Unity editor.

Unity is a powerhouse when it comes to game engines. If you need a cross-platform solution that has the ability to a wide range of devices and you prefer to program in either C# or UnityScript, then Unity is a good choice. One other nice thing about Unity is the asset store in which you can find or purchase assets you can use in your games.

4. SpriteKit

SpriteKit is Apple's proprietary 2D game development framework. It is only available on iOS and OS X. SpriteKit supports both Swift and Objective-C, a combination of the two.

Scene management is done with the SKView class and there is a wide variety of transitions with the SKTransition class. At the heart of SpriteKit are actions, instance of the SKAction class, which are used to move, rotate, and scale games objects. Actions can also be used to play sounds and execute custom code.

SpriteKit has a scene editor in which you can visually design the levels of your game. Also available is a particle editor in which you can visually design particle systems. A number of predesigned particle systems are available, such as fire and rain.

SpriteKit uses Box2D for its physics engine. SpriteKit provides a friendly wrapper around Box2D, which makes it very easy to use. SpriteKit also has a built-in camera through the SKCameraNode class, which makes navigating around the game world easy.

If you are tied to the Apple ecosystem, then SpriteKit is a very good choice.

5. Titanium

Titanium is a framework that uses JavaScript as its programming language. While more traditionally used to build applications instead of games, it can be a viable game development platform. It is free to use during development. If you want to publish your game, then you need a license.

Titanium supports many native controls from iOS and Android. This makes it easy to animate views and images. I have built a Blackjack game, complete with animations and a nice card flipping effect using Titanium.

One of the nice things about Titanium is the market place for downloading custom modules. There is, for example, a Box2D module that you can plug into your app. If you do not need the complexity of Box2D, then using a simple bounding box collision system can work just as fine.

While Titanium would not be ideal for games with a lot of moving parts and particle explosions, using it for simple card games, trivia games, and games with a limited number of moving objects is more than a viable option.

6. PhoneGap

PhoneGap allows you to take your existing HTML, CSS, and JavaScript skills and package them up as a mobile app. The way it works is by embedding a web view in the app and loading your assets into that web view. This means that you can use the Canvas API to create games.

PhoneGap allows access to native APIs, such as the device's camera, microphone, and, most importantly for game development, the accelerometer.

At its core, PhoneGap is pretty straightforward. It takes an HTML-driven app and packages it up as a mobile application using a web view.

We will take a look at two other JavaScript libraries that you can use to create a Canvas/WebGL game, Phaser and CreateJS.

7. Phaser

Phaser is an open-source JavaScript framework for writing 2D games. It uses Canvas or WebGL if available.

Phaser has support for animations, particles, and tweens to move, scale, and rotate sprites. It has built-in support for tile maps and uses three different physics engines, depending on your needs. It also has a built-in camera, which makes it simple to navigate your game world.

There are some plugins available for Phaser, including a particle system designer and a Box2D plugin. If JavaScript is your language of choice, then Phaser, in combination with PhoneGap, could be a good choice.

8. CreateJS

EaselJS is a library based on the Canvas API and it can use WebGL if available. TweenJS is focused on tweening elements while SoundJS is aimed at audio playback. Last but not least, PreloadJS helps preload assets.

EaselJS has support for sprite sheets and filters that you can place on your elements. There is also a Shape class should you need to do vector drawing. Moving, scaling, and rotating is done by incorporating the TweenJS library into your game.

While CreateJS doesn't have many APIs that are tailored to game development, it is written in JavaScript so you can incorporate any extra JavaScript libraries you want, such as a JavaScript port of Box2D. One library I had success using in the past is a collision detection library for EaselJS.

I have written a couple of articles on CreateJS on Envato Tuts+. If you are looking for a detailed introduction to these libraries, then you may find these interesting:

9. Unreal Engine

Unreal Engine is a game engine that uses C++ as its programming language. It is free to use with limits. For more details, visit the Unreal Engine website. You can deploy your game to iOS and Android.

Unreal Engine includes a too, Blueprint Editor, that allows you to visually script your applications without the need for programming. The editor allows you to design game levels, add physics simulation, user interface, animations, visual effects, and more, in a visual manner.

10. Corona SDK

The Corona SDK is a software development kit that uses Lua as its scripting language. It is available on Windows and OS X. You can develop your games and apps for free with the Corona SDK, however, Perk, the company that acquired Corona Labs, offers an enterprise model that gives access to native libraries/APIs and a few other features. Visit their website for more information about pricing.

The Corona SDK exports to iOS, Android, Kindle, and Windows Phone 8. Windows and OS X exports are in private beta and will be coming soon.

Corona Labs offers some other attractive features, such as Corona Editor, a Sublime Text plugin that includes a debugger, code completion, and a few other nice options. Composer GUI, available on OS X, gives you a graphical environment in which you can design your game's levels and see how the objects interact with each other using Corona's physics engine.

The Corona SDK uses OpenGL as its rendering engine and Box2D for physics. Its physics engine provides a wrapper around Box2D, which makes its easier to use. The Corona SDK includes over a thousand APIs you can use to build your games.

Unfortunately, the Corona SDK doesn't have the option to build sprite atlases and using complex shapes for physics collision detection can be difficult. However, there are some great third party applications that can ease this pain, such as Texture Packer and Physics Editor.

Overall, the Corona SDK is a great SDK to explore if you are looking for a cross-platform solution and want the ease of the Lua scripting language.

11. Gideros

Gideros, like Corona, uses Lua as its scripting language. Gideros is free and open-source, and it can compile to iOS, Android, Windows Phone, OS X, Windows, and Windows RT.

While Lua is not an object-oriented programming language with a class-based system, Gideros provides a class-based API, allowing developers to write clean and reusable code.

Gideros has a scene manager with all kinds of transitions, a MovieClip class for animations, and provides tweening through its GTween library, which allows you to move, scale, rotate entities and more.

Gideros, like Corona, uses Box2D for physics, although the Box2D API of Gideros is a little more close to the original Box2D API and therefore slightly more difficult to use.

It provides some extra tools like a texture packer tool and a font creator, which can be found in the installation's directory. Gideros allows you do instant testing of your projects on your mobile device through a Wi-Fi connection.

As with Corona, this is a great platform if you are looking for cross-platform development with the ease of the Lua programming language.

12. AndEngine

AndEngine is a mobile development framework for Android. It is free and open-source. However, as the name hints at, it is only for Android. AndEngine, like many other mobile platforms, uses OpenGL as its rendering engine and it uses Box2D as its physics engine through an extension.

There is no dedicated scene management in AndEngine, but you can find plenty of example on how to build a simple scene manager. If you are looking to only release an Android app and Java is your language of choice, then this framework is a good option.

13. libGDX

libGDX is another Java game development framework. It is cross-platform and can compile to Windows, OS X, Linux, Android, iOS, Blackberry, and HTML5. libGDX also uses OpenGL as its rendering engine and it leverages Box2D for simulating physics.

libGDX has a Camera class, an Action class to move, scale, and rotate objects, and aParticleEmitter class for displaying particles. It has support for tile maps via theTiledMap class, which can be used with the Tiled editor.

If Java is your preferred language and you are looking to create a cross-platform game, then libGDX is a good framework to look into.

Conclusion

In this article, we went over several game development frameworks and engines. You should now have a better idea which solutions best fit your needs and that of your next game. Thanks for reading and I hope you found the article useful.