Cocos2d
{{Short description|Software framework}}
{{Multiple issues|
{{more citations needed|date=August 2014}}
{{primary sources|date=August 2014}}
}}
{{Use mdy dates|date=September 2022}}
{{Infobox software
| name = Cocos2d-x
| author = Zhe Wang
| developer = Chukong Technologies
| released = {{Start date|2010|12|01|df=y}}{{cite web |url=http://discuss.cocos2d-x.org/t/happy-7th-birthday-cocos2d-x/40271 |title=Happy 7th Birthday Cocos2d-x! |date=December 2017 |access-date=17 December 2017}}
| latest_release_version = {{wikidata|property|reference|edit| Q1525915 |P348}}
| latest_release_date = {{start date and age|{{wikidata|qualifier| Q1525915 |P348|P577}}}}
| latest preview version =
| latest preview date =
| programming language = C++
| platform = Cross-platform
| license = MIT License
| website = {{URL|cocos2d-x.org}}
| repo = {{URL|https://github.com/cocos2d/cocos2d-x}}
}}
{{Infobox software
| name = Cocos2D-ObjC
| author = Ricardo Quesada
| developer = Andrei Volodin and Lars Birkemose
| released = {{Start date|2008|06|25|df=y}}
| latest release version = 3.5.0{{cite web |title=Releases |url=https://github.com/cocos2d/cocos2d-objc/releases |department=cocos2d/cocos2d-objc |work=GitHub}}
| latest release date = {{Start date and age|2016|04|03|df=y}}
| latest preview version =
| latest preview date =
| programming language = Objective-C
| platform = Cross-platform
| license = MIT License
| website = {{URL|https://web.archive.org/web/20180811094414/http://cocos2d-objc.org/}}
| repo = {{URL|https://github.com/cocos2d/cocos2d-objc}}
}}
{{Infobox software
| name = Cocos2d
| author = Ricardo Quesada, Lucio Torre
| developer =
| released = {{Start date|2008|02|29|df=y}}
| latest release version = 0.6.10{{cite web |title=Release history |url=https://pypi.org/project/cocos2d/#history}}{{cite web |title=cocos2d |url=https://los-cocos.github.io/cocos-site/ |access-date=2024-05-10 |archive-date=2024-01-15 |archive-url=https://web.archive.org/web/20240115194612/https://los-cocos.github.io/cocos-site/}}
| latest release date = {{Start date and age|2023|07|17|df=y}}
| latest preview version =
| latest preview date =
| programming language = Python
| platform = Cross-platform
| license = 3-clause BSD
| website = {{URL|https://los-cocos.github.io/cocos-site/}}
| repo = {{URL|https://github.com/los-cocos/cocos}}
}}
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
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.
Features
= Animation =
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.).
= GUI =
Cocos2D provides primitives to represent common GUI elements in game scenes. This includes things like text boxes, labels, menus, buttons, and other common elements.
= Physics system =
= Audio =
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 =
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 =
==End of life support==
- SpriteBuilder: Previously known as CocosBuilder,{{Cite web|url=https://github.com/cocos2d/CocosBuilder|title=CocosBuilder|website=GitHub|date=9 November 2021}} 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.{{Cite web|url=https://github.com/spritebuilder/SpriteBuilder|title = SpriteBuilder|website = GitHub|date = 8 November 2021}}{{Cite web|url=http://spritebuilder.com/|title=Sprite Builder|date=1 December 2018|website=spritebuilder.com|accessdate=10 April 2024}} Its latest unofficial version is 1.5 which is compatible with cocos2d-objC 3.4.9.{{Cite web |url=http://forum.spritebuilder.com/t/update-spritebuilder-1-5-0-vs-cocos2d-v3-4-9/18272 |title= SpriteBuilder 1.5.0 vs Cocos2D v3.4.9 - Cocos2D-SpriteBuilder Forum |access-date=2016-12-22 |archive-url=https://web.archive.org/web/20161222145908/http://forum.spritebuilder.com/t/update-spritebuilder-1-5-0-vs-cocos2d-v3-4-9/18272 |archive-date=2016-12-22 |url-status=dead }} 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.{{Cite web |url=http://www.cocos2d-x.org/wiki/Cocos_Studio |title=Cocos Studio {{pipe}} Cocos2d-x |access-date=2016-12-21 |archive-url=https://web.archive.org/web/20170717132934/http://www.cocos2d-x.org/wiki/Cocos_Studio |archive-date=2017-07-17 |url-status=dead }}{{Cite web|url=http://discuss.cocos2d-x.org/t/where-i-can-download-ocos-studio/30916|title=Where i can download Сocos studio?|date=19 July 2016}} It supports C++. In April 2016 it was deprecated and replaced with Cocos Creator.
==Current support==
- Cocos Creator, which is a proprietary{{Cite web|url=http://discuss.cocos2d-x.org/t/is-editor-of-cocos-creator-open-source/34935/2|title = Is EDITOR of cocos creator open source?|date = 7 February 2017}} unified game development tool for Cocos2d-X. As of August 2017, it supports JavaScript and TypeScript only and does not support neither C++ nor Lua. It was based on the free Fireball-X.{{Cite web|url=https://libraries.io/github/fireball-x/fireball|title = Fireball-x/Fireball on GitHub| date=28 January 2015 }} C++ and Lua support for creator is under alpha-stage development since April 2017.{{Cite web|url=http://discuss.cocos2d-x.org/t/c-and-lua-support-for-creator-alpha0-released/36168|title = C++ and Lua support for creator alpha0 released|date = 11 April 2017}}
- SpriteBuilderX, a free scene editor for Cocos2d-X with C++ support and runs on macOS only.{{Cite web|url=http://discuss.cocos2d-x.org/t/spritebuilderx-editor-for-cocos2d-x-with-c-support/34916|title=SpriteBuilderX - editor for Cocos2d-X with C++ support|date=6 February 2017}}
- X-Studio, a proprietary{{Cite web|url=https://www.x-studio.net/|title=#x-studio, a game development tool based on Cocos2d-x|date=19 March 2017}} scene editor for Cocos2d-X with Lua support and runs on Windows only.{{cite web | url=https://x-studio.net/dl.php?host=local | title=X-studio IDE、代码编辑器、Lua调试器、UI编辑器 }}[https://www.x-studio.net X-Studio website]
- CCProjectGenerator: a project generator for Cocos2d-ObjC 3.5 that generates Swift or Objective-C projects for Xcode.{{Cite web|url=https://github.com/s1ddok/CCProjectGenerator|title = CCProjectGenerator|website = GitHub|date = 9 November 2020}}
Supported platforms and languages
class="wikitable" | ||
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{{Citation |title=Cocos2D-ObjC |date=2023-01-09 |url=https://github.com/cocos2d/cocos2d-objc |publisher=cocos2d |access-date=2023-01-12}} | 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 |
History
{{Unreferenced section|date=August 2014}}
= Cocos2d (Python) =
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".{{cite web |last=Quesada |first=Ricardo |date=2017-04-16 |title=The history of Cocos2d in a glimpse |url=https://retro.moe/2017/04/16/cocos2d-in-a-glimpse/ |website=RETRO.MOE |access-date=2019-07-03 |df=mdy}}
= Cocos2d-iPhone =
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.
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).
= Cocos2d-x =
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.{{Cite web|url=http://discuss.cocos2d-x.org/t/survey-the-reasons-why-i-wont-use-cocos-creator/38404/34|title=Survey: The reasons why I won't use Cocos Creator|date=9 August 2017}} 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 =
Cocos2d has been ported into various programming languages and to all kinds of platforms. Among them there are:
- ShinyCocos, in Ruby
- Cocos2d-Android, in Java for Android
- Cocos2d-windows, in C++ for Windows XP and Windows 7
- CocosNet, in C# based on Mono
- Cocos2d-javascript, in JavaScript for web browsers
- Cocos2d-XNA was born in cocos2d-x community for supporting Windows Phone 7, but now it's branched to an independent project using C# and mono to run on multiple platforms. Jacob Anderson at Totally Evil Entertainment is leading this branch.
- Cocos3d works as an extension on cocos2d-iPhone, written in Objective-C. Bill Hollings at Brenwill Workshop Ltd is leading this branch.
- Axmol Engine is an open-source, C++ multi-platform engine designed for mobile devices, desktop, and Xbox, well-suited for 2D game development. It was launched in November 2019 as a fork of Cocos2d-x v4.0.
Games developed with cocos2d
- FarmVille{{cite web |last1=Baker |first1=Liana B. |title=Zynga buys iPhone game engine development team |url=https://www.reuters.com/article/us-zynga-idUKTRE7484QV20110509 |website=Reuters |access-date=14 April 2021 |archive-url=https://web.archive.org/web/20110513122020/http://www.reuters.com/article/2011/05/09/ctech-us-zynga-idCATRE7484QV20110509 |archive-date=13 May 2011 |date=9 May 2011 |quote=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. |url-status=live}}
- Plague Inc.
- Geometry Dash (cocos2d-x)
- Legendary Wars{{Cite web|url=http://www.reddit.com/r/IAmA/comments/1qxc4h/from_gamestop_manager_with_no_game_dev_experience/cdi1b56/|title=All done in COCOS2D ...|website=Reddit.com|date=November 19, 2013|accessdate=2024-08-18}}
- Miitomo{{cite web |last1=Takaki |first1=Hiroshige |title=Cocos2d-xチューニング、マルチデバイス対応...任天堂エンジニアに聞いた「Miitomo」開発の裏側 |url=https://news.goo.ne.jp/article/codeiq/trend/codeiq-52755.html |website=CodeIQ MAGAZINE |publisher=Goo |access-date=14 April 2021 |language=Japanese |date=13 July 2016 |archive-date=15 April 2021 |archive-url=https://web.archive.org/web/20210415105357/https://news.goo.ne.jp/article/codeiq/trend/codeiq-52755.html |url-status=dead }} (cocos2d-x)
- Badland{{cite web |last1=Vuorinen |first1=Johannes |author1-link=Badland (video game) |title=BADLAND – a cocos2d-iphone game |url=http://www.cocos2d-iphone.org/badland-a-cocos2d-iphone-game/ |website=Cocos2D |access-date=8 June 2021 |archive-url=https://web.archive.org/web/20140210010214/http://www.cocos2d-iphone.org/badland-a-cocos2d-iphone-game/ |archive-date=10 February 2014 |date=27 April 2013 |url-status=dead}} (cocos2d-iphone)
- Shadow Fight 2 (cocos2d-x){{citation needed|date=April 2022|reason=The linked article says the game uses either Marmalade or Unity, but doesn't include a citation}}
- Cookie Run: OvenBreak{{cite web|url=https://www.cocos.com/en/the-biggest-korean-games-using-the-cocos-engine|title=The Biggest Korean Games Using The Cocos Engine|date=22 April 2020}}
- Fire Emblem Heroes
- Magia Record
- Harry Potter: Hogwarts Mystery (cocos creator){{cite web|url=https://www.cocos.com/en/post/the-best-companies-in-america-build-mobile-games-with-cocos|title=The Best Companies In America Build Mobile Games With Cocos|date=30 June 2020}}
- FlyMe2theMoon (cocos2d)
See also
References
{{reflist}}
Further reading
{{expand section|date=August 2014}}
- {{cite book|author=Roger Engelbert|title=Cocos2d-x by Example Beginner's Guide|year=2013|publisher=Packt Publishing Ltd|isbn=978-1-78216-735-8}}
External links
- {{Official website|cocos2d.org}}
{{Video game engines}}
Category:Free computer libraries
Category:Free software programmed in Objective-C
Category:Free software programmed in Python
Category:Python (programming language)-scriptable game engines
Category:Software using the BSD license