Car physics ?

Advanced game related topics
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

But I would like to use Ogre engine. What about this?

http://walaber.com/?action=showitem&id=9

Could this be translated for our own needs???
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

Borrowed from Fred's ODE Code:

Code: Select all

    ; Box body is a bounding box body (more will come like sphere and capsule)
So Fred's on it .. for example with a capsule you will be able to do your wheels easly.

Currently if you want to fiddle out something id focus on the rest like the cars Body, movement, scenery and so on ( lots to trick about.. :lol: ) . Otherwise do it yourself you could probably use some hack inbetween frames aswell with a spherebody and limit its movements per frame ( hacky .. but i could imagine it could work ).

EntityPhysicBody():

Code: Select all

EntityPhysicBody(#Entity, #PB_EntityBodytype)

Bodytypes:
#PB_Entity_StaticBody 
Static body is trimesh based, so very precise

Note:
As far as i gathered static Body's are copyd in the static register where they remain in place. Due this not every vertex of all with the static colliding objects has to be compared each collision. This type is ideal for Scenery and Levelobjects that remain in place and where most precise calculations are needed. It seems this functions make use of the OGRE's internal Octree based Scenery system as even with complex models you get high fps rates.

#PB_Entity_BoxBody
Box body is a bounding box body
#PB_Entity_SphereBody
Sphere body is a sphere based body

About Walaber:
As you can see here theres a Wrapper for DBPro:
http://walaber.com/?action=showall&type=library

i could imagine if somone would want to port / write a wrapper for PB it would be usable, tho dunno what Fred's planning to implement later on yet.


As for storing Triangles in an external File ( if you want to fiddle out some yourself ). Comtois posted some nifty lil code he wrote along with an OGRE xml converter.

See here:
viewtopic.php?t=17978

Cheers,
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Thalius, thanks for this very usefull information.
(more will come like sphere and capsule)
Now that's cool. With this, the engine is 90% complete (at least i think so) :D
you could probably use some hack inbetween frames aswell with a spherebody and limit its movements per frame ( hacky .. but i could imagine it could work )
I thought at this, but i don't know how to limit it's moves on an axis. :( I hope Fred will release the capsule part in the next beta or the final version of PB4.0.

On the other hand, I could use Comtois's code to store the wheel's triangles, but how to make them collide with the ground plane??
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

I am now creating a wrapper for Newton. I'll post it here (if i ever) finish it.

Btw, I could use some help on making/translating some demos when the wrapper is done (my c++/DB knowledge is allmost 0) ;) Anybody wants to join?

RESOLVED!!!!
I get this error when trying to build:
viewtopic.php?t=19811
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

I was a bit dissapointed that Joints were not included in the OGRE/ODE update for PB4.

However I wanted to start playing with Physics in PB so had a look at all the wrappers available for other languages.

There is a great wrapper here http://www.lcuriel.arrakis.es/kode/index.htm

It includes a physics editor and:-

System Based on Entities
- Each Entity can have: Body, Geoms, Meshes, Joints, TriMesh
- All Ode Joints are supported (Contact Used during CallBack)
- All Ode Geoms are supported (Non Capped Cylinder via contrib)
- Can Import Meshes (So it is a World Editor too!)
- Full Support for TriMeshes
- Customizable ODE Params (steps, contacts, etc...)
- Direct Export to B3D code (Using own ODE Wrapper, i think that B+ is supported too)
- Direct Export to C++ Code (the Ode Part)
- More Support to Export if Asked.
- Suport for Hierarchy Models (must link in the Editor)
- RagDolls and Vehicles in the example library included.
- Online Library with free physics worlds for free!
- Exporter And Importer for XODE (XML - ODE format 1.0r23)

It costs 14,95 Euros and is worth every penny if you are interested in Physics and cannot wait until this functionality is in PB!

Try out the demo, all I had to do was convert the decls file to a PB include file with prototypes (can supply if u are interested!) and then change some of the Blitz code into purebasic code.

I currently have a nice Jeep which is drivable around the track in Fred's Circuit demo, which rocks!

I'll post a pic when I can, but none of the capture utilities can get a screenie for some reason, I'll have to write some code!

Oh, and if enough PB users buy this wrapper then Kurix might change the editor to output PureBasic code as well :D
Paid up PB User !
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

WOW, that's great. I am a bit dissapointed too. I 've downloaded ODE and looked at the functions and PB covers just a few ...
an supply if u are interested!
That would be awesome. Can you send me the source please? This would help me a lot...

BTW, if tou need any help, I could create a wrapper for ODE in no-time ;)
Thanks!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Pics :D

Image

Image

and yes, the tyres roll and it has a suspension (of sorts), I'm still very much newbie at this ODE lark, but I'm hoping to get better :)
Paid up PB User !
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Wow that's cool. Nice pics!!! Can you send me the include file please? I wouldn't like to wait until this will be implemented in PB...
Great work!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Pureabc
User
User
Posts: 76
Joined: Mon Jan 16, 2006 1:11 am

Post by Pureabc »

Great work, dontmailme, the pics are very impressive.
I have been looking for a Physics Engine to use with PB. The ODE seems very promising from your work.
Are you using the ODE dll or BlitzKODE.dll? Could you post the wrapper file?

Thanks.
:D
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Yeah, that would be great :D :D :D
BTW, Pureabc, i could make a wrapper for ODE.dll
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Pureabc
User
User
Posts: 76
Joined: Mon Jan 16, 2006 1:11 am

Post by Pureabc »

Alex,

A wrapper for ODE.dll would be excellent!!

Thanks.

:lol:
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Ok, i'm starting it now. But i need you to make me a favour for this :) Will you make/translate some examples for it ???
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Nik
Addict
Addict
Posts: 1017
Joined: Fri May 13, 2005 11:45 pm
Location: Germany
Contact:

Post by Nik »

Me wants to test drive dontmailmes example :roll:
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

That would be cool. I hope he'll release it soon :D
I tried to trick the sphere geometry collision, but no result :(. So i guess I'll have to wait until dontmailme shows us some action!!! (and of course until I finish the ODE wrapper :) ).
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Image
Image
Image
Image

I haven't seen such kart-games for a while. The last I've seen was Moorhuhn Kart. They don't need much physics.

Btw.: Played on a Notebook with VIA S3 Unichrome IGP (OpenGL 1.2)

:D
bye,
Daniel
Post Reply