I've been asked to come up with a tutorial on how to build a "realistic" bike for C2. It took me some time to figure out the most improtant dynamics, but I think I've come pretty close.
You'll find the demo HERE
As usual, the CAPX can be downloaded
Now for the controls - there are a litte "complicated" since riding a boke is not only accelleration an breaks...
Controlling the bike
To accellerator the bike you have to press x. The frontwheel break is controlled with c and the rear break with either y or z.
To controll the dynamics of the ride, one can shift weight. This is simulated by pressing either a - lean back - s - sit straight and d lean forward.
Setting up the basics
First of all, we have to "construct" a bike, that allows us to apply the physics we need.
The bike itself is compiled from a total of six sprites:
Please note the two "empty" sprites at the base of the wheels. They are needed to detect if there is ground contact.
All other four sprites have to have the physics behavior, the two empty ones have to inherit the pin behavior.
At the "Start of Layout" the pieces are mended to build a bike:
As you can see, the rear wheel (Hinterrad) is not directly connected with the body. To simulate a suspension, the joint is done over a wing (Schwinge) with two imagepoints: