Early WIP Bike Physics.

Here are my bike physics, that are equally suited to skateboard,snowboard or skiing simulations. It is WIP so apologies for the programmer graphics.

Playable here.

These are a continuation from my car physics. That forum can be found here.

Keep watching for more developments, AI, games, etc.

Why so crappy controls? Use WASD or the arrow keys, but don’t mix them. Oo

I love it!

Great job!

A good start but,
As a bike owner you need to addrease the following:

At really slow speeds you dont bank to turn, you use the front wheel to steer. The turning circle can be tiny at this speed, some bikes can turn there front wheel 90degrees so when they turn, the rear wheel stays static “use this for when the bike is stopped”.

At medium speeds the bike behaves well, and skids almost like it should. Although it does seem to skid a little bit all the time, a real bike only skids when the tire has lost traction. Try implementing a sharp falloff for the traction so if you push past a piont it skids.

At High speed the bike is total inaccurate, the steering needs to be a lot more sensitive so you turn alot sharper. think of all thouse country roads you see bikers drive down at 100mph. They lean so far out they scuff there knees on the tarmak.

All the time the brakes need to be sharper and stop you alot quicker, if this was a real bike you would die the first time you went out after you failed to stop at a red light and got side swiped by an 18 wheeler. even at top speeds a bike can stop in a few secounds.

Hope that helps.

I was also thinking that the controls although not normal work. But I was thinking you could have:
W = Accelerate
S = Reverse
Q = Back Brake
E = Front Brake
LArrow = TurnLeft
RArrow = TurnRight
UpArrow = Leanfoward
DownArrow = LeanBack

So that when you do jumps you can ballance the bike in the air with the arrows and use the diffrent brakes “front and back” to do stunts and proper bike handling like donuts and wheelies.

r resets the bike, but no way to get yourself back on the course if you fall off.

Not bad as is. Reminds me of the skating/biking games from the gamecube/ps2 era.

are you using wheel colliders to do this? Looks really promising :slight_smile:

Nice work!

Looks very decent to me. Has a good feel to it, but kinda arcade-isch, which I actually like a lot!

Hey, thanks for all the feedback. Much appreciated, keep it coming.

Currently the bike physics are designed to be arcade like, so I hope people have realised they can do 360s and back flips etc, whilst in the air. Just use the pitch and steering controls.

@dondiego : Sorry for control layout, this is my preference as I don’t like the groupings to be near each other. I understand that a lot of people prefer WASD or all arrow keys. I’ll make sure it is configurable in any future game.

@MCHammond : Thanks for your detailed feedback. Currently, I’m only implementing an arcade style handling hence the sliding, but I’ll certainly start looking at your points, especially the high speed turning. This needs to be checked on a winding road terrain as it could be a perception thing. The bike does travel 200mph at the moment and I think the grip and turning is correct, but I could be wrong. So need to check on a better landscape/terrain. As I’m not a bike rider, prefer cycling, my cues have been how MotoGP and dirt bike riders ride and my knowledge and experience limited to writing car (mainly F1 games) physics.

@MCHammond : Yes, the brakes aren’t good enough. Will fix.

@MCHammond : I like your idea for separate brakes, this would be a good addition for a simulation. Need to think how this could be applied over various control devices, i.e. XBox360 and PS3 pads, iPhone, iPad, Wii remote, etc, etc. The inout controls need a lot of thought and user testing.

@MakerOfGames: Yes, my fault, disabled in code and forgot to re-enable. Previously, the terrain was in the middle so falling off was less of an issue. Will enable on the next release. Yes, snowboarding, skating are all in mind with these physics.

@Bug5532 : No, not using wheel colliders. My system is using ray casts. The physics initially written in C++ outside Unity, and work on a variety of Physics Middleware, i.e. PhysX, Havok and Bullet or any other rigid body physics system available.

Again, thanks for all you feedback and keep it coming.

Bump.

Improved the brakes and added reset when falling off the world.

Don’t forget to clear your browser cache :slight_smile:

I really like the feel of this.

Likewise. This is promising.
I’d put the brakes and reverse on separate keys though, and have skid marks and/or smoke appear when braking :wink:

Thanks for the nice comments people.

@Werewraith : I’m not actually interested in the graphics at this point, gameplay is more important to me. However, having been in the game industry over 16 years I know that adding great graphics will elevate peoples perception of the whole thing. Graphics sells, gameplay doesn’t. My programmer graphics will be removed once the projects move out of the prototyping phase.

I wouldn’t go so far as to say graphics are the end-all, be-all, but I find they’re extremely important to convey information. Like how you used shapes to have a visual representation of a motorcycle at all. Having some cue of when skidding happens would help too.

By the way, I noticed the skidding does happen when simply twisting the motorcycle, just saying the behavior could be exaggerated and given even more emphasis. If that’s where you want to take this gameplay to, of course.

I understand where you are coming from, but I don’t just want to drop in a placeholder effect as this would or could have a negative impact also. Need to invest sufficient time so they are of the same standard as the actual physics. I think I’m at the point where I’m happy with the physics so I can now invest some time on the graphics side of things.

So you would like skid marks and particle effects.

Beast mode… please add more hills…

@lordaddament : I’m currently putting together a list of all potential racing game modes/environments and Hill Climbing is on there (I assume that is what you mean, or do you mean a massive dirt bike environment) .

Dude i’m so diggin your tests, I’ve got into 3D because of my love of bikes and the lack of any decent games (well games that live up to my high expectations anyways)
I have been developing a bmx game for starters and have just started with unity but the lack of decent tutorials is killing me :frowning:
Wana team up haha

Peace

Matt

@LS16BMX : Thanks for you comments. Keep plugging away with Unity, it’ll click into place one day. Thanks for your offer of teaming up but we’ve got a talented team already.

Cheers…