Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Tod Baudais, posted on June 21, 2001

Image Description, by Tod Baudais

This IOTD shows the Physics Simulator/Game Engine that I have been writing in my spare time for a little more than a year. The first image shows the truck flipped over in the lowlands and the kinds of problems I am running into because my tires aren't rigidly connected. The second demonstrated lens flare. The third shows a bunch of tire tracks (the brown stuff). The fourth shows a different truck pushing around a ball.

Images really don't show this thing in action. The Truck has full suspension and is actually pretty neat to drive. The demo can be found at It requires a fast G3 or G4 Macintosh.

Quick list of features:
  • Very extensible C++ design with minimal platform dependency
  • Accurate physics including:
  • real friction (not some hack)
  • collision detection/response (simple spheres for now)
  • constraints like spring, damper, gravity, etc. (no rigid connections yet)
  • Landscapes
  • Geo-Mipmaps
  • LOD morphing
  • Textures generated on the fly from 5 source textures & Perlin Noise
  • Landscape streaming
  • Quadtree rendering
  • Tire tracks and rub marks
  • Lens flare
  • Multiple light sources
  • Skybox
  • QuickTime Support for texture loading
  • OpenGL

  • [prev]
    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

    June 21, 2001, 08:45 AM

    Wow, that looks great. I love those huge tires on that truck :) How are you texturing
    the terrain?



    June 21, 2001, 08:54 AM

    Looks nice!

    When's the PC port?! ;-)


    June 21, 2001, 09:30 AM

    hey, that looks cool !

    i think that's the first time that i see a not overused lens flare, not to say that the others were not cute, but this one is quite realistic ...

    and how do you make the tire tracks ? are you patching the texture or adding some polys to the landscape ?

    anyway it seems that your car is like a bouncing ball, must be funny :)


    June 21, 2001, 09:33 AM

    That looks really nice :)
    I wanted to do that in my spare time, but have never gotten around to it. I figured a simple spring system would work, but than how do I do the math for the spring system. Looks cool keep working on it!


    June 21, 2001, 09:35 AM

    Looks nice. I wish I had a Mac so I could preview the demo. :-)
    What's Perlin Noise? I haven't heard of it before.

    Morgan Aldridge

    June 21, 2001, 10:04 AM

    Wow, two Mac IOTD's in a row! And both frequenters of, no less! Very cool images, I'm about to start up work on my engine again, don't know how I'm going to get cool stuff into it like you have ;) Keep up the good work!



    June 21, 2001, 10:17 AM

    Can we have a detailed explanation of your Car physics?

    Nice pics!



    June 21, 2001, 11:24 AM

    Tres Tres Tres Cool..!
    (Eventhough the lightsource of the lensflare is in front of the mountain)
    Reminds me of Monstertruck Madness, but with a cooler landscape!

    But still, Macs suck..! :-) :-)


    June 21, 2001, 12:33 PM

    Cool! I just bought new tires for my Jeep.. and I bet the tires on this truck cost a FORTUNE!

    Anyway, I think this is a great IOTD and a very valid use of spring systems. I wish more games would use a dynamic simulation system in their games especially for character movement and response.. because keyframing looks like A$$ and motion capture has many problems.

    take a look at for some current research in this area.


    June 21, 2001, 01:48 PM

    I think it is very hard to code a physics simulator engine like this.


    June 21, 2001, 02:10 PM

    I love your "Hidden" comment :)


    June 21, 2001, 02:18 PM

    Tried the demo, very cool :) Sounds weird, but nice friction :).



    June 21, 2001, 04:04 PM

    Oh yeah it would be even cooler if it had sound fx of some sort.

    dan ogles

    June 21, 2001, 04:34 PM

    LOL! Good eye, Willy! :)


    June 21, 2001, 05:17 PM

    What is a Macintosh?


    June 21, 2001, 06:22 PM

    AFAIK it's an apple of some sort. Grown in southern Canada and almost anywhere in the US.
    They're mighty tasty, but make sure you wash them before you eat them, because God
    only knows what kind of chemicals they spray on them at the store.

    Why do you ask?


    Navreet Gill

    June 21, 2001, 06:57 PM

    haha, that's a joke right? made me laugh ;)

    Navreet Gill

    June 21, 2001, 06:59 PM

    btw, how do you do the textures?? how do they ever do the textures??!?! do they repeat them? I've read the tutorials on flipcode, but still have this one question in my mind left, and no one seems to care (I posted a question on flipcode message boards, but no one seems to care!, maybe this'll get some response).

    One you determine how much rock/grass/snow at a particular vertex where do you go from there?!

    Navreet Gill

    June 21, 2001, 07:02 PM

    One=Once in the last line.

    Navreet Gill

    June 21, 2001, 07:06 PM

    Another thing: Do you use Perlin Noise to do your clouds?? I am working on that right now. I can't download the demo (on a PC), so I was just wondering if the clouds are static/animated

    David Olsson

    June 21, 2001, 07:11 PM

    No I think he's quite serious!


    June 21, 2001, 09:01 PM

    Very Bouncy suspension can often be caused by having a simple newtonian physics model with a low sample rate. For example, if you have a strong spring that is compressed you calculate the force - the distance the spring is compressed times the spring constant. You then divide the force by the weight applied to the spring (say 1/4 the vehicle weight - ignoring centre of gravity for the moment), and this gives you the acceleration rate that the vehicle will move off the suspension (it might be coming down at this point). Now, if you multiply that by your time delta (assuming the acceleration is constant**) it gives you a velocity, and multiplying that by you time delta gives you a displacement.

    **Accelleration isn't constant. This leads to you over extending your spring if you time delta is too big, and producing oscillations, or forces that are greater than would naturally occur. There are two solutions:-

    1) have a tight looped bit of code where you do just the supension calcs. Divide you time delta by a couple of thousand, and to the loop a couple of thousand times, recalculating the spring compression, acceleration, and displacement each time with a really small time delta.

    2) Use a non time based domain - e.g. Laplace Domain (pick up a 2nd-3rd year Bachelor of Engineering Maths Book) for your physics model.

    Craig Rennie

    June 21, 2001, 09:05 PM

    You mention that you are doing real friction, I was wondering if perhaps you could elaborate more on this. Do you store frictional coeffictients for each surface, so the dirt has a different frictional force to the grass, etc... or is it more like a hack, despite what you said :)
    I must say that is very impressive looking indeed. and i love those big tyres :)

    Leon Rauis

    June 21, 2001, 10:00 PM

    I um, just wanted to say that after seeing this shot, I too have tire envy :).

    Hah. Everyone loves your tires.. I'd like to try this on my comp, but I'm on a PC (damn your mac :).

    I'm a little curious about texturing too.. I'm going to guess that its a fairly low-res (1 texel / 4x4 height samples??) with a repeating detail texture???

    Maybe not though, as from the shots I don't see the detail texture repeating, but it just might not be obvious because I can't see it in motion..

    Care to elaborate?


    June 21, 2001, 10:51 PM

    (This IOTD)
    Ok, i thought the combo would end at four.... for those who missed my last post just take a look at this iotd and the four before it all 5 are incredible!!! So here's my thoughts...

    While this one doesn't have the eye candy of the last lot, physics is as important as graphics, not to mention FAR harder (in my opinion at least)

    This little bouncy truck who is doing its thing over the terrain is downright spiffy, and since Tod's working on the physics engine I rekon there's nothing wrong with a few little gfx hiccups. Even though the picture can't do the physics enegine justice, the grapics are still very nice and above the average we are used to seeing here.

    yes, i admit it....i'm a fan of those trees, they rock :)

    (What this makes me think about own game)
    EEEP!! Now I'm even more scared! My little rts is nothing compared to any of this weeks iotds, a while ago i was wondering when i'd have it up to the stage where it would be iotd'able... looking at this, i'd give it about a year or two!!!!

    Kurt Miller

    June 21, 2001, 11:14 PM

    ">>those who missed my last post just take a look at this iotd and the four before it all 5 are incredible!!! "

    I still don't understand what you're talking about ;]. I've enjoyed pretty much all of the IOTDs.


    June 22, 2001, 12:16 AM

    True, they all rock...
    I just prefer these ones myself, that's just my opinion. Dunno why


    June 22, 2001, 03:21 AM

    Navreet :

    >and no one seems to care (I posted a question on flipcode message
    >boards, but no one seems to care!, maybe this'll get some response).

    Perhaps that's related to the fact that terrain-texturing has been discussed and explained over and over and over again here on flipcode, and on every other gameprogramnming-site...
    So if anyone doesn't care, my guess is it's you - 'cause you still haven't found the TONS of related info on this and other sites :-)

    Rui Martins

    June 22, 2001, 07:57 AM

    Could you elaborate More on the Pysics/Springs/dampers/etc...

    I have been working on this for quite some time now (on & off)

    Is there going to be a PC Port or Code release, so that someone can port it ?

    See ya

    This thread contains 32 messages.
    First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.