Page 2 of 2

Re: Car physics

Posted: Sun Apr 24, 2016 6:34 am
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

Re: Car physics

Posted: Mon Apr 25, 2016 8:24 pm
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!

Re: Car physics

Posted: Mon Apr 25, 2016 9:16 pm
by Psychophanta
Thank you applePi :wink:

Re: Car physics

Posted: Mon Apr 25, 2016 11:35 pm
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!

Re: Car physics

Posted: Wed Aug 17, 2016 7:27 am
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.

Re: Car physics

Posted: Tue Jan 03, 2017 2:59 am
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.