There multi ways eg
Define the shape as a polygon then transverse each point @ x amt of time
|
So wondering how would I make something like this:
- a path with a dot travelling it. (the speed of the dot is set by setting the time it takes to complete the path)
There multi ways eg
Define the shape as a polygon then transverse each point @ x amt of time
Well there are no "real circles"... they are just polygons with many, many sides. In computers you're restricted to pixels and reality you are restricted by Planck's constant.
Personally I've done very little work with graphics or animations, but you could have a collection of the possibly x/y points that this rink contains, and then just draw your character over x/y points
In the most simple form it would be something like
Code:sleep = TRACK_TOTAL_TIME/list.size() Iterator<Point> iterator = list.iterator() while(iterator.hasNext()) { Point p = iterator.next() redrawDudeAt(p) Thread.sleep(sleep) }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |