Monday, February 23, 2009 at 2:09 PM |  
As we all know, racing game is about the feel of the physics. Since this is a sci-fi racing game with hover craft, we need a good feel of hover craft physics. But here lies the problem. What exactly is a hover craft physics?

The hover crafts of today uses air pressure to keep itself afloat. The way they work is by having a skirt around the waist of the craft to keep air flow tight between the ground and the craft.

How hover craft works.

Ok, so this doesn't work. Now what about all those cool fancy sci-fi movie type? They look pretty darn cool and feels like hovering. Those are in fact for the most part totally fake. There's no relation to Newtonian physics in any way. However, we need to define that kind of behavior within Newtonian physics.

First of we thought of using propulsion physics. The whole idea is that the craft pushes itself upwards through propulsion force. All nice and dandy, but it doesn't really work. Why? If you think about it, our space rockets uses propulsion force. With a constant propulsion rate, they go up into space!

How rocket works.

Ok, crap now our craft's flying into space. We need it on the ground. So we came up with a new idea. Why not detect if it's close to the ground, we add more propulsion force and when it's away, we decrease until a certain height, we loose propulsion force completely? Sounds great isn't it? That would guarantee we will hover at a certain height... or at least so in our mind simulation.

Well, it didn't work. It went bouncing like a perfect spring. A very happy lil giddy bouncing hover craft.

Ok, so it's bouncing, we want that. But we don't want it to bounce forever. It should bounce only a few times and have to be done slowly. So we added damper to our physics which worked like a charm. :)

We were happy with the result until we hit a problem with our anti-gravity track. As we want high speed, our craft didn't have enough propulsion power to sustain it's hovering state on sharp banking on the anti-gravity track. Due to the velocity, it was pressed down pretty hard when doing the bank and ends up hitting the surface and loose control. That was pretty darn annoying.

To cut story short, we had to tweak the damping really high to slow down fast enough for the craft to not hit the track when banking on high speed. This of course killed the hover feeling. :(

That's what happened in the video.

Right now, I'm tinkering on a few tricks to help solve this problem. The first one was to use quadratic equation for the propulsion instead of the linear method. This gives us a bit of improvement (but still no good) on the hover cushion feeling we were trying to achieve.

However, there's yet another idea we have that will hopefully solve the anti-grav problem while giving us more better cushioning. What we will try next is to provide dynamic propulsion control base on craft velocity. Hopefully it will yield good result for us. :)

P.S. Craft hover balancing is a pain in the ass. We've been tweaking this thing for months and still tweaking. It's one of the hardest thing to get right I must say. (what's so hard about racing game? vroom vroom... lol)
Posted by Lf3T-Hn4D


Post a Comment

Liquid Rock Games and Project Aftershock. All Rights Reserved.