Cocos2d-x C++ game framework with scene graphs, sprites and actions for native mobile and desktop applications.
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.[1] [2] [5]
Contents Scene-based development 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.[2]
Project organization 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.[3]
Actions and behavior 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.[2] [4]
Version 4 rendering changes 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.[5] [6]
Platform and API boundaries 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.[1] [5]
Licensing 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.[7]
Migration to Axmol For teams considering a replacement, Axmol 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.[8]
Also included: 4 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.