I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
I am working a 2D racing game and I'm trying to figure out what is the best way to define the track. At the very least, I need to be able to create a closed circuit with any amount of turns at any ...