I'm interested in creating a 2D sidescrolling game with map design based on convex vectors instead of tiles (See "Type #4" in this article). This will be a challenge for me, and I have a few questions.
My first issue is with level design. The way I see it I'll need to do the following:
1. Design each level as a series of convex shapes for collision, overlaid with an image.
2. Save each convex shape as an array of points.
This would be very tedious, are there any map editors available that already do something like this?
My second question has to do with moving the player up and down slopes:
Collision detection and response should be no problem, but I'm not 100% sure about how a player would move up and down a slope. Currently, I would do it like this:
1. Determine if player collides with a polygon.
2. Determine between which two points of the polygon the player is colliding.
3. Modify player's Y-value based on the slope of that line segment.
Am I on the right track, or is there a better way to do this?
Would love any insight or links to articles on the topic. Thanks guys!