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 Professional Discussion / some questions help please

Author
Message
younis12
16
Years of Service
User Offline
Joined: 23rd Feb 2010
Location:
Posted: 23rd Feb 2010 18:28
hi 2 everyone
first i want say thanks to all who worked hardly for making this great site and still working for it.

iam making a simple car game and i have some questions

1- i want to know how i can walk along the object?
(collision object is on)

2-how i can use the same key twice?
like(spacekey for song on \ space key for song off)

3-how can i flip object's rotation when it moves back?
like (any car game)


and thanks again
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 23rd Feb 2010 19:37
1- I'm not sure what your asking.
2- Make a variable like:

3- I think I know what your asking..... If you rotate an object, then the "foreward" direction has been rotated already. If you mean it's direction of momentum, then you have to make another vector to account for that.

4- Try to be more specific in your questions.... Give code if you think we might not understand what you mean....

The fastest code is the code never written.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 23rd Feb 2010 20:22
3- I can help you with this. What you want is when the car backs up it turns around. Simply make a variable that =1 when the car is going backwards and =0 when forwards. Then, when that variable =1 then just rotate the car 180 degrees.

If it hasn't exploded yet, I haven't touched it.
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 23rd Feb 2010 22:12
1- You should search the forum for "sliding collision" or something along those lines. High chances are you'll run across Sparky's DLL.

Cheers!
Sven B

younis12
16
Years of Service
User Offline
Joined: 23rd Feb 2010
Location:
Posted: 24th Feb 2010 08:23
ok (Madscientist) but can you give me the code

what i mean about my first question is how i can move the car along the object like any car game when you move along the walls

it dont matter in the actions game because you are walking and it something usuall you stop when reach the wall



another question
i have a 3d object (.x) how i can make collision for it with the player car
(the 3d object is a bus)

thanks for all of you
Sven B \ Madscientist \ Hawkblood
younis12
16
Years of Service
User Offline
Joined: 23rd Feb 2010
Location:
Posted: 25th Feb 2010 19:00
can you help me please

Login to post a reply

Server time is: 2026-07-27 13:07:22
Your offset time is: 2026-07-27 13:07:22