[PB4.31] Car Physics (based on Marco Monster's Tutorial)

Advanced game related topics
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by dige »

Can't also play the game. Seems that after start the cars is falling to heaven.
For a microsecond there I can see a circuit wich disappears very fast..

may be it would be usefull to have a home key, to reset all settings..
Kelebrindae
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 01, 2008 3:23 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Kelebrindae »

@dige:
The problem you describe looks like a bug in the calculation of the loop duration, just as if this value (the number of milliseconds between each loop) was negative, which should be impossible unless you travel in time and/or execute the program inside a supermassive black hole. :wink:

Please try to disable the Hi-Def timer by setting the constant #HIDEFTIMER to #False => this returns to the good ol' "ElapsedMilliseconds", which is more predictable.
dige
Addict
Addict
Posts: 1391
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by dige »

yeah, thats it! ... now it work like a charm - great work!
Helle
Enthusiast
Enthusiast
Posts: 178
Joined: Wed Apr 12, 2006 7:59 pm
Location: Germany
Contact:

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Helle »

Now at home I tested with 64-bit: Works fine!
@:Kelebrindae: Very good!
@:Cpl.Bator: If you use the code from this thread, you need the sub-folder GUI and media!
Remark: The ATan2-procedure is only for PB!

Gruss
Helle
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Mistrel »

Blue wrote:@All of you above: Are any running this on a 64-bit system ?
I am also running Windows 7 x64.
Kelebrindae
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 01, 2008 3:23 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Kelebrindae »

I've updated the code for PB4.60, here:
http://keleb.free.fr/codecorner/downloa ... hysics.zip
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Comtois »

Excellent. Work fine here.
Please correct my english
http://purebasic.developpez.com/
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by applePi »

thank you Kelebrindae , thats a great demo. and very usefull
just a few trivial notes
1-the exe file carphysics_x86.exe inside the zip file are for "Telluric Planet Generator v3" and its picture here:
http://s16.postimage.org/igvf54885/planet_gen.jpg
2- in the compiler options there is a check to use JOYSTICK.ICO wich i don't have.

at last that "Telluric Planet Generator v3" seems gorgeous, are there its source here?
thanks
Kelebrindae
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 01, 2008 3:23 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Kelebrindae »

applePi wrote:1-the exe file carphysics_x86.exe inside the zip file are for "Telluric Planet Generator v3"
Oooops! :shock: What a strange mix-up... But it's fixed now:
http://keleb.free.fr/codecorner/downloa ... hysics.zip
(and I've included joystick.ico in the zip)
applePi wrote:at last that "Telluric Planet Generator v3" seems gorgeous, are there its source here?
Not yet, because it's unfinished and I've been unable to fix the few problems I've stumbled upon (namely, the seams between the heighmaps)...
Image (Edit: on second thought, I've just posted it here: http://www.purebasic.fr/english/viewtop ... 12&t=49455)
d.j.peters
User
User
Posts: 10
Joined: Sat Dec 10, 2011 7:53 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by d.j.peters »

hello Kelebrindae
I read your version of simple car physics,
good job.

I'm working on simple car physics too.
Here are one video (the first in the list) if you like.

Next step are the OpenGL car rendering engine.
(I posted a demo today)

Normaly i would use OGRE with PureBasic but the most important command
from the physics engine are missing or it isn't documented. (I don't know)

In car physics you have to apply forces and impulse on any point of the rigidbody
but with PB OGRE you can only add forces or impulse to the center of mass :(

How ever it's fun and i like your demo.

DJ.
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Comtois »

d.j.peters wrote:
Normaly i would use OGRE with PureBasic but the most important command
from the physics engine are missing or it isn't documented. (I don't know)

In car physics you have to apply forces and impulse on any point of the rigidbody
but with PB OGRE you can only add forces or impulse to the center of mass :(
It isn't documented , you can try this syntax
ApplyEntityImpulse(#Entity, x, y, z, px, py, pz)
ApplyEntityForce(#Entity, x, y, z, px, py, pz)
px, py, pz : position
Please correct my english
http://purebasic.developpez.com/
d.j.peters
User
User
Posts: 10
Joined: Sat Dec 10, 2011 7:53 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by d.j.peters »

Comtois wrote:It isn't documented , you can try this ...
you made my day, thank you very mutch.

But how do you know about none documented command and there are more ?

edit:
I found it out self by looking to the pb lib's with an hex editor. :wink:

DJ.
Kelebrindae
Enthusiast
Enthusiast
Posts: 151
Joined: Tue Apr 01, 2008 3:23 pm

Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)

Post by Kelebrindae »

@Comtois:
you've just made my day too! Wow, that's a whole new world of possibilities.
Must. Test. Now.
Post Reply