The Daily Click ::. Forums ::. Klik Coding Help ::. realistic driving physics?

Post Reply  Post Oekaki 

Posted By Message


15th September, 2003 at 03:45:40 -

is it possible to make tgf games with realistic driving physics?
If so, how?

hahahahahaha chortle


15th September, 2003 at 10:23:45 -

Do u mean like with sliding around corners and stuff?


Arf :: FPP Games

15th September, 2003 at 13:01:57 -

It's certainly possible in MMF. For TGF, check out Tigerworks' simple example of 360 degree car movement on his website (, but I think if you want anything especially realistic you'd need to use MMF. It'd be good if someone could prove me wrong though...


Shme (Stupid Liar)

Too late to fornicate

16th September, 2003 at 04:28:52 -

i think that the car physics alone are not that hard, but if you are making a game with more cars it will be hard to do realistic collisions. most of click games only bounce or stop the cars that collide.

Stinkiest click stuff

Jimmy Brzezicki

20th September, 2003 at 10:59:55 -

Ok, here's a quick but oh-so effective way. You have 2 objects, one represents the driving force (racecar movement), the other the drag (Bounceball movement). The drag is set so that when is doesn't overlap the driving force, and it's speed is less than that of the driving force, it adds one to it's speed. It also always looks in the direction of the driving force, so in effect it will follow it around. Now you make both of these invisible and create your graphical car (Static) and set it to the average of these possitions ((rag+rive)/2 etc) and make it always look in direction of the driving force. Presto- quite good driving physics, complete with skidiness (which works especially well on corners). Collisions are a nightmare though, but there are ways round this.

Why the hell am I on the computer at 1 in the morning? No, don't answer.



VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
20th September, 2003 at 11:46:32 -

Theoretically, a semi-realistic (barely noticable) shouldn't be too hard. Just keep track of the following things:
- Car weight
- Engine power
- Acceleration (based on car weight & engine power)
- Inertia (for curves and stuff)
- Deceleration (based on weight & friction/brakes)
- Momentum (weight*speed, more for crashes)

Yep, that's about it. Harder to do than it sounds, but not that tough. Two active objects and a lotta alterable values should do the trick.

Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.



23rd September, 2003 at 09:24:56 -

hey Jimmy Brzezicki,
can you re-phrase some of those instructions, they didn't quite make sense to me. Thanks for all the sugestions guys

what happened to my other profile?

Jimmy Brzezicki

23rd September, 2003 at 15:53:05 -

Sure thing. Glad to help. Basically, you want a race car object, and a bouncing ball object. Tell the bounceball that when it doesn't overlap the racecar (if your using TGF, tell me if you're on KnP-there are ways round this) and it's speed is less than that of the racecar, then add one to speed. Tell the bounceball to stop when the two overlap. Then make them both invisible, and make a new object that actually looks like a car (the others should probably just be circles)but it should be on static movement (none) and always set it's X cooordinate to (Xracecar+ Xbounceball)/2 and Y coordinate to Yracecar+ Ybounceball)/2. Lastly tell it to always look in the direction of the racecar movement object. Hope that helps.

Why the hell am I on the computer at 1 in the morning? No, don't answer.

Assault Andy

I make other people create vaporware


Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
25th September, 2003 at 20:31:36 -

Jimmy - That method doesn't work to well, and you forgot to include that when the two objects aren't overlapping each other, then start the movement of the bouncy ball drag. Because otherwise it doesn't go anywhere. Also you need to make the bouncy ball always look at the racing car which you said in your first post of the technique. I find this doesn't work very well but if you can show an example or something - maybe i'm doing it wrong.


Creator of Faerie Solitaire:
Also creator of ZDay20 and Dungeon Dash.

Post Reply



Worth A Click