I’m not sure where to put this exactly, but this forum seems to be the most appropriate.
I’m making a clone/update to the classic game Qix. The thing I’ve added is that when drawing, the player has simple verlet-based physics, so he slides around and makes curves and neat stuff like that. When not drawing however, the player is restricted to the outline of the shape he’s drawn. I keep the drawn area as a bitmap, so the more general problem is I want to keep the player in an area defined by a bitmap and allow for the player to slide along the edge of the area.
I’ve got an example below. The player - represented by the lovely Vanessa - moves downwards towards the black-off-limits area. She’s working under standard physics and accelerating as she goes (I’m still pushing the button). When she hits the black area, I want her to follow the curve (red arrow). I can get her to stop dead, but I can’t figure out how to get her to follow the curve.
Have any of you worked on a similar problem and can offer some help? This one puzzle’s had me stumped for a month or so.
Thanks,
Del.