I’m developing a tiledmap strategy game, but i get stuck on collision detection for weeks. I looked up some cocos2d-x examples, but i’m not really family with those languages, I tried so many times and still can’t find the way to detect collision. My sprites move from one tile to another, if there’s no enemy or wall in front of them.
Could some one show me a example, really really appreciate!
yes, my problem is “how to check whether there’s A WALL in front of it”. The wall is generate by Tiled Map Editor, it’s tileset has a property “collidable:true”. But i dont know how to get this value. It’s tiledmap collision detection that I dont know how to handle. Could you please show me how? A little showcase would be wonderful, Thanks!