Finding the right game engine can be the key to successfully building and deploying a game that becomes both popular and lucrative. But there are so many game engines out there vying for your attention. Clearly, some guidelines on the subject would be useful.

Ten years ago, it was okay to release your game on one platform at a time. Today, it’s more typical for a game to be released rapidly on multiple platforms. To that end, a cross-platform game engine offers some real advantages, and the options there are quite diverse and plentiful. Having recently released my own game template based on Cocos2D JS, I thought it would be interesting to compare some of the major game engines and see how they stack up against each other.

Life is like a ten speed bicycle. Most of us have gears we never use. — Charles M. Schulz

To prepare for this post, I wrote a complete Breakout clone in four of today’s top cross-platform game engines: Unity, Corona, Cocos2D JS and Appcelerator Titanium, and also using my game template, RapidGame Pro. The code can be found at the end of each section, so you can see for yourself. My observations on how they all compare should help you make a choice that may save you and your team weeks or months.

Unity

Unity is, in short, a closed-source, cross-platform game development application. You create your game by manipulating objects in 3D and attaching various components to them. Even 2D games must be manipulated in 3D. Scripts are written in C# (recommended), Boo or Unityscript (mistakenly called JavaScript) and attached to 3D objects as components.

Launching Unity for the first time, you may feel like the pilot of a 747 jet plane. There is much to learn before even the first switch can be flipped. First of all, there’s camera and lights. When trying to add a simple cube to the scene, it can get lost behind the camera or perhaps be invisible because there’s no light. In short, there is a learning curve. Prepare to spend approximately 8-12 hours getting familiar enough to develop your own game.

Unity was first released in 2005 and the interface hasn’t changed much since. To be frank, it feels like many of the repetitive tasks in day-to-day Unity game development are busy work. Adding audio sources, updating prefabs and importing assets are all examples of tasks that shouldn’t have to be done, or shouldn’t take so long. It would be nice if Unity had a modern makeover.

That said, once you’ve created a game with Unity, deployment is a cinch. With a couple of clicks, you can export your game to mobile, desktop and/or web (web currently requires the Unity player app to be installed). If you have the right license, you can even deploy to gaming consoles like Xbox, Playstation and Wii.

Unity gives away a functional free version. It doesn’t have all the features of the paid version, like video playback, but it does allow you to deploy your game to most platforms — with the Unity logo displayed — on launch. Check out the Unity Store for current pricing. At the time of this writing, Unity Pro is $1,500 or $75/mo, iOS Pro is an additional $1,500 or $75/mo, Android Pro is another $1,500 or $75/mo and a team license is $500 or $20/mo more. Add that all up and to deploy your own pro-grade games cross-platform you are looking at $4,500 or $225/mo (without the team license).

Approximate time to create a Breakout clone in Unity: 10-16 hours. (See source on GitHub)

Corona

Corona is a closed-source 2D game simulator and cloud-build application. Game code is written in Lua scripts and played back in the Corona simulator. Like Mystique from X-Men, the simulator can take on many skins, resolutions and ratios. When you’re ready to deploy, it builds your game in the cloud and delivers you an iOS or Android game client.

Ah, the sweet joy of developing games with Corona. Everything about the language is easy. Adding a physics body, for example, takes only one line of code. After a mere 2-4 hours of getting familiar with the platform you’ll be ready to develop games. And once you start it’s difficult to stop. The simulator is responsive, quick and polite about using your computer’s resources. With the simulator and your choice of code editor open side by side, you can save the Lua file and the simulator instantaneously reloads the game. It’s simply delightful to develop a game with such rapidity.

One shortcoming of Corona is its limited deployment options. Only mobile platforms like iOS, Android, Kindle and Nook are supported. Windows Phone is coming soon. Cloud-building can be a blessing or a curse, depending on how close you are to releasing your game. Imagine a day full of testing your game on the device, tweaking one little thing and waiting a few minutes to be able to see if it worked.

Like Unity, Corona is closed-source and proprietary. There’s no way to make a modification or fix a bug in the engine, and you cannot learn from its code.

Corona has a free starter version that allows deployment to all supported platforms with a limited feature set and a revenue limit of $100K. There are paid versions with more features and higher revenue limits. At the time of this writing they offer subscriptions of $192/yr, $588/yr, $948/yr and $2,388/yr.

Approximate time to create a Breakout clone in Corona: 8-10 hours. (See source on GitHub)

Cocos2D JS

Cocos2D JS is a cross-platform, open-source, free game development SDK. It is the newest — and perhaps sexiest — member of the Cocos2D family. Essentially it’s a combination of two popular open-source projects: Cocos2D X for mobile / desktop and Cocos2D HTML5 for web. While it is currently 2D / 2.5D, there are plans to add 3D support.

