Press enter to see results or esc to cancel.

Fernando Ballester in Mobile Game Development

Game development for mobile devices with Cocos2D-X

If you’re a mobile game development professional, you no longer have to make use of different codes and SDKs for the different platforms or devices you’ve chosen as targets for your game. You only need Cocos2D-X.

What’s Cocos2D-X?

Cocos2D-X is a cross-platform framework that maintains an API’s (Application Programming Interface) original structure while also allowing the use of other programming languages such as C++, Lua, JavaScript and C#. This framework allows developing top games for the main operating systems (Windows, Mac and Linux) while extending support to mobile platforms (iOS, Android, Windows Phone) and stationary platforms (Win32, Linux, Windows 8, Mac OS X).

Unlike other cross-platform frameworks based on JavaScript/HTML5, Cocos2D-X makes use of the graphics API OpenGL ES, thus improving an app’s performance on a given device.

game development cocos


Free software

Another major advantage of Cocos2D-X is that we can use it without having to spend large amounts of money on licences: it’s free. Cocos2D-X works under the MIT licence and is maintained by its community of users. Developers need to have total control over the games they develop and this framework grants it to them. Also, as this system is developed in C++, its core is smaller and offers a faster speed than any other game engine. In addition, it’s optimised to run on all kinds of devices, including low-end Android systems.

Getting an idea of the high quality achieved by games created with Cocos2D-X is as simple as taking a look at examples such as Badland, Castle Clash, Big Fish Casino or Dragon City Mobile.

Cocos2D-X software development kit

The Cocos2D-X software development kit includes several tools or environments:

1 – Cocos2D-X links the engine to C++. It allows developing applications in C++ and compiling them afterwards as native iOS, Android or Windows Phone apps − among many other platforms.

2 – Cocos2D-JS is a complete software suite that includes Cocos2D-X, Cocos2D-HTML, JSB and a command-line interface to create apps with JavaScript easily (both web and compilable to native app).

3 – Cocos Code IDE is an Eclipse integrated development environment that has been modified to make programming, compiling and fixing bugs with Cocos2D-JS and Lua-bindings smoother.

4 – Coco Studio is a toolkit for designing GUIs and skeletal animations that also allows importing flash files.

Limitations of Cocos2D-X

We must make a couple of clarifications regarding this tool before going any further: we will not be able to create 3D games with it because − as its name suggests − it’s conceived for 2D. Instead you can check this Unity game development tutorial. In addition to this, there is still no efficient support forum in place to resolve queries quickly. The currently existing forum is managed by the programming community and queries are answered in a collective manner. Regarding paid-for tools, support provides solutions swiftly as it has specialists dedicated to these issues. However, in relation to free open-source tools it all depends on the programming community itself.

These limitations are often overcome by developers who regard such aspect as not being as important as the fact that Cocos2D-X is open-source − unlike all other tools for game development and creating applications entailing paid-for licences.

It’s possible to create excellent 2D games with Cocos2D-X that offer multiple features and a high performance. However, it will always have the disadvantage of not being able to provide 3D graphics, which is an almost indispensable feature for games these days.

iOS devs focus on game development above all

With the kick-off of iOS 7 this Monday, iOS developers enrolled in the Apple programme will be able to enjoy many novelties. In the first place, the operating system’s new version has already over 1500 APIs designed to allow developers to make the most out of their upcoming applications for iOS 7.

One of the areas that will undoubtedly be gaining more importance in iOS 7 app development will be that of mobile games. From the very outset, iOS developers will be able to work with Sprite Kit, a framework that will help them develop 2D and 2.5D games for iOS 7 that can use all the features offered by the terminals. Also, Apple’s Game Center offers new improvements, including the possibility of creating multiplayer turn-based games and an enhanced authentication support to avoid misappropriation.

The Game Controller Framework is the most outstanding feature introduced: it will allow iOS developers programming apps that are able to detect Apple’s OS in order to establish specific game settings. In fact, Apple has defined a set of common specifications based on three gamepad standards:

  • A standard adjustable gamepad: To which devices may be attached and controlled both through the gamepad’s controls (a crosshead controller, a pause button, four main buttons and two triggers) or through the touchscreen
  • An extended adjustable gamepad: Similar to the standard gamepad but incorporating two analogue joysticks, two more triggers and four LED indicators;
  • And an extended wireless gamepad, with the same controls as the adjustable gamepad, but connected via Bluetooth to the device.

In addition to this new range of possibilities at hand for mobile gaming, Apple has also implemented new development options in other areas. The beta version of iOS 7 is already available on iOS Dev Center, with all its associated resources and necessary documentation. However, iOS developers that have not yet activated app publishing on the App Store will experience some restrictions when using this beta version.



Comments are disabled for this post