Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Car Principals

Author
Message
Redostrike
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 17th Mar 2006 17:37
Hi,

i was thinking the other day how car psychics can be programed in DBPRO (there are enough dbp projects that are car racing games).

So i was thinking of the car speed. Like when you press forward and hold it a variable is being counted if its like 100 the movment of the car will be faster so another variable is counted by 1. Lets see the car can drive 3 speed variables. When i release the forward button the car counting varible is being decreased. And so on. The opisite way of pressing up. Then there is something like a brake. Slowing down the car faster then not pusshing forward.

Now when i turn the car and still be holding forword i need to program "if upkey()=1 and rightkey()=1 then ...." this also whit leftkey and downkey in many orders.



Now my question is i'm i forgetting something. And is there a example of car principals that i can base my code on.

Thanks in advance.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland

Login to post a reply

Server time is: 2024-09-24 19:23:57
Your offset time is: 2024-09-24 19:23:57