Build a 2D mobile game that runs on both iOS and Android from a single C++ codebase.
Create a desktop game with physics-based gameplay using integrated Box2D or Chipmunk engines.
Develop an interactive app with sprite animations, scene transitions, and touch input handling.
Port an existing game to multiple platforms without rewriting the core game logic.
Requires C++ compiler, multiple platform SDKs (iOS/Android), and native build tools; cross-platform compilation adds significant setup overhead.
Cocos2d-x is an open-source, cross-platform game engine used to build 2D games, interactive apps, and graphical experiences. You write the game logic once in C++ (with optional bindings for Lua or JavaScript), and the same code compiles and runs on iOS, Android, macOS, Windows, and Linux. The engine handles the hard parts of game development for you: rendering sprites (the images that make up game characters and environments), managing scenes and transitions between screens, handling touch and keyboard input, playing sounds, simulating physics, animating skeletons, and more. Under the hood it uses OpenGL ES on mobile devices, standard OpenGL on desktop, and Metal on Apple platforms for hardware-accelerated 2D rendering. It includes integration with the Box2D and Chipmunk physics engines for realistic movement and collisions. You would use cocos2d-x if you are building a 2D mobile or desktop game and want a mature, production-proven engine with a large community behind it. It served as the foundation for the newer Cocos Creator editor-based engine. Note: the project's own README recommends that new users start with Cocos Creator rather than cocos2d-x for a more modern workflow. The existing engine is written in C++ and licensed under the MIT open source license.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.