{"schemaVersion":"1.0","record":{"label":"Cocos2d-x","description":"C++ game framework with scene graphs, sprites and actions for native mobile and desktop applications.","aliases":[],"kind":"software","website":"https://github.com/cocos2d/cocos2d-x","overview":"Cocos2d-x is a C++ framework for games and other graphical applications on mobile and desktop platforms. Its core workflow organizes content into scenes and nodes, with sprites, actions, interface components and supporting game systems. It is a distinct project from Cocos Creator, and this article focuses on the documented Cocos2d-x v4 baseline.","license":"MIT for Cocos2d-x; third-party components and imported assets have separate terms.","lifecycle":"active","example":false,"features":[{"name":"Scene and node organization","status":"supported","detail":"Scenes contain sprites, labels and other nodes; a scene graph organizes content and rendering.","useCase":"Maintaining scene-based native C++ games on the Cocos2d-x v4 baseline","platforms":["Windows","macOS","Linux","Android","iOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/basic_concepts/","locator":"Director, Scene, Sprite and scene graph","retrievedAt":"2026-10-07T20:09:18Z","kind":"vendor"}]},{"name":"Time-based actions","status":"supported","detail":"Actions change Node properties over time, including sprite movement and other transformations.","useCase":"Maintaining scene-based native C++ games on the Cocos2d-x v4 baseline","platforms":["Windows","macOS","Linux","Android","iOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/actions/","locator":"Time-based Node property changes","retrievedAt":"2026-10-07T20:11:18Z","kind":"vendor"}]},{"name":"Native v4 rendering","status":"limited","detail":"v4 adds Metal on Apple platforms and requires Metal-capable Apple devices; custom rendering APIs change from earlier versions.","useCase":"Maintaining scene-based native C++ games on the Cocos2d-x v4 baseline","platforms":["Windows","macOS","Linux","Android","iOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/docs/RELEASE_NOTES.md","locator":"Metal, CMake, API changes and removals","retrievedAt":"2026-10-07T20:09:06Z","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/upgradeGuide/","locator":"Metal-capable Apple devices and rendering abstraction changes","retrievedAt":"2026-10-07T20:09:50Z","kind":"vendor"}]},{"name":"Built-in v4 HTML5/JSB route","status":"unsupported","detail":"The v4 release notes explicitly remove the HTML5 engine and JavaScript bindings from this baseline.","useCase":"Maintaining scene-based native C++ games on the Cocos2d-x v4 baseline","platforms":["Windows","macOS","Linux","Android","iOS"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/docs/RELEASE_NOTES.md","locator":"Metal, CMake, API changes and removals","retrievedAt":"2026-10-07T20:09:06Z","kind":"vendor"}]}],"alternatives":[],"slug":"cocos2d-x","draftAlternatives":[],"evidence":[{"url":"https://github.com/cocos2d/cocos2d-x","locator":"C++ platforms and distinction from Cocos Creator APIs","retrievedAt":"2026-10-07T20:08:38Z","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/basic_concepts/","locator":"Director, Scene, Sprite and scene graph","retrievedAt":"2026-10-07T20:09:18Z","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/basic_concepts/getting_started.html","locator":"AppDelegate, shared/platform code and design resolution","retrievedAt":"2026-10-07T20:09:34Z","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/actions/","locator":"Time-based Node property changes","retrievedAt":"2026-10-07T20:11:18Z","kind":"vendor"},{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/docs/RELEASE_NOTES.md","locator":"Metal, CMake, API changes and removals","retrievedAt":"2026-10-07T20:09:06Z","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/upgradeGuide/","locator":"Metal-capable Apple devices and rendering abstraction changes","retrievedAt":"2026-10-07T20:09:50Z","kind":"vendor"},{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/licenses/LICENSE_cocos2d-x.txt","locator":"MIT terms","retrievedAt":"2026-10-07T20:09:34Z","kind":"vendor"},{"url":"https://github.com/axmolengine/axmol/wiki/Cocos2d%E2%80%90x-migration-guide","locator":"v4 migration, namespaces, type changes and tool limits","retrievedAt":"2026-10-07T20:08:22Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/cocos2d/cocos2d-x","locator":"C++ platforms and distinction from Cocos Creator APIs","retrievedAt":"2026-10-07T20:08:38Z","id":"repo","title":"Cocos2d-x repository","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/basic_concepts/","locator":"Director, Scene, Sprite and scene graph","retrievedAt":"2026-10-07T20:09:18Z","id":"concepts","title":"Cocos2d-x basic concepts","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/basic_concepts/getting_started.html","locator":"AppDelegate, shared/platform code and design resolution","retrievedAt":"2026-10-07T20:09:34Z","id":"components","title":"Cocos2d-x main components","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/actions/","locator":"Time-based Node property changes","retrievedAt":"2026-10-07T20:11:18Z","id":"actions","title":"Cocos2d-x actions","kind":"vendor"},{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/docs/RELEASE_NOTES.md","locator":"Metal, CMake, API changes and removals","retrievedAt":"2026-10-07T20:09:06Z","id":"release","title":"Cocos2d-x 4.0 release notes","kind":"vendor"},{"url":"https://docs.cocos2d-x.org/cocos2d-x/v4/en/upgradeGuide/","locator":"Metal-capable Apple devices and rendering abstraction changes","retrievedAt":"2026-10-07T20:09:50Z","id":"upgrade","title":"Cocos2d-x v4 upgrade guide","kind":"vendor"},{"url":"https://github.com/cocos2d/cocos2d-x/blob/v4/licenses/LICENSE_cocos2d-x.txt","locator":"MIT terms","retrievedAt":"2026-10-07T20:09:34Z","id":"license","title":"Cocos2d-x license","kind":"vendor"},{"url":"https://github.com/axmolengine/axmol/wiki/Cocos2d%E2%80%90x-migration-guide","locator":"v4 migration, namespaces, type changes and tool limits","retrievedAt":"2026-10-07T20:08:22Z","id":"axmol","title":"Axmol Cocos2d-x migration guide","kind":"vendor"}],"overviewCitations":["repo","concepts","release"],"licenseCitations":["license"],"sections":[{"id":"scene","heading":"Scene-based development","paragraphs":[{"id":"scene-detail","content":[{"text":"The Director manages the active game flow, while Scene objects contain sprites, labels and other nodes needed for a screen or level. The scene graph organizes those objects into a tree that affects rendering order. These concepts provide a native code-based way to assemble game content rather than defining the whole application as one drawing function."}],"citations":["concepts"]}]},{"id":"project","heading":"Project organization","paragraphs":[{"id":"project-detail","content":[{"text":"The guide separates shared application code from platform-specific project folders. AppDelegate runs after the platform startup code and configures aspects such as the first scene and design resolution. This allows common game behavior to coexist with native integration, but screen sizes and platform startup still need deliberate handling. The documentation recommends checking the result across different device resolutions."}],"citations":["components"]}]},{"id":"actions","heading":"Actions and behavior","paragraphs":[{"id":"actions-detail","content":[{"text":"Action objects change properties on objects derived from Node over a specified period. A sprite can move to a destination or move by an offset without the application manually expressing every intermediate position. This behavior system is one part of the runtime architecture; it does not remove the need to write game rules, handle input and decide when those actions begin or end."}],"citations":["actions","concepts"]}]},{"id":"v4","heading":"Version 4 rendering changes","paragraphs":[{"id":"v4-detail","content":[{"text":"The v4 release centers on adding Metal for iOS and macOS and refactoring the renderer behind a backend layer. The upgrade guide requires Metal-capable Apple devices and describes changes to program state, texture representation and custom shader handling. Projects relying on direct graphics-API calls or deprecated interfaces may therefore require source changes even before considering a different engine."}],"citations":["release","upgrade"]}]},{"id":"scope","heading":"Platform and API boundaries","paragraphs":[{"id":"scope-detail","content":[{"text":"The repository lists native mobile and desktop platforms, but the v4 release notes remove the HTML5 engine, JavaScript bindings and SimpleAudioEngine. The repository also explicitly distinguishes Cocos2d-x APIs from Cocos Creator. Older tutorials or a shared Cocos name should not be treated as proof that these removed paths remain available, or that Creator projects are native Cocos2d-x projects. Current platform-store compliance has not been established by this documentation review."}],"citations":["repo","release"]}]},{"id":"license","heading":"Licensing","paragraphs":[{"id":"license-detail","content":[{"text":"The Cocos2d-x license permits use, modification and commercial distribution under MIT terms, including preservation of its notice. This covers the engine code rather than automatically determining the terms for every linked third-party component, asset or external integration. A maintained application needs to retain the applicable notices for its actual distribution."}],"citations":["license"]}]},{"id":"migration","heading":"Migration to Axmol","paragraphs":[{"id":"migration-detail","content":[{"text":"For teams considering a replacement, "},{"text":"Axmol","targetSlug":"axmol"},{"text":" provides a dedicated migration guide from Cocos2d-x. It focuses on namespace and type changes and offers include-conversion tooling primarily for v4 source. That evidence supports Axmol as a successor-style migration candidate; it does not establish the reverse relationship or guarantee unchanged behavior. Existing shader code, extensions and older Cocos2d-x versions require separate attention."}],"citations":["axmol"]}]}]},"id":"Q1248","revision":1296,"updatedAt":"2026-10-14T01:19:13Z","sourceUrl":"https://substitutefor.net/entities/Q1248?revision=1296"}}