Page 2 of 2
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Oct 08, 2009 3:30 pm
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..
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Oct 08, 2009 4:44 pm
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.
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.
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Oct 08, 2009 5:09 pm
by dige
yeah, thats it! ... now it work like a charm - great work!
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Oct 08, 2009 8:10 pm
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
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Oct 08, 2009 9:29 pm
by Mistrel
Blue wrote:@All of you above: Are any running this on a 64-bit system ?
I am also running Windows 7 x64.
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Jan 12, 2012 9:49 am
by Kelebrindae
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Thu Jan 12, 2012 10:36 am
by Comtois
Excellent. Work fine here.
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Mon Mar 12, 2012 3:34 pm
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
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Tue Mar 13, 2012 2:27 pm
by Kelebrindae
applePi wrote:1-the exe file carphysics_x86.exe inside the zip file are for "Telluric Planet Generator v3"
Oooops!

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)...

(Edit: on second thought, I've just posted it here:
http://www.purebasic.fr/english/viewtop ... 12&t=49455)
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Mon Mar 26, 2012 3:06 am
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.
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Mon Mar 26, 2012 5:41 pm
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
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Mon Mar 26, 2012 8:20 pm
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.
DJ.
Re: [PB4.31] Car Physics (based on Marco Monster's Tutorial)
Posted: Tue Mar 27, 2012 9:11 am
by Kelebrindae
@Comtois:
you've just made my day too! Wow, that's a whole new world of possibilities.
Must. Test. Now.