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 / A little help :-)

Author
Message
Bob_42
19
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 15th Sep 2006 20:12
i'm new here, but i have had darkbasic for a while, i've started making my first proper game, but i've run into a small problem...

well, with out going into the details of the game, i need to know how to make the vehicle leave the surface of the ground when the ground is at a certain height, i.e if the vehicle went over a bump it would lift off the ground and lower in an arced motion...

help would be grately appreciated
SimSmall
21
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 15th Sep 2006 23:15
Your post is too vague - no one can really help you unless we see what code you've already got in place, such as the code keeping your vehicle on the floor, then that can be adapted to allow for bumps...
Legend
19
Years of Service
User Offline
Joined: 2nd Sep 2006
Location:
Posted: 16th Sep 2006 13:18 Edited at: 16th Sep 2006 13:22
k you have gravity, the cars Y value will decrease every loop... EVEN if on the ground, then if it goes below ground height, update the Y value to the current Ground level, simple . This way when the Y level is higher than the Ground level it decreases until the Car hits the ground again =D Hope that helps mate.


arced motion? Well now.. you could have it if the car is going faster the long air time it can have =). Or you can have some jump code, meaning it calculates the speed + angle of the car when it leaves the ground. Then you can create the code to allow th car to go up in the air depending on that calculation, BUT remember to have the car also head back to earth don't want it to keep going up to it see's the stars hehe
Bob_42
19
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 16th Sep 2006 18:22
thanks for that, it worked perfectly
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 17th Sep 2006 02:49
Quote: "Your post is too vague - no one can really help you unless we see what code you've already got in place, such as the code keeping your vehicle on the floor, then that can be adapted to allow for bumps..."


Or you do not know how? Seemed fine to me.

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
Bob_42
19
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 19th Sep 2006 21:06
ok, i have another question, is it possible to have a command bar, like in cnc generals, without the game lagging like crazy?

becuase i tried just using a sprite, and you couldn't move because of the lag, so is there a better way?

help will be grately appreciated
SimSmall
21
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 25th Sep 2006 10:42
Well, this is a little old now, but I'm now busy at uni...

...if you'd compared it to the RA2 bar, I'd say, use the 2D, image and animation commands... but I don't care much for generals... It still won't be as smooth as you like though
Bob_42
19
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 25th Sep 2006 19:24
so there is no way of making a fluid game with command bar then?

i think i'll just have a pause menu with all the options on then

Login to post a reply

Server time is: 2026-07-07 21:10:06
Your offset time is: 2026-07-07 21:10:06