For the Operating Systems class, I'm going to write a planning simulator, Jurrasic Park.
The ultimate goal is that I have a series of cars on a given path, and passengers waiting in line at a certain place, so that these cars return so that they can be taken and taken on a tour. This will be a simple 2nd, top-down view of the track and cars moving along it.
Although I can easily code this without having to visually display anything, I'm not entirely sure that the best way is to implement a car moving along a fixed track.
To get started, I'm just going to use OpenGL to draw my cars in the form of rectangles, but I'm still a little confused about how to approach updating the position of the car and ensure its movement along the given path for the park theme being modeled.
Do I have to store the tops of the track in the list and each call update()move the cars one step closer to the next top?
source
share