Three days of track manager
|
Three days without a blog post but our work efforts are starting to take shape. The efforts that is, the results are still a bit lacking. x = f_radius*cos(f_rotation); x and y are variables of a Vector3 which describes the obstacles’ positions in the game space. The z variable is simple set to be at the the length of one track node multiplied by the numbers of track nodes which should pit it well outside the outer edge of the camera’s frustum. The track function works in a similar fashion but a bit simpler as it does not have to keep rotation in mind. A Vector3 is created and set to be equal to the track object at the end of the track list. Then the z value has the length of a single track segment added to it. This function works regardless of where the center of the object is. In addition i added an Enum variable with it’s own get and set functions to the game_object class for easier identification later. right now we only have the PLAYER, OBSTACLE and TRACK objects but this should be helpful especially for collision later. I used the same method in my summer project and had good results. It’s gonna be a cramped couple of weeks but i hope we’ll be able to finish the game until the end on the 16th. If we’re really lucky we might not have to write our reports until after the hand in. The part and 2 assignments should be finish-able as well but i’d rather have to complete them after the course than this project. |