Cocos2d-x provides us with a wealth of test examples, these test examples are the engine development process in order to test the correctness of the engine code, it is also a good example of how to use each part of the demo engine. Open the Cocos2d-x solution under the build folder under the cocos2d-win32.vc2012.sln root directory, set the cpp-tests project in it to the startup project, and then you will be able to see a demo of many engine features.
The code for this project demonstrates many of the standard usage of the Cocos2d-x engine, covering almost all the features of the engine, which is of great reference value.
Summary in these articles, we briefly introduced the Cocos2d-x game engine and successfully ran the first Cocos2d-x-based game. Although this game does not have any functionality, we have opened the door to Cocos2d-x game design. The following describes the main knowledge points involved in this chapter. Cocos2d-x: Cocos2d-iPhone-based multi-platform two-dimensional game engine, for developers encapsulate powerful graphics code, so that developers focus on game development rather than graphics operations.
AppDelegate: A program entry file in a Cocos2d-x project that provides control over the lifecycle of a program.
Game elements: any element that can be presented, such as scenes, layers, and genie.
Node: addChild method: Used to add a game element to another element. When creating a layer or scenario, you usually initialize your game elements, define some special effects, or combine other game elements, the addChild method is used to combine game elements. Later we will see how simple and expressive this architecture is.
So far, we have understood some of the basic features of Cocos2d-x game design, Cocos2d-x game design door has been open to us, there are more, more exciting features waiting for us to explore.