Car physics

Advanced game related topics
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: Car physics

Post by applePi »

@Psychophanta, if you are searching for a car then this car by Guillot in the french forum is very good http://purebasic.fr/french/viewtopic.ph ... 049159b62d , i just find it a few days ago, it has a springy wheels, i haven't studied it yet, the short code is always hard to decipher, it is like a zipped file.
to check physical effects such as adding additional weight try it with these changes:
in line 51: change SetEntityCollisionFilter(0, 1,2) to SetEntityCollisionFilter(0, 1,3) to allow the cubic weight to collide with the car and stay over it.
after line 80 add this cubic weight:
If KeyboardReleased(#PB_Key_Space)
CreateCube(220,0.2)
CreateEntity(220, MeshID(220), MaterialID(2),EntityX(0),EntityY(0)+1,EntityZ(0))
CreateEntityBody(220, #PB_Entity_ConvexHullBody, 1, 0.1,2)
SetEntityCollisionFilter(220, 1,3)
EndIf

now when you press space a cubic weigh will fall over the car and stay over it to test its behavior and other tricks.
for more info about SetEntityCollisionFilter look title : Entity Collision Filter and collision Mask http://purebasic.fr/english/viewtopic.p ... er#p466157
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Car physics

Post by Psychophanta »

Demivec wrote:
Psychophanta wrote:
BalrogSoft wrote:Hi, i will make a car game for mobile phones on next months, after make some research i ported a simple source code to PB, i didn't interested really to study car physics. I made some weeks ago a port of a car physics example from a java source, it isn't perfect, it have a bug when you break the car, but it could be useful to the community:

Car Physics example: http://www.balrogsoftware.com/download/carphysics.zip
No available file :?
It is available in the 'Internet Archive Wayback Machine'. :wink:
No correct link!
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Car physics

Post by Psychophanta »

Thank you applePi :wink:
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
Demivec
Addict
Addict
Posts: 4086
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Car physics

Post by Demivec »

Psychophanta wrote:
Demivec wrote:
Psychophanta wrote:
BalrogSoft wrote:Hi, i will make a car game for mobile phones on next months, after make some research i ported a simple source code to PB, i didn't interested really to study car physics. I made some weeks ago a port of a car physics example from a java source, it isn't perfect, it have a bug when you break the car, but it could be useful to the community:

Car Physics example: http://www.balrogsoftware.com/download/carphysics.zip
No available file :?
It is available in the 'Internet Archive Wayback Machine'. :wink:
No correct link!
For the navigationally challenged, here's an even more direct link to the WayBack archive!
User avatar
tj1010
Enthusiast
Enthusiast
Posts: 621
Joined: Mon Feb 25, 2013 5:51 pm
Location: US or Estonia
Contact:

Re: Car physics

Post by tj1010 »

FYI most big studios do it all in script so they can easily patch calibrations without dealing with AV and other executable policies and re-compiles.

Wheels are usually just animated textures or joint animated meshes and the driving is only physic vector values for the engine and axis-pivot for directional animation. If you ever get in to mesh deformations like persistent wreck damage things can get really hard, or rather, whatever something that takes buildings full of AAA game devs months or years to finish level difficulty, is.
The truth hurts.
coco2
Enthusiast
Enthusiast
Posts: 368
Joined: Mon Nov 25, 2013 5:38 am
Location: Australia

Re: Car physics

Post by coco2 »

I think you have to draw the line between realism and fun. I have BeamNG.drive running on an Intel Core i7 4790K and it has enough computing power to do 9 vehicles with the level of realism the game offers at 60 FPS. I find this takes away possibility for a fun game, but still it's extremely cool to see how the cars crash. I see it as more of a novelty or a training simulator than a fun car game.
Post Reply