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.

DarkBASIC Discussion / Speed Dial

Author
Message
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 28th Oct 2004 23:36
Hi i am making a race car game. I need a simple code to display the speed. Like on the speed boat game that comes with dbc.

200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 28th Oct 2004 23:40
Why not have a look at the code that comes with that program? All it is is 2 plains, one of which rotates to show the speed.

AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 28th Oct 2004 23:43
i just want basic text.

200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 28th Oct 2004 23:52 Edited at: 28th Oct 2004 23:53
Well, its easy then, depending on how much you're moving an object at a time. This changes with speed. So if you're moving the car 1 unit at a time, you could be going 10kph, 2 units 20kph etc.

So declare a variable which holds speed in units, and then have something like

text 0,0,"Speed: " + str$(speed*10) + "Kph"

AMD Athlon XP2800+
GeForce FX5200 128MB
1.25GB DDR 333MHz RAM
Shadow Angel
20
Years of Service
User Offline
Joined: 28th Oct 2004
Location: UNKNOWN LOCATION
Posted: 29th Oct 2004 00:39
Hey sk8erboy, I thought you were making a tank game?


WWW.GEOCITIES.COM/PARABOX_STUDIOS :: Current Project - Future Rebel
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 29th Oct 2004 02:55
Yeh i am im also making a race game.

200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD
Pricey
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 29th Oct 2004 03:19
Lol, when I saw the title of this thread I thought it was something to do with the speed dial on phones

EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 29th Oct 2004 04:33
lol so did I, I posted the wrong name.

200GB HARD DRIVE 1GB RAM 256MB GRAPHICS CARD

Login to post a reply

Server time is: 2025-05-24 12:31:56
Your offset time is: 2025-05-24 12:31:56