Hello
I am making a platformer game with my friends and i am looking into ways of making a map. Last year we made something very simple where the map was made from sf::Rect object, and we detected collisions using the intersects method.
We can do that again, but i am also interested in a tileMap using a vertex array. I dont want to use too much time just trying it and not getting it to work, so here is my question:
Is there any way to detect collision with distinct quad vertices inside the whole vertex array, or can you only get the outer bounds of the whole thing?
Just so you can easier understand my question:
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 1 1 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1
This represents the tilemap. The number 1 will create a quad with a texture and the number 0 will create a quad with no texture, so its transparent.
Is there a way to collide with only the '1' quads and not the '0' quads?
As i said, its no biggie if this wont work, i can just use a similar approach with sf::Rect's instead.