Cocos Code IDE + Lua's first use of FastTiledMap, luafasttiledmap
Recently I want to play Lua and Cocos Code IDE, and I want to write a real-time combat, defensive, interactive, Foggy, and exploration topic (Narration: stop it for me !) Run the map game.
So I used Cocos Code IDE To write games, and there were a lot of challenges, but I like it ~
Stupid wood and flowers contribute, huh? Flowers? No, it's your heart ~
Reprinted please note, original address: http://www.benmutou.com/archives/1629
Source: dummies and Game Development
FastTiledMap
It is said that the Cocos2d-x3.2 version has a great new feature-FastTiledMap.
In version 3.2, TiledMap will automatically crop off-screen map grids to reduce the number of rendered objects and greatly improve the efficiency of the game.
I thought the default TMXTiledMap already has this function, but I found that it is not. I officially added a new TMXTiledMap class, which is cocos2d: experimental: TMXTiledMap.
In Lua, It is ccexp. TMXTiledMap.
An error will be reported if you use it directly.
The problem is that you can directly use ccexp. TMXTiledMap: create ("test. tmx"); No. An error is returned and the ccexp cannot be found.
After a variety of complex technical means (it seems that I am more cool ~), I have determined that cocos2d: experimental: TMXTiledMap is bound to lua.
But why not?
I suddenly thought, is it necessary to generate a runtime? It is very likely that this code has not been compiled, and some bindings have not taken effect.
Sure enough, it will be solved after runtime is generated.
As for why, I will not explore it this time ~
How to generate runtime
The method for generating runtime is very simple.
Right-click the project (Xiao RuO: Isn't it true? Right-click a wool bar !), Select Cocos Tools and find build runtime (my IDE version is 1.0.0RC0 ),
Then, you can basically continue the next step and click Generate,
Well, I haven't written an article for a long time, because I recently wrote a new game (well, maybe it will become very strange in the end, because I added everything I thought .. I just want to train my trainer)
Kneeling Cocos2dx/lua learning materials hope you can recommend more
Lua information is really not much in fact there is nothing to learn, the main or familiar with the syntax, the other is to call the Cocos2d-x inside the thing
Who is Lin Junjie's sister?
Jinsha
Blue feilin in 18-year-old sky
Together with JJ, she sang "wind-blown summer" and starred in this music video together with JJ. In addition to a special episode "Air", she also made a lot of KFC ads before.