Options / tips for a kart game

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Sabo
Posts: 4
Joined: Sat May 14, 2011 3:17 am

Options / tips for a kart game

Post by Sabo »

I'm currently working on a Mario kart clone for a school project. I initially wanted to implement some basic collision and physic stuff myself, but due to time constraints that is no longer an option. BEPU seem to be a solid solution for this project. I super new to physics though, so thought I'd make a post about how I want it to work and hopefully get some input before I go about trying to get this up and running.

I would like the kart to behave very much like the karts in Mario kart. That is, the kart should run steady with minimal / zero jittering. Basically a flat box running on even terrain, except for when we have a bump or two. I guess thinking a train on rails should give an accurate picture of what I'm after for normal straight, curves and low-ish angle slopes. It should be able to travel up / down ramps. And finally, I would like the kart to perform certain actions when it's hit by a weapon, fall off a ramp etc.

Being new to all of this, should I use the physic engine for it all? Can / will there be issues with the actions the kart will perform when falling of a ramp or getting hit by a weapon and so on? Or should I use a kinematic approach and control it all myself? If I go kinematic, can I set it up in a way that the kart (and other objects) still travel along the terrain (which will be a complete model from a 3D program) in a proper way?

Thanks for taking the time to read.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Options / tips for a kart game

Post by Norbo »

Being new to all of this, should I use the physic engine for it all? Can / will there be issues with the actions the kart will perform when falling of a ramp or getting hit by a weapon and so on?
That depends on what actions are performed. The rule of thumb is, can you think of a way to simulate it physically? If so, chances are the physics engine can do it :) If the behavior desired is arbitrary and nonphysical, shoehorning it into a physical simulation will cause some pain. It's usually still possible, but it varies by degrees.
Or should I use a kinematic approach and control it all myself? If I go kinematic, can I set it up in a way that the kart (and other objects) still travel along the terrain (which will be a complete model from a 3D program) in a proper way?
If almost all the behavior desired was nonphysical, then you could go this route. By doing so, you assume full responsibility for the dynamics. You'd have to figure out how to get the car to orient itself and everything else. At that point, the engine would be more of a collision detection library.

Assuming there's not a huge number of nonphysical control requirements, I'd recommend just using the vehicle class. The default vehicle configuration in the demos acts a bit like some sort of turbo-boosted sedan, but you can configure it into just about any form. There's an alternate vehicle configuration of the demos showing a tank implementation.

There's some past posts on the forum about go kart style physics too. The vehicle hasn't changed too much from v0.14.3 to v0.15.0+, so most of the not-extremely-old stuff will still work. The most common issue that people encounter is making the car more 'arcadey.' This is a mix of shorter, stiffer suspension, wider wheelbase, and lower center of mass.
Sabo
Posts: 4
Joined: Sat May 14, 2011 3:17 am

Re: Options / tips for a kart game

Post by Sabo »

Hi Norbo,

Thanks for the quick reply. I'll give the vehicle class a shot then.
Post Reply