Jump to content
  • Advertisement
Sign in to follow this  
Mind Calamity

Wipeout/F-Zero-like Dynamics ?

This topic is 2772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, guys!

I'm trying to do a game like F-Zero/Wipeout, and I have no idea where to start on the physics/game dynamics, I tried with Bullet and applying force/impulse while a key is pressed.

That sort of worked, but it's far from playable, so I'm thinking of abandoning Bullet for a collision detection-only library (like Minimal OGRE Collision) (or using only Bullet's collision-detection facilities) and coding my own dynamics, now trouble is - I have no idea how to actually make the dynamics I mean that hovery effect Wipeout has, or smooth turning around corners and tilting the craft among others...

So what I need is hints and tips on:

  • Keeping the craft hovering (but not a static Y-only hover - see video below)
  • Tilting the craft while turning and making the turns smooth
  • Any other information about making the gameplay dynamics Wipeout-like

    This is the first time I'm doing something like this so any help is much appreciated.

    Here's what I'd like the gameplay to be like:

    Any help is greatly appreciated!

    I will post a video and code from my Bullet progress later.

    OGRE Forums mirror - just in case anyone needs something like this in the future and stumbles upon this.

Share this post

Link to post
Share on other sites
The easiest way to start is to get your head around splines so you can do this:

then realise that Wipeout doesn't really follow the normal laws of physics - so use physics engine for collisions only
if you imagine that your ship is constrained inside a box above the track that simplifies things immensely
as you only need to think in 2D (height above track and horizontal position) + ship orientation
chuck in some springs and you are almost there ...

I love Wipeout but I doubt I could come close to the quality psygnosis achieved in their "flight model"
there is more going on than meets the eye ...

Share this post

Link to post
Share on other sites
Edit: Ninja'd

I'm creating such a game myself right now, and we're using BulletPhysics as well.
I can probably answer your questions, but please know that we have still some problems ourselves to get it working nicely.

Keeping the craft hovering (but not a static Y-only hover - see video below)[/quote]
We use some kind of RayCast-Vehicle for our ships, as at least Wipeout Pulse does. You simulate invisible springs which will keep your ship up in the air.
Imagine it like a car with invisible tires. This Page was quite helpful, even if we didn't use everything of it:

Tilting the craft while turning and making the turns smooth[/quote]
We have that, but it's a little hacky solution. Rotating the RigidBody we use would probably screw up the physics totally, so we're just rotating it to a local axis in the vertex-shader.
Probably we will switch to the "real" behavior, but we'd have to see how this would work out first.

Any other information about making the gameplay dynamics Wipeout-like[/quote]
Enabling Bullet's Continous-Collision-Feature has helped a lot with keeping our ships inside the track smile.png

We are still encountering problems with the ship crashing out of map or getting thrown around a lot, so if you or someone else finds out something, we'd greatly appreciate if you could tell us about your findings.

Share this post

Link to post
Share on other sites
Thanks guys, I'll start coding for real tomorrow, and as this is a project that I'm likely to use for a school competition so I think I'll make the code public.

Also, I did try with the raycast vehicle (but for a real car, not antigravity crafts), and I didn't get far with the tuning as I couldn't get it to properly corner (it "cornered" faster then it actually went).

I'll give the invisible wheels suggestion a shot (and make the suspension looser to get that hovery/floaty effect).

I'll see if I can do something that's not a hack for the tilting problem.

Also Tunneling is a great problem in fast-paced games, so CCD will do some good.

I'm always open to more suggestions, feel free to drop them if you have any! smile.png Edited by Dev-san

Share this post

Link to post
Share on other sites
These topics are helpful: "osculating circle" "parallel transport frame" "uniform basis spline"
I believe the wipeout tracks are uniform basis splines using parallel transport frame with an additional local forward axis rotation (for outside curves, tricky corners)
There is an invisible collision mesh shaped like this: \_____/ and the ship collision is performed with a geometric sphere positioned in the nose of the craft.
I see no need for a physics engine - in fact quite the opposite - the physics engine will cause more problems that it solves.
This allows for the 400 mph high speed outside cornering (where your craft slides outside the track)
Advanced wipeout players can also leave the track and perform HUGE jumps (for instance you can bypass tricky S bend tunnels by jumping over the top)
Furthermore the spline track is designed first - the rest of the level is built up around a working, finely tuned track.
(edit) also you can perform alot of calculations in "track space" which is a dead straight line

Share this post

Link to post
Share on other sites
Sorry for the late update guys, but I started developing the game I had imagined a few months ago, at the time this thread was created, and even though I wanted it to be like Wipeout I missed an important fact which was probably the main reason I opened this thread - in Wipeout you can't turn your vehicle more than 70-90 degrees sideways, thus, obviously removing your ability to turn back, which means that the above post about the curve was exactly what I needed at the time, but for now I have no way of turning back as I've used Bullet Vehicle to get to this point and I think I'm going to finish it before trying out new gameplay mechanics.

Weird thing is I realized this only after playing the demo of TurboFly3D for Android, which is pretty similar to Wipeout.

And, yeah high speed racing is pretty tough to pull out with regular physics simulation, I started having problems turning when going 400+ KM/h, but all-in-all I think I'll manage.

Thanks for all your tips and suggestions guys, I appreciate it.

BTW - Before starting the bullet vehicle thing I developed another vehicle which calculated only collisions with bullet, and I handled most of the dynamics, like turning and stuff, so I guess in a few weeks/months I will give this method a try.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!