The best way to simulate a motorbike

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Kojotex
Gnoblar
Posts: 11
Joined: Fri Jul 23, 2004 4:05 pm
Location: Germany, near Munich

The best way to simulate a motorbike

Post by Kojotex » Tue Mar 08, 2005 2:27 pm

Hi,
i'm trying to make a game similar to elastomania (elastomania.com), which is a 2d bike game.
I'm going to simulate the physics with ode, and now i dont really know how to do the simulation of the bike. As it will be a 2d game, just with 3d graphics, the bike shouldn't fall down.

thanks,
Kojotex
0 x

User avatar
osolizig
Halfling
Posts: 56
Joined: Thu Jan 06, 2005 3:55 pm
Location: Ljubljana, Slovenia, Europe
Contact:

Post by osolizig » Sun Mar 13, 2005 6:08 pm

Why don't you use simple 2D physics. You can even write your own for so simple game. ODE is for 3D physics which is much more complex. Using it in 2D would be something quite stupid!
0 x
TZE (The Zeus Engine) administrator, developer

User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia
Contact:

Post by monster » Tue Mar 15, 2005 1:18 am

Well, it's not that stupid. You might want your character (motorbike, whatever) to be "locked" into 2D but interact with the 3D world. A bit like Pandemonium (which didn't use physics, but you get the idea) or like the "Award Winning" WheelieRR;
http://www.green-eyed-monster.com/xoops ... id=4&lid=2

This simply uses the ODE Plane2D joint to keep the motorbike upright. It also has an additional slider joint so that you can change lanes but if you were doing pure 2D then you wouldn't need that. And when you crash the Plane2D joint gets deleted and all the crashes happen in full 3D.
Last edited by monster on Tue Mar 15, 2005 3:15 am, edited 1 time in total.
0 x

Craig
Gnoblar
Posts: 6
Joined: Mon Jun 21, 2004 2:39 am
Contact:

Post by Craig » Tue Mar 15, 2005 3:08 am

Hey Kojotex,
I did the motorbike physics for scootarama ( a motorbike racing game ) using ODE. Originally i attempted to make a complete motorbike sim, as in wheels, body, handlebars, suspension.. the whole works. and it ended up being more trouble than it was worth. After spending about 2 months on that i ended up replacing the whole lot in a couple of hours with just 2 spheres and a static hinge connecting them with very little friction on the wheels.And it worked like a dream.

With a little tweaking to keep the real wheel following the front wheel and using angular velocity to steer the bike it worked great. also, didn't have to worry about the bike tipping. as i just attached the desired mesh and kept control of it's X axis ( roll ) when steering and left it's pitch and yaw to whatever the hinge between the wheels was.

neway, that's just a thought, there's probably better ways of doing it, but i found it perfect for what i wanted. Wheelies worked fine if i wanted them, just by pulling back a little on the rear wheel, the front would be forced up.
0 x
Craig - Primed Games
http://www.primedgames.com

Post Reply