You write game code entirely in JavaScript. On native platforms like mobile and desktop, your game’s JavaScript is bound to native C++ objects, granting you maximum speed without having to write any native code. Web platforms run pure JavaScript and render using Canvas or WebGL, so no player applications need to be installed.

The easiest way to get started with Cocos2D JS game development is using the HTML5 platform. Open up a browser window and your favorite text or code editor, save your JavaScript, refresh the browser and voila. It’s a rapid way to develop. When you’re ready to test and deploy to native platforms, you’ll need Xcode, Visual Studio and/or Eclipse.

Cocos2D JS games can currently be deployed to iOS, Android, Blackberry, Windows Phone, Mac, Windows, Linux and HTML. With such wide deployment options, it’s easy to see why many game developers are choosing Cocos2D.

Perhaps the best part about Cocos2D JS is that it’s 100% open-source and liberally MIT licensed. You can learn a lot from reading the code and if you need to fix a bug or modify / optimize a certain process, you can do so easily.

As with many open-source projects, one gotcha is that the online documentation, despite being steadily improved, could be better.

Approximate time to create a Breakout clone with Cocos2D JS: 9-12 hours. (See source on GitHub)

Appcelerator Titanium

Titanium is a cross-platform, open-source app development kit and Eclipse-based IDE. Apps are written in JavaScript and run natively, not just in a WebView. With Titanium Studio it’s possible to develop, test and deploy to mobile and web platforms.

For 2D game development, there’s the Platino Game Engine, an open-source — but not free — SDK that can be added to your Titanium stack. Getting acquainted with Titanium (more specifically Platino) is not as easy as it could be. The documentation has holes. For example, the crucial .center sprite property is left undocumented. Moreover, the physics engine is cumbersome and archaic. You have to synchronize all physics bodies and sprites manually using a very non-JavaScript, C-like API.

On the bright side, one nice thing about Titanium development is that the SDK is prebuilt. You can run your game on a simulator or device with very short build times.

Titanium apps can be deployed to iOS, Android, Blackberry and HTML5 for free. Lanica’s Platino Engine currently costs $149/yr for a subscription and other tools, like Platino IAP at $72/yr, are available on a subscription basis as well.

Approximate time to create a Breakout clone with Titanium and Platino: 12-16 hours. (See source on GitHub)

RapidGame Pro

I built RapidGame Pro, an open-core game (dual MIT licensed) template based on Cocos2D JS, to make game development using open source more rapid. It achieves this in a few ways:

  1. By providing a project creator tool and game templates that make starting a game with scenes, sprites, sound, physics, a server, monetization, social, etc. a breeze.
  2. By prebuilding native libraries.
  3. By providing and incorporating plugins for IAP, displaying ads, social networking, analytics, asynchronous multiplayer and virtual economies that work on all platforms.
  4. By including example code to a complete game based on multiple currencies.
  5. By providing detailed documentation.

Some of RapidGame Pro’s plugins had to be developed from scratch for multiple platforms. For example, the Facebook plugin — including both social networking and IAP via Facebook Payments — is written separately in C++ for iOS, C++ and Java for Android, and JavaScript for HTML5. All of these implementations are accessible from your game using one simple JavaScript API. You don’t have to worry about a multitude of platform implementations to write code for and test.

Here’s the code that logs in to Facebook:

Game.socialPlugin.login();

Likewise, the following code will display a full-screen video advertisement. Behind the scenes, this single JavaScript API call runs native C++, Java or JavaScript, depending on the platform.

Game.adsPlugin.showAds({
    type: plugin.AdsType.FullScreenAd,
    position: plugin.AdsPos.Center
});

RapidGame Pro helps perform day-to-day development tasks faster. The Cocos2D X libraries and plugins are prebuilt, so when you run your game in the simulator or on the device it will launch almost instantaneously.

Developing your own game template with social networking, monetization and other plugins for multiple platforms — for even just one platform — can take months to get right. RapidGame Pro lets you start with all the little things a pro-grade game needs already done.

Approximate time to create the Breakout clones with RapidGame Pro:

  • Unity: 2-3 hours
  • Corona: 1-2 hours
  • Cocos2D JS: 1-2 hours
  • Titanium: 2-3 hours

See the source for all 4 on GitHub.

Conclusion

Based on my experience with the options I’ve explored here, I’d recommend that if you need 3D support now and you have plenty of money, stick with Unity.

If all you want to do is make simple 2D games for mobile platforms only, consider Corona.

If you love open-source and want to deploy to many platforms, go for Cocos2D JS.

If you want to save yourself a month or two, start with a game template like RapidGame Pro.

For a game developer, choosing the right cross-platform game engine can be the single most important decision they make. I hope my insights help you to make that choice.

Posted in Game Development Open-Source