PureBasic Forum
https://www.purebasic.fr/english/

Car physics
https://www.purebasic.fr/english/viewtopic.php?f=16&t=25481
Page 2 of 2

Author:  applePi [ Sun Apr 24, 2016 6:34 am ]
Post subject:  Re: Car physics

@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 viewtopic.php?f=36&t=62381&hilit=SetEntityCollisionFilter#p466157

Author:  Psychophanta [ Mon Apr 25, 2016 8:24 pm ]
Post subject:  Re: Car physics

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!

Author:  Psychophanta [ Mon Apr 25, 2016 9:16 pm ]
Post subject:  Re: Car physics

Thank you applePi :wink:

Author:  Demivec [ Mon Apr 25, 2016 11:35 pm ]
Post subject:  Re: Car physics

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!

Author:  tj1010 [ Wed Aug 17, 2016 7:27 am ]
Post subject:  Re: Car physics

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.

Author:  coco2 [ Tue Jan 03, 2017 2:59 am ]
Post subject:  Re: Car physics

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.

Page 2 of 2 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/