From Wikipedia, the free encyclopedia
Original author(s)Zhe Wang
Developer(s)Chukong Technologies
Initial releaseDecember 1, 2010 (2010-12-01)[1]
Stable release
4.0[2] Edit this on Wikidata / 29 November 2019; 3 years ago (29 November 2019)
Written inC++
LicenseMIT License
Original author(s)Ricardo Quesada
Developer(s)Andrei Volodin and Lars Birkemose
Initial releaseJune 25, 2008 (2008-06-25)
Stable release
3.5.0[3] / April 3, 2016; 7 years ago (2016-04-03)
Written inObjective-C
LicenseMIT License
Original author(s)Ricardo Quesada, Lucio Torre
Initial releaseFebruary 29, 2008 (2008-02-29)
Stable release
0.6.9[4][5] / November 9, 2020; 3 years ago (2020-11-09)
Written inPython
License3-clause BSD

Cocos2d is an open-source game development framework for creating 2D games and other graphical software for iOS, Android, Windows, macOS, Linux, HarmonyOS, OpenHarmony and web platforms. It is written in C++ and provides bindings for various programming languages, including C++, C#, Lua, and JavaScript. The framework offers a wide range of features, including physics, particle systems, skeletal animations, tile maps, and others.

Cocos2d was first released in 2008, and was originally written in Python. It contains many branches with the best known being Cocos2d-ObjC (formerly known as Cocos2d-iPhone), Cocos2d-x, Cocos2d-JS and Cocos2d-XNA. There are also many third-party tools, editors and libraries made by the Cocos2d community, such as particle editors, spritesheet editors, font editors, and level editors, like SpriteBuilder and CocoStudio.

Sprites and scenes[edit]

All versions of Cocos2d work using the basic primitive known as a sprite. A sprite can be thought of as a simple 2D image, but can also be a container for other sprites. In Cocos2D, sprites are arranged together to form a scene, like a game level or a menu. Sprites can be manipulated in code based on events or actions or as part of animations. The sprites can be moved, rotated, scaled, have their image changed, etc.



Cocos2D provides basic animation primitives that can work on sprites using a set of actions and timers. They can be chained and composed together to form more complex animations. Most Cocos2D implementations let you manipulate the size, scale, position, and other effects of the sprite. Some versions of Cocos2D let you also animate particle effects, image filtering effects via shaders (warp, ripple, etc.).


Cocos2D provides primitives to representing common GUI elements in game scenes. This includes things like text boxes, labels, menus, buttons, and other common elements.

Physics system[edit]

Many Cocos2D implementations come with support for common 2D physics engines like Box2D and Chipmunk.


Various versions of Cocos2D have audio libraries that wrap OpenAL or other libraries to provide full audio capabilities. Features are dependent on the implementation of Cocos2D.

Scripting support[edit]

Support binding to JavaScript, Lua, and other engines exist for Cocos2D. For example, Cocos2d JavaScript Binding (JSB) for C/C++/Objective-C is the wrapper code that sits between native code and JavaScript code using Mozilla's SpiderMonkey. With JSB, you can accelerate your development process by writing your game using easy and flexible JavaScript.

Editor support[edit]

End of life support[edit]

  • SpriteBuilder: Previously known as CocosBuilder,[6] SpriteBuilder is an IDE for Cocos2D-SpriteBuilder apps. SpriteBuilder is free and its development was sponsored by Apportable, who also sponsored the free Cocos2D-SpriteBuilder, Cocos3D, and Chipmunk physics projects. It was available as a free app in the Mac App Store. Its latest official version is 1.4.[7][8] Its latest unofficial version is 1.5 which is compatible with cocos2d-objC 3.4.9.[9] It supports Objective-C.
  • CocoStudio: a proprietary toolkit based on Cocos2d-x, containing UI Editor, Animation Editor, Scene Editor and Data Editor, together forming a complete system; the former two are tools mainly for artists while the latter are two mainly for designers. This is a proprietary project developed by Chukong Technologies. Its latest version is 3.10 which is compatible with cocos2d-X 3.10.[10][11] It supports C++. In April 2016 it was deprecated and replaced with Cocos Creator.

Current support[edit]

  • Cocos Creator, which is a proprietary[12] unified game development tool for Cocos2d-X. As of August 2017, it supports JavaScript and TypeScript only and does not support C++ nor Lua. It was based on the free Fireball-X.[13] A C++ and Lua support for creator is under alpha-stage development since April 2017.[14]
  • SpriteBuilderX, a free scene editor for Cocos2d-X with C++ support and runs on macOS only.[15]
  • X-Studio, a proprietary[16] scene editor for Cocos2d-X with Lua support and runs on Windows only.[17][18]
  • CCProjectGenerator: a project generator for Cocos2d-ObjC 3.5 that generates Swift or Objective-C projects for Xcode.[19]

Supported platforms and languages[edit]

Branch Target Platform API Language
Cocos2d Windows, OS X, Linux Python 2.6, 2.7 or 3.3+, Objective-C
Cocos2d-x iOS, Android, Tizen, Windows, Windows Phone 8, Linux, Mac OS X C++, Lua, JavaScript
Cocos2d-ObjC iOS, Mac OS X, tvOS[20] Objective-C, Swift
Cocos2d-html5 HTML5-ready browsers JavaScript
Cocos2d-xna Windows Phone 7 & 8, Windows 7 & 8, Xbox 360 C#
Cocos Creator Android, iOS, HarmonyOS C#, C++, TypeScript, JavaScript


Cocos2d (Python)[edit]

February 2008, in the village of Los Cocos, near Córdoba, Argentina, Ricardo Quesada, a game developer, and Lucio Torre created a 2D game engine for Python with several of their developer friends. They named it "Los Cocos" after its birthplace. A month later, the group released the version 0.1 and changed its name to "Cocos2d".[21]


Attracted by the potential of the new Apple App Store for the iPhone, Quesada rewrote Cocos2d in Objective-C and in June 2008 released "Cocos2d for iPhone" v0.1, the predecessor of the later Cocos2d family.[21]

Cocos2D-ObjC (formerly known as Cocos2D-iPhone and Cocos2D-SpriteBuilder), is maintained by Lars Birkemose.

Also, the English designer Michael Heald designed a new logo for Cocos2d (the Cocos2d logo was previously a running coconut).


November 2010, a developer from China named Zhe Wang branched Cocos2d-x based on Cocos2d. Cocos2d-x is also a free engine under MIT License, and it allows for compiling and running on multiple platforms with one code base.

In 2013, Quesada left cocos2d-iPhone and joined in cocos2d-x team. In March 2017, Quesada was laid off from the Chukong company.[22][21] In 2015, there are 4 cocos2d branches being actively maintained.

Cocos2d-x & Cocos2d-html5 is maintained and sponsored by developers at Chukong Technologies. Chukong is also developing CocoStudio, which is a WYSIWYG editor for Cocos2d-x and Cocos2D-html5, and a free Cocos3d-x fork of the Cocos3D project.

Other ports, forks, and bindings[edit]

Cocos2d has been ported into various programming languages and to all kinds of platforms. Among them there are:

Games developed with cocos2d[edit]

See also[edit]


  1. ^ "Happy 7th Birthday Cocos2d-x!". December 2017. Retrieved December 17, 2017.
  2. ^ "Release 4.0". 29 November 2019. Retrieved 30 November 2019.
  3. ^ "Releases". cocos2d/cocos2d-objc. GitHub.
  4. ^ "Releases". los-cocos/cocos. GitHub.
  5. ^ "cocos2d".
  6. ^ "CocosBuilder". GitHub. 9 November 2021.
  7. ^ "SpriteBuilder". GitHub. 8 November 2021.
  8. ^
  9. ^ "[Update] SpriteBuilder 1.5.0 vs Cocos2D v3.4.9 - Cocos2D-SpriteBuilder Forum". Archived from the original on 2016-12-22. Retrieved 2016-12-22.
  10. ^ "Cocos Studio | Cocos2d-x". Archived from the original on 2017-07-17. Retrieved 2016-12-21.
  11. ^ "Where i can download Сocos studio?". 19 July 2016.
  12. ^ "Is EDITOR of cocos creator open source?". 7 February 2017.
  13. ^ "Fireball-x/Fireball on GitHub". 28 January 2015.
  14. ^ "C++ and Lua support for creator alpha0 released". 11 April 2017.
  15. ^ "SpriteBuilderX - editor for Cocos2d-X with C++ support". 6 February 2017.
  16. ^ "#x-studio, a game development tool based on Cocos2d-x". 19 March 2017.
  17. ^ "X-studio IDE、代码编辑器、Lua调试器、UI编辑器".
  18. ^
  19. ^ "CCProjectGenerator". GitHub. 9 November 2020.
  20. ^ Cocos2D-ObjC, cocos2d, 2023-01-09, retrieved 2023-01-12
  21. ^ a b c Quesada, Ricardo (April 16, 2017). "The history of Cocos2d in a glimpse". RETRO.MOE. Retrieved 2019-07-03.
  22. ^ "Survey: The reasons why I won't use Cocos Creator". 9 August 2017.
  23. ^ Baker, Liana B. (9 May 2011). "Zynga buys iPhone game engine development team". Reuters. Archived from the original on 13 May 2011. Retrieved 14 April 2021. Zynga said it would not be acquiring cocos2d, which is a free game engine that developers use to make games for Apple devices such as the iPhone, the iPad and iPod touch. Zynga's Chief Technology Officer, Cadir Lee, said in an interview that Zynga already uses the game engine in its FarmVille game on the iPhone. Having the developers, who were key in developing the free platform, will help Zynga master the technology, Lee said.
  24. ^ Takaki, Hiroshige (13 July 2016). "Cocos2d-xチューニング、マルチデバイス対応…任天堂エンジニアに聞いた「Miitomo」開発の裏側". CodeIQ MAGAZINE (in Japanese). Goo. Retrieved 14 April 2021.
  25. ^ Vuorinen, Johannes (27 April 2013). "BADLAND – a cocos2d-iphone game". Cocos2D. Archived from the original on 10 February 2014. Retrieved 8 June 2021.
  26. ^ "The Biggest Korean Games Using The Cocos Engine". 22 April 2020.

Further reading[edit]

  • Roger Engelbert (2013). Cocos2d-x by Example Beginner's Guide. Packt Publishing Ltd. ISBN 978-1-78216-735-8.

External links[edit]