Hi all,
I'm writing my first game using Gideros and it's been a great journey so far. I'm using Tiled and I've come to the stage where I want collectables or certain tiles to be removed off the screen. Is this possible?
I've thought of just adding collectables as objects and then looping around the object layer in code and drawing the sprites. I was just wondering if there was a way to draw and remove from the tiled layer?
Thanks!
Comments
However if you want animated tiles or collectable objects your probably better off either having them as a separate layer in tiled, or placing them as objects and then building up a list of sprites and dealing with them separately (remembering to make them invisible when they go off screen for performance reasons).
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
As @techdojo said, put collectable / movable objects on a separate layer.
I also create a separate map sized array with the objects (usually a tile index) placed into it to make it easier to check if there is something on or near a certain tile. You then know which tile you have to remove from the object layer so calculating the tile offsets within your texture is made easier.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Need to crack on now as I want to get some feedback off a bunch of indies tomorrow!
Twitter: http://twitter.com/anefiox
Google Play: https://play.google.com/store/apps/details?id=com.anefiox.rainbowball