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 / Race car collision

Author
Message
Stora tomtefar
20
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 1st Aug 2005 19:23
The basic collision event in wich the moving object 1 collides with object 2, resulting the stop of object 1, is already familiar to me. Although, this doesn't suit a car game, right?
I want my car to slide on the wall, so the speed is the same, but it doesn't go through the wall. I think most of you have played car games, I think you know what I mean.

How can I do this in darkbasic?

"Even though I'm ugly, I'm extreamly sexy!"
r333
19
Years of Service
User Offline
Joined: 18th Jul 2005
Location:
Posted: 1st Aug 2005 22:51 Edited at: 1st Aug 2005 22:57
See My post below

Thanks!(for..whatever it is you did...)
r333
19
Years of Service
User Offline
Joined: 18th Jul 2005
Location:
Posted: 1st Aug 2005 22:56
Wait a sec, I understand now. OK, you would want to store the objects location in a variable, then, when the object hits the wall, make changes to the variable's location, keeping it barely to the side of the wall, so it appears as if the car is sliding against the wall.

Thanks!(for..whatever it is you did...)
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 1st Aug 2005 22:56
Stora tomtefar,

Do you know any physics? If not, go to your local library and see if they have the book, "Understanding Physics", by Issac Asimov. Just a hinter. It helped me greatly, and quickly. He realy lays it out simply, and to the point.


+NanoBrain+
r333
19
Years of Service
User Offline
Joined: 18th Jul 2005
Location:
Posted: 1st Aug 2005 22:57
Physics are fairly hard to implement in DarkBASIC though, aren't they, nano?

Thanks!(for..whatever it is you did...)
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 1st Aug 2005 22:59
r333,

They are only hard if you do not understand them. It is all math. So, if math is hard to you, then it will be hard to implement physics into DarkBasic.


+NanoBrain+
r333
19
Years of Service
User Offline
Joined: 18th Jul 2005
Location:
Posted: 1st Aug 2005 23:01 Edited at: 1st Aug 2005 23:02
No, Math isn't too difficult, I'm in the top of my class, I've just never tried to implement them in darkBASIC. It seems like overkill when I don't need them for the games I'm making, but I see your point. I guess for some people, it would be more challenging. Thanks.

Thanks!(for..whatever it is you did...)
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 1st Aug 2005 23:10
r333,

If they're not needed, don't use them. However, math is a buddy in complex situations.


+NanoBrain+
r333
19
Years of Service
User Offline
Joined: 18th Jul 2005
Location:
Posted: 1st Aug 2005 23:19
You are absolutely 100% correct. Math has gotten ma out of no less than a dozen programming jams. Including the one 5 minutes ago.

Thanks!(for..whatever it is you did...)
Stora tomtefar
20
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 1st Aug 2005 23:39
Nice dialog you to have there

Anyway, you both get my point, but I don't get what you, Nanobrain, mean with Physics? Could you explain more how you mean? Like, the physics of a ball bouncing up and down and the equation for that? If that's what you mean, then I know some small things, the basics. I'll see if the library have that book

So, I guess you don't have any usefull code for me, then?

"Even though I'm ugly, I'm extreamly sexy!"

Login to post a reply

Server time is: 2025-05-22 12:51:16
Your offset time is: 2025-05-22 12:51:16