Jump to content

  • Log In with Google      Sign In   
  • Create Account


Wipeout/F-Zero-like Dynamics ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Mind Calamity   Members   -  Reputation: 134

Like
0Likes
Like

Posted 17 February 2012 - 12:50 PM

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:
http://www.youtube.com/watch?v=PnCn3yra2jQ

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.

Sponsor:

#2 skytiger   Members   -  Reputation: 258

Like
0Likes
Like

Posted 17 February 2012 - 05:07 PM

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 ...

#3 mind in a box   Members   -  Reputation: 576

Like
0Likes
Like

Posted 17 February 2012 - 05:35 PM

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)

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:
http://www.digitalru...r-3D-Games.aspx

Tilting the craft while turning and making the turns smooth

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

Enabling Bullet's Continous-Collision-Feature has helped a lot with keeping our ships inside the track Posted Image

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.

#4 Mind Calamity   Members   -  Reputation: 134

Like
0Likes
Like

Posted 17 February 2012 - 07:12 PM

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! Posted Image

Edited by Dev-san, 17 February 2012 - 07:36 PM.


#5 skytiger   Members   -  Reputation: 258

Like
0Likes
Like

Posted 19 February 2012 - 01:29 PM

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

#6 Mind Calamity   Members   -  Reputation: 134

Like
0Likes
Like

Posted 15 April 2012 - 10:45 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS