name: cocos2d-x description: "Provides comprehensive guidance for Cocos2d-x v4 game engine including scene graph, nodes, sprites, actions, animations, physics, rendering, shaders, and platform deployment. Use when the user asks about Cocos2d-x, needs to create games, implement game features, set up development environments, or deploy games to multiple platforms."
Use this skill whenever the user wants to:
To work with Cocos2d-x v4:
Identify the topic from the user's request:
examples/getting-started/about-engine.mdexamples/getting-started/quick-start.mdexamples/getting-started/installation.mdexamples/core/node-scene.mdexamples/core/sprite.mdexamples/core/texture.mdexamples/core/animation.mdexamples/core/action.mdexamples/core/label.mdexamples/core/scene.mdexamples/core/input.mdexamples/core/event.mdexamples/advanced/physics.mdexamples/advanced/rendering.mdexamples/advanced/shader.mdexamples/advanced/particle.mdexamples/tools/build-system.mdexamples/tools/deployment.mdLoad the appropriate example file from the examples/ directory:
examples/getting-started/about-engine.md - Engine overview and featuresexamples/getting-started/quick-start.md - Create first projectexamples/getting-started/installation.md - Environment setupexamples/core/node-scene.md - Node and Scene conceptsexamples/core/sprite.md - Sprite creation and manipulationexamples/core/texture.md - Texture loading and managementexamples/core/animation.md - Animation systemexamples/core/action.md - Action system and sequencesexamples/core/label.md - Label and text renderingexamples/core/scene.md - Scene management and transitionsexamples/core/input.md - Touch, mouse, and keyboard inputexamples/core/event.md - Event system and listenersexamples/advanced/physics.md - Physics engine integrationexamples/advanced/rendering.md - Rendering pipelineexamples/advanced/shader.md - Custom shadersexamples/advanced/particle.md - Particle effectsexamples/tools/build-system.md - CMake and build configurationexamples/tools/deployment.md - Platform-specific deploymentFollow the specific instructions in that example file for syntax, structure, and best practices
Each example file contains:
Generate C++ code following Cocos2d-x v4 conventions:
USING_NS_CC; for namespaceCREATE_FUNC() macro for create functionsReference the official documentation:
api/ directory for detailed API documentationexamples/ directory for code examplesUse templates when creating new projects:
templates/project-structure.md - Standard project structuretemplates/cmake-config.md - CMake configuration examplesCocos2d-x v4 supports:
cocos commandFor migrating from older versions:
examples/migration/ for migration guidesapi/ directoryexamples/ directorytemplates/ directorycocos2d-x, cocos2d, game engine, game development, C++ game, 2D game, cross-platform game, sprite, scene, node, action, animation, physics, rendering, shader, particle system, CMake, game framework, 游戏引擎, 游戏开发, 精灵, 场景, 节点, 动作, 动画, 物理引擎, 渲染, 着色器, 粒子系统