Traveling along a 2D vector?? (HELP!)

Started by
-1 comments, last by Tane 21 years, 2 months ago
Hey, Can anyone help me out here? Since I am from a design backgroud, my programming skills suck, so please don't laugh if this is a simple problem (it is also 2.10am here, and I haven't had any coffee for hours!) I am programming a 2D racing game using SDL (similar to Mirco Machines or the origional GTA), and in it I have the players vehicle. I am using 8 directions for the car, so at the moment, when I press the left or right key it does a 45 degree turn. What I am now stuck on is how to get the car to travel back and forth along the vector of this direction. At the moment, it only turns, I don't even have any vector code in (as I am not sure how to do it) but once that is in the game should get much easier from here on in to code. (p.s. I am using Dev-C++ & SDL, so no Win32 code please!) Thanks! http://tane.cream.org [edited by - Tane on February 1, 2003 9:30:22 PM]

This topic is closed to new replies.

Advertisement