currently, I am working on a 2d rpg game which is similar to final fantasy 1-4. I can load up a tiled map and the sprite can walk freely on the map. However, I will like to create a wall for it to stop walking through it.
I created three tiled layer
Background, Collision, Overhead and one
Collision object layer with rectangles only.
"How do I handle collisions with the object layer in the tiled map?"
"Do I have to create every single rectangle that is in the object layer with
Rectangle rectangle = new Rectangle() and rectangle.set(x, y, width, height)in the code?"
Thank you very much in advance. Any help is greatly appreciated!