Hi folks,
I know there are a ton of tutorials and examples on the web. But I am am looking for something very specific (I guess). Until now I always constructed my maps with tiles. With tiles collision detection can be handled pretty easy, because they are rectangles. In XNA/Mono one can easily check for collision via Rectangle.Intersects.
What I want to do now is to load entire sprites and use them as ground or walls. The problem is they are never a simple rectangle. In most cases those are shapes which consist of several rectangles.
Let's say the example below could be one of the sprites which represent the bounds for a platformer level:
Are there any techniques to detect collision for a shape like this? I mean sure I could find a workaround like defining multiple rectangles for a single shape.
I just wanted to make sure whether there is already a existing approach I could use for something like this.
As mentioned above my intention is to use this collision detection for a 2D platformer-ish game.
Any suggestions?