Home » Game » Comparison Between Unity and Cocos2D Platforms for 2D game development

Comparison Between Unity and Cocos2D Platforms for 2D game development

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).

Ebook 3 Juego Descarga

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.

unity 2d vs 3d
Image by 爱卧虎 via Flickr

Design Environment

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.

Programming language

Cocos2D uses C ++ while Unity3D lets you use C # or Javascript. Both C # and Javascript are a lot more powerful languages than C ++, which allow you to program actions and algorithms with less difficulty than C ++. Also, for those who are not experts in C ++, learning can be very tedious and difficult. You also have to worry about problems such as the management of pointers or memory leaks. All these issues disappear with Unity, letting you focus only on features of your game, which is again a huge timesaver. In addition, code editors, for Unity either MonoDevelop or VisualStudio, are much more stable, simple and comprehensive than Cocos (XCode mostly). In summary, we can say that C # / Javascript (Unity) is easier than C ++ (Cocos) as it allows you to save time doing your job with more efficient languages.

Multiplatform

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

There is an abundance of Unity documentation. There are clear video tutorials and texts, some translated into Spanish. The support is relatively quick and concise. Cocos documentation, however, is scarce and of poor quality. Only available in English and sometimes only in Chinese. The support is nil, the forum is full of unanswered questions and getting answers is very difficult. The Unity learning time is much faster than that of Cocos: the graphical editor, C # / Javascript and copious information and support make it an enjoyable learning experience. The opposite can be said about Cocos2D, unless you’re an expert in C and XCode ++ and want to study libraries of Cocos2D thoroughly.

Community and Extras

Unity3D is already a very powerful development tool. But this power is enhanced more with the contributions of others through its Asset Store. Hundreds of developers sell their plugins, resources and improvements through this store. Some of these plugins are so powerful that they are a must buy: 3D models, 2D textures, animations, applications, extensions editor, scripts, materials are just some of the extras you can buy or free download at Unity´s official store. Among them Ngui, which is an extension to the graphical editor, this is a huge help for 2D developments and reduces game development time even further. Ngui Unity is (almost) as jQuery is to Javascript. Cocos lacks these fundamental extras.

Conclusion 

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

Proyecto Juego

Tags