Hi,
I created a map with Tiled for a side scrolling space shooter consisting of 32x32 tiles and I’m looking for a way to set up collision detection for my space ship with parts of the background.
The standard method of giving tiles a value (like “blocked”) for those specific tiles that my ship collides with doesnt work very well here because the collision detection would be very unprecise.
For example with some tiles i want my ship only to collide with the rocky part (which is only half of the tile) and not collide with the other part.
So i thought about drawing polylines in my map over the parts where i want my ship to collide thinking I could use this polyline mapobjects to check if it overlaps my ship (just like you would with a standard rectangle overlap collision check).
There was a post I read here where someone used Intersector to check if 2 Convex polygons intersect:
http://www.java-gaming.org/index.php?topic=28930
First I thought that might be a way to do it but then i figured that my objects arent Polygons & they arent convex so I think i probably wouldnt be able to do it this way.
Does anyone have tips on how i should set up my Collision Detection?
Is it possible using polyline map objects? Or should I do it totally different?
Here is an Image of what a part of my map looks like and how i would want to draw my polyline boundries…