Not sure how easy this is, but I'm trying to find a way to track a top-down objects movement path. I then want to check if it's just moved in a circular path and then run an event.
I was thinking I could somehow use the surface object, but I should note that I'm using Android and it's not available.
Track it's path? Do you mean like draw it's path on the screen? Or do you want to do pattern detection?
For the drawing you could just create a bunch of objects to represent the path of the object. Although I'm not sure how a android would handle this performance wise.
Pattern detection is a little more complicated. Also we need a little more info to decide how we should approach this. Should the object move in a perfect circle? Would a square work? Who is controlling the movement of this object? Is it random?
If the movement isn't random then you could probably get away with tying the pattern detection to whatever would cause the object to move in the desired pattern. (like a circle)
If the movement is random, then just keep a record of the last few positions of the object and then check if the points are equidistant from an average of all their positions. Based on how large of a circle you want to support simple adjust how far back you keep the old position data. You'll most likely need an array for this, especially if you have more than one object to track.
I need more of a pattern detection and the movement won't be random. The idea is that once you've performed a circular doughnut/burnout, then you get a bonus.
I've attached the source if you would like to take a look at it.