Tile Collision Assistance

Hi there,

I have been stumped with tiled + libgdx based collision lately. I tried using dermitfans method of doing things, however have experienced issues and would like a simpler method. Asking around, I have heard of using an array[col][row] for finding tiles in a tile map, though I am not sure how to implement this.

Col = X, Row = Y. (The forum formatting was being weird… )

My assumptions would be:
• Set Array[col][row] for tiles in tile map.
• Find all with property “blocked”.
• If player collides with tile that is “blocked”, check side and move back one tile in opposite direction.

This, I have heard, provides a very smooth and easy collision system and appearance, so I am anxious to learn how to do this. Please help if you can. :slight_smile:
I would really love for some pastebin examples on setting this up. Let us code together. :slight_smile:
Thanks,

  • A