Comparison Between Unity and Cocos2D Platforms for 2D game development
Casual Arena’s team has been developing Flash game browsers since 2008. Within the past year, they have specialized in game development cross-platform mobile and tablet games, studying different technologies and specializing in Cocos 2D and Unity 3D. This article highlights the differences between the two environments and compares them explaining their respective differences.
Development of 2D platform games
Most mobile and tablet game developers want to make their game available for a multitude of platforms, or at least available for iOS and Android. Of course, it is always possible to make 2 or more parallel developments using native code (Objective-C for iOS, Java for Android …), but this is not recommended. The most efficient option is to use a development environment that allows you to target multiple platforms from a single instance of game development. Here arises the first big question: What technology do I use?
There are various frameworks and technologies available to the user: Unity3D, Cocos2D, Marmalade SDK or Adobe Flash, among others. Adobe Flash is virtually only used when your application is already developed in Flash for browser use and you wish to quickly migrate to mobile. If you have a very simple application (e.g. a board game) then it is possible to use this technology, however, if your application requires more processing power (e.g pool games, games with heavy graphics or animations, etc) Flash stops being a viable option. Cocos2D is a comprehensive framework, open source and completely free.
This is the main reason for it being the most used development platform, surpassing Marmalade or Unity which are not completely free. Unity3D has been and still remains the most used development platform to develop 3D games. With new versions of Unity, which include specific functionality for the development of 2D games, it has also positioned itself in a very solid position for this type of game, making Cocos and Unity the current two options for 2D game development. From our experience, we recommend choosing one of these 2 platforms for the 2D game development. But the big question still remains:
What is the best platform for game development: Unity or Cocos?
On the internet, you are able to find many comparisons between these two platforms. When we started the development of our games we read all available data and information and used them to make our decision. The problem with these comparisons is that they were almost all very subjective. Developers who had specialized in Cocos were defending it. Those who used Unity defended Unity. There are really very few comparative expert game developers on both platforms. We have studied and developed for the 2 environments and we have an objective opinion: Unity is clearly a better platform. Actually, a more accurate answer would be: “if you can afford it go for Unity, otherwise Cocos is a good back up”. Unity3D is a much more advanced than Cocos2D technology while Cocos2D is free and an open source. Consider the differences between them. At all times when talking about Cocos2D (or simply Cocos), we refer to Cocos2D-x, which is the platform Cocos2D extension (initially oriented for iPhone).
Cocos2D advantages versus Unity3D
Cocos2D is free, open source and more up-to-date. Unity, however, is expensive. It has a free license but is insufficient for professional game developers. The license cost is between $ 1,500 and $ 4,500 more per person (plus tax), which is a significant barrier to new developers. Cocos2D uses C++ programming language and light libraries, making it somewhat simpler than Unity. You can see the complete code for Cocos2D, edit or adapt it to your needs. If you are an expert in C ++ and do not want to pay expensive licenses for Unity, Cocos2D is the best choice. It has some very positive features, but there are not many advantages, compared with Unity. It has good physical engines, a huge amount of examples for each and every one of the features of Cocos2D, and a large community of game developers that support and improve every day, etc. But all this done by Unity too.
Unity3D advantages versus Cocos2D
Everything else. Of course, we always talk about 2D, as Coco does not support 3D software.
Cocos2D has no integrated design environment. The design of screens or interfaces should be done with programming, loading images and positioning them with C ++. You can, however, use external graphics editors like Cocos Studio (also free), to help you position elements on screen and configure certain objects. But this editor is much less powerful than that of Unity. The Unity editor is fully integrated. Cocos Studio, on the contrary, is not, and its operation is based on an XML file and it also generates a series of images from Cocos´ libraries. It has some bugs and does not always work on all computers. The Unity graphical editor allows the user to design and layout Unity scenes with ease, to insert objects, scripts, light effects and physical effects, etc. This is achieved by dragging components and modifying parameters. Hence, it greatly reduces game development time compared to a layout with Cocos2D or Cocos Studio.
Both are cross-platform, but it is Unity which is the better of the two. Cocos2D allows for development on different mobile platforms including iOS and Android. Unity adds the rest: console, desktop and browser. If you want your browser development to support Facebook, Cocos2D is insufficient. Using Cocos you would have to make a second browser development, for example, Adobe Flash, as is the case with most of the games available for mobile and browser market. With Unity this is not necessary, enabling export to browser easily. Unity can export to almost every gaming platform on the market: mobile and tablets (iOS, Android, Windows Phone and BlackBerry), browser (with Unity Web Player and HTML 5 soon) console (Xbox, PlayStation and Wii) and desktop (PC, Mac and Linux). In addition, Unity allows for specific adaptations for different devices, however, Cocos2D is the easiest way (for example, to adapt a game development to Android and iOS).
Documentation and Learning time
Community and Extras
Unity is expensive but worth it. Development time is reduced at a much higher rate than the proportion of their licensing costs. Many of its features you simply cannot get with Cocos2D and it allows you to compile more than Cocos2D. Thus, Unity3D is better than Cocos2D.