I'm making a top-down 2D racing game and need to know how whether the player is trying to drive off the edges of the track. The track is oval and all I need to figure out is whether the player has gone from "on the track" to "not on the track".
Currently the track is a giant FlxSprite that covers the whole screen, and the player is a small FlxSprite.
So far I can think of two ways to do it
1. Have a collision bitmap and every frame test whether the point under the player is the "collision colour"
2. Somehow define the track as a polygon and do a point-in-polygon test
If option 1 is the best way, how do I actually do it? FlxSprites aren't really designed for having their bitmap data poked at, are they?