When I have 100's of animated sprites it seems TNT Animator slows down. I will probably switch to swapping tiles to see if that is faster. Yeah, I probably shouldn't have 100's of animated sprites, but yeah.
When I have 100's of animated sprites it seems TNT Animator slows down. I will probably switch to swapping tiles to see if that is faster. Yeah, I probably shouldn't have 100's of animated sprites, but yeah.
Ah that's an interesting solution. Hadn't considered that. I'll test it this afternoon.
Of which? For the TNT Animator sprites I just make sure the tile map is set to a blank tile and I put the sprite on top of the tile map. For switching out tiles quickly I just use TileMap:setTile() and I call it at a set interval, just like the Bird example that comes with Gideros.
It may also be better to use the Mesh API and change the texture to animate, there may be less of an overhead.
I have no idea what the mesh API is. I assumed it meant we could import 3d meshes and use them in 2d. I guess I should go read the release notes for the version that introduced meshes.
tnt animator for change frames use movieclips and as said by @atilim it already uses internally Mesh. so i think using mesh api (from lua code) is not faster.
TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! - www.tntengine.com
Another idea (depending on how many tiles you wish to animate) is simply use the tile as a marker and then before your game starts parse the tiled map data and look for any markers and then create a normal sprite object. You can then move this object around the "game world" so that it always appears in the same place on the map and should look just like a part of your map is animating.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Another idea (depending on how many tiles you wish to animate) is simply use the tile as a marker and then before your game starts parse the tiled map data and look for any markers and then create a normal sprite object. You can then move this object around the "game world" so that it always appears in the same place on the map and should look just like a part of your map is animating.
I just move my map (subclass of Sprite, it contains the TileMap) with setPosition.
Comments
i think is not possible at the moment....
...right ? :-?
www.tntengine.com
http://www.giderosmobile.com/forum/discussion/1476/is-constantly-using-tilemapsettile-a-good-idea#Item_4
When I have 100's of animated sprites it seems TNT Animator slows down. I will probably switch to swapping tiles to see if that is faster. Yeah, I probably shouldn't have 100's of animated sprites, but yeah.
Likes: Tom2012
My apps: http://www.yummyyellow.com
which device are you trying?
www.tntengine.com
Just a suggestion of course
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Thanks
My device is an iPhone 4.
My apps: http://www.yummyyellow.com
My apps: http://www.yummyyellow.com
www.tntengine.com
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
My apps: http://www.yummyyellow.com
You can use TileMap:getTile and TileMap:setTile to animate
Heres a quick hack of an old demo I put up now with an animated tile
cheers
evs