Install cocos2dx or cocos2dx-js Install ndk Install sdk Install vs studio Run setup.py in the cocos2dx directory and fill in the paths of ndk and sdk according to the prompts Open the command wind
Category: Cocos2dx
Cocos2d-x is an open source mobile 2D game framework, released under the MIT license. This is a version of the C++ Cocos2d-iPhone project. The focus of the development of Cocos2d-X is the framework provided by Cocos2d-x around the Cocos2d cross-platform. Mobile games can be written in C++ or Lua, and the API is fully compatible with Cocos2d-iPhone. The Cocos2d-x project can be easily built and run on iOS, Android, Blackberry and other operating systems. Cocos2d-x also supports desktop operating systems such as Windows, Mac and Linux. Therefore, the source code written by developers can be easily edited and debugged in the desktop operating system.
[COCOS2DX_LUA] version 3.10 Version CJSON
Lua CJSON is a high-performance JSON parser and encoder provided by the Lua language. Its performance is 10 to 10 higher than that of the pure Lua library. 20 times.
The default directory of cocos
Pit in CoCOS2D-JS —- String Type Sensing. The string type in COOCS-JS must call Parseint to convert to integer, otherwise an error
The string type in coocs-js must be converted to an integer by calling parseInt, otherwise an error occurs
The string type in coocs-js must be called parseInt is converted to an integer, otherwise an error occurs
In order to give back to the majority of students, Zhijie class bought teacher COCOS2D-X courses to send COCOS2D-X books
In order to give back to the majority of students, Smart Classroom buys off the teacher’s Cocos2d-x course to get Cocos2d-x books 1. Any purchase of the following courses get a free book: 1, Cocos
Curve pull and curve connection under COCOS2DX
The picture above first shows this effect
The first difficulty in achieving this effect is to follow the curve path Stretch and pass a fixed point to draw a curve
Fortunately, someone h
COCOS-JS cannot use RemoveAllChildren, otherwise it will cause the touch priority when it is added again.
Solution:
1. Do not call removeAllChildren (not very good)
2. Before adding children again, put The parent element is not touchable: setTouchEnabled(false). After adding children, call:
COCOS2D-iPhone – How to determine if the elves are in the layer
Sorry if this sounds trivial. I just didn’t get it. How can I determine if a particular sprite already exists in the layer? Basically, I need to check this before deciding whether to add it to the
How to create a snake like a body in Box2D and Cocos2DX?
My job is similar to a snake. I want to make a snake body.
The game logic is like this:
The snake moves up and down. The movement should be like real snake movement.
Here, I was h
Cocos Lua creates a replacement picture
Transfer: https://www.cnblogs.com/SkyflyBird/p/7809675.html
About Sprite or ImageView to create pictures or To replace the picture, use cocos 2dx 3.10 lua:
One, sprite related
loc
COCOS2D-X Elf
Create a sprite You can use an image to create a sprite, PNG, JPEG, TIFF, WebP, these formats are all available, of course there are There are some other ways to create sprites, such as using atlas