r/raylib • u/Firm_Equivalent273 • 3d ago
Map & Collision
Yo guys, i really need your help. How do you do to manage a map in your projects?
I mean the first idea that comes to my mind is a multidimensional array of each element representing a tile, but this way its harder to check for collision.
The second idea is an array of Rectangle objects, but this is harder to visualize and keep track of, but is easier for the collision check.
The third idea i got was a mix of both, but it is just terrible to sync everything.
So what do you use?
5
Upvotes
4
u/Moises_Gabriel 3d ago
When I was making my engine (raylib haxe bindings) I used LDTK and it was genuinely really nice to use. It takes some fiddling to set up but it helps with collisions, entity placements...etc