A TMX animated tile support for Cocos2d-x

I’m using Tiled with Cocos2d-x. Since Cocos2d-x still not supporting animated tiles in its TMXTiledmap class and I really need that, I finally wrote an extension myself…

The extension provided a new class: TMXTiledmapEx, it’s a substitution for cocos2d::TMXTiledmap and supports tile animation. It’s written in C++ and still uses the optimized render method of Cocos2d-x. No additional drawcall needed. It doesn’t like the js version for cocos on github, it contains animated tiles in layer-level. It still has room for optimization and I’ve already had a plan on it.

2 Likes

That’s great, thanks for sharing!

Did you consider doing a pull request to cocos2d-x to add native support for animated tiles?

1 Like

Yeah, that’s the best choice. I’m trying to do that, since it takes effort to satisfy the engine’s requirement for performance, integrity and something else,it may cost some times.

1 Like

If you post a URL by itself on a line, it should get the onebox treatment automatically, e.g.

2 Likes

Got it. Thanks a lot!

1 Like

Good News! Cocos2d-x merged my work, now it has native support for animated tiles.

2 Likes

That’s awesome work, @DEAGS3000, thanks for putting in the extra effort!

2 Likes

Thank you, it helps a lot! It could work on cocos2d-x 4.0., it seems cocos2d-x 4.0 does not have native support for animated tiles. Though what I really need is animated Object. I did not need to make much change to make it work.

1 Like