Keirin Kami
Where to play:
https://keirinkami.itch.io/k
The game does not work on Firefox!
It works on mobile phones but it's easier on a computer.
- in a nutshell
- the game
- how to play
- time trials
- dashboard
- avoiding crash
- banking inclination
- concessions
- draft
- fatigue
- strategies
- progress
- frictions
- rollout distance
- crank
- weight of bike
- arrival times and photo-finish
- inclination of the rider
- times comparisons
- plans for the future
- summit of the gods
In a nutshell
(if you don't want to read all this page)
- you're the red cyclist
- the velodrome is viewed from above
- zoom in/out: i/o
- zoom in/out on your rider: q/a
- race starts at the bang
- acceleration at max force: ↑ or P
- deceleration: ↓ or L
- left turn: S or 7
- right turn: → or D or 8
- sharp left turn: ← or Ctrl key
- + or F increases speed and keeps it constant after release
- - or V decreases speed and keep it constant after release
- space bar pauses and help
- Y, H, N acceleration at 60%, 40%, 20% of max force
( In Keirin, I usually only use ↑ → and ← keys. )
On a phone, see playing on a phone.
The game
Keirin Kami is a playable track cycling simulation that can be played in your browser, Firefox excluded.
- Graphics are minimal so the game can be played on all computers.
- Dynamics (forces, fatigue, frictions...) are as accurate as possible.
- Rules are almost identical to official track cycling competitions.
- Few concessions were made for the ease of use.
It is a browser game: the game is downloaded in your browser. Once it is downloaded you don't need an internet connection. Unless you want to share your results and records with others.
In this first version you can only play against the computer: one rider is you, the five others are controlled by the computer.
Riders have different characteristics (force, cadence or velocity, endurance, gear, weight...) but they all follow the same physical equations.
In a future version it might become a multiplayer game, allowing players from all other the world to compete against each other in real time.
The game gives the player as much freedom of movement as possible while following the rules of Keirin, in particular changing lane and avoiding collisions.
Keirin is a tactical sport. Your strategy is as important as your athletic performances (force, cadence or velocity, endurance...). A first time player needs to learn how to control its movements with the keyboard while seeing the velodrome from above. It's not that hard.
At the beginning of the game you are a 16 year old rider in his first year (rank A3) on the Japanese Keirin circuit. Every month you have a new competition in a new city. Between competitions you can train on 200m and Kilometer time trials.
At the end of the year, depending on your results, you can be admitted to a higher rank circuit. You can also be invited to the Grand Prix to compete against the best riders.
The purpose of the game is to have the best Keirin career: establish new records, accumulate points, reach SS rank, participate to the Grand Prix and private competitions, and maybe who knows, be invited to the Summit of the Gods.
How to play
Profile
To begin playing, you need to create a profile for your rider with his name, city, etc.
You can join any existing team you want or you can create a new team.
You create a profile for a 16 years old rider so don't enter adult sizes. Your rider will grow up.
When you click "Enter New Profile" you will see the physical characteristics of your rider:
- Max average force is the average over one pedal rotation of your maximal force in seated position. The two forces, pushing on one pedal and pulling the other pedal, are added. Only tangential forces are counted.
- Max velocity is your maximum cadence, the number of rotations you can do in one minute (RPM). The word velocity here means legs velocity. It can be replaced with the word cadence.
- The drag area is the frontal area of the rider subject to air friction multiplied with the drag coefficient. It is used to compute the drag force. The lower the better. Temperature, altitude and humidity influence the drag.
Another smaller friction force is the rolling resistance. It depends on the surface of the velodrome. Wood and epoxy give the smallest rolling resistance. Concrete has a rolling resistance twice greater than wood. And asphalt 3 times greater. There is also the drive chain friction. - Vmax and W/kg are two theoretical values that give an idea of the physical aptitude of the rider. Vmax is the maximal speed the rider can reach with the best gear ratio and no fatigue. W/kg is the maximal power of the rider (no fatigue, in seated position) divided by his weight (bike not included).
- Endurance is a number between 0 and around 1200. As you train it increases. The higher the less fatigue.
- The percentage % sprinter/endurance is a number between 11% and 100% that remains the same all the rider's life. At 100% the rider is a pure sprinter. At 11% the rider is still a Keirin rider but with more long distance abilities.
You can read more about endurance and fatigue below.
Your profile is saved on your computer.
You can also enter an email address so that your profile is saved online. You can enter any email, you don't have to verify it.
When your profile is created and saved you can move on to your first competition.
You always have the choice between 3 velodromes that are in 3 different cities.
For some velodromes you can train on 200m and Kilometer time trials. Your personal records are saved and shared online. If you break a "world record" it will be shared as well.
Training and competing make you progress in force, endurance and velocity/cadence.
It is normal during your first year to not be qualified for any final. Your rider is only 16 years old.
Team
You can create your own team and become the leader of your team.
Or you can join an existing team. To do so you go on the team profile and ask the leader if you can join.
Keyboard controls
( In Keirin, I usually only use ↑ → and ← keys. )
You see the velodrome from above.
You are the red rider.
- Zoom in/out: i/o
- Zoom in/out on your rider: q/a
- Acceleration at max force: Up Arrow ↑ (or P)
- Acceleration at 60%, 40%, 20% of max force: Y,H,N
- Deceleration: Down Arrow ↓ (or L)
- Left turn: S or 7
- Right turn: → (or D or 8)
- Sharp left turn: ← or Ctrl key. Useful for sprint or 200m.
- Pressing the + (or F) key increases your speed a bit and keeps it constant afterwards, as long as you have enough force to maintain that speed.
- Pressing the - (or V) key decreases your speed and keeps it constant.
- After pressing +, F, - or V your speed is locked. This is useful at the beginning of the Keirin race when the speed increases slowly. But if you need a more brutal acceleration then you need to press the Up Arrow ↑ (or P).
- After pressing P, L, ↑, ↓, Y, H or N your speed is not locked anymore.
- The space bar pauses the game and shows help.
- At the end of race pressing any key makes the game go to the next round.
Playing on a phone
Zoom in and out by touching bottom or top left corner.
Accelerate, decelerate and turn using the joystick.
For time trials you can switch your seat position by touching the brown arrows or the bike.
The race
The first laps during which riders have to follow the pacer or derny are skipped. So we don't have to wait for the race to start. The bang signals that the race starts and riders can change position. Riders can't pass the pacer till it pulls out.
The first two riders are qualified for the next round. The third goes to repechage where only the first rider is qualified.
The last round is the final where points are given to each finishing rider, from 100 for the winner to 2 for the last one.
Changing lane
In track cycling you cannot cut the trajectory of a rider. For example when a rider is passing you on your right you will not be able to turn right as much as you want and you can get stuck.
Not being blocked and blocking other riders is part of the strategy in Keirin.
Riders can push on each others when they are side by side.
In Keirin, riders can shoulder and head bump each other. In this case, both riders or only the weaker one may get slowed down or lose their balance.
Shoulder or head bump occurs when two riders are too close to each other.
Grand Prix invitation
At the end of the year you might be invited to the Grand Prix. It's an opportunity to test yourself against the best riders.
There are other invitations during the year.
Ranks
There are 6 ranks or classes in Keirin: A3, A2, A1, S2, S1, SS.
You start at the lowest rank A3 and move up to a higher rank if you can score more than 148 points in one year.
If you score more than 348 you move up two ranks.
Time trials
For time trials the inclination of the rider in the curbs is taken into account.
Also, you can choose the position of the rider on his bike:
- Press t for a standing position with maximum force but more air friction and more fatigue.
- Press g for a normal seated position. It is the position during Keirin races.
- Press b for a aerodynamic position. Air frictions and fatigue are a bit reduced but so does your maximal force.
Or you can let the computer switch positions automatically for you (not recommended).
200m
Your best 200m is saved. You can use as many laps as you want to reach your full speed.
Note that the banking inclinations for these short tracks are higher than the inclinations of longer outdoor velodromes. This means that you will get better 200m times.
Kilometer
There's a few seconds count down. The Down Arrow key ↓ should be held at t=-0.1s in order to be able to accelerate at t=0s with the Up Arrow key ↑.
If the start is done correctly a boost of 1.8m/s is given as the rider projects his upper body upfront.
Dashboard
The dashboard let you visualize speed, power, velocity or cadence (rpm), fatigues, and the forces.
Fatigue has two components you can see in the horizontal bar: force fatigue shown in red and velocity/cadence fatigue shown in blue.
The azure blue zone in the velocity horizontal bar is where you have the maximum power. As velocity/cadence fatigue increases this zone shifts to the left.
You can see this figure and its article for more explanations on muscular fatigues. The figure shows a linear relationship (straight line) between force and velocity/cadence. The game uses a more complex formula with a slightly convex curve for a beginner cyclist, becoming more and more concave with training and endurance.
The vertical bar on the right has 4 colors:
- black is the maximal force at no velocity and no fatigue.
- blue is the maximal force at the rider's current velocity with no strength fatigue.
- purple is the maximal force the rider can apply at current velocity with fatigues.
- red is the force applied. This force can become greater than the previous one (purple) when the rider stands on his pedals (only during time trials).
The S above this bar means your speed is locked. See key controls.
NOW YOU ARE READY TO PLAY
Here are tutorial videos where you can see control keys being pressed:
https://vimeo.com/user212131348
https://t.me/s/keirinkami
You can also read more. A lot can be said about this game.
Avoiding crash
Yes you can crash. This is impolite. If you cause a crash you should be ashamed. You might not be invited to private events.
However in a near crash situation the computer will deviate the rider at fault.
With experience you will be able to see when another rider may cause a crash. You should then change lane in order to avoid a potential crash.
NEW:
There’s a new parameter in the game that appears at the top right of the track. It is the Tension in the air and between riders. It ranges from -100% to +100% and depends on weather conditions, altitude, and the phase (round) of the competition. For example, if a storm is approaching, the air will be charged with positive ions, making some people more nervous, thus increasing the Tension. After a storm, or in dry or cold weather, the air is more charged with negative ions, which is usually more relaxing. Some riders are more affected than others by the Tension, becoming more nervous as Tension rises, making the race more aggressive. This new addition brings more diversity to strategies and races in general.
Banking inclination
The angle of the banking in the turns is taken 16 degrees lower than the natural lean of a rider at 85km/h. For a radius of 22m the maximum inclination is around 53 degrees. For a radius of 18m this angle becomes 56 degrees. Shorter radii have more inclination and allow better 200m trial times.
Concessions
The shape of the velodrome drawn on screen is simplified. There's no transition curve.
However, for time trials the progressive inclination of the rider is taken into account!
The inner line is removed so we can see better the wheels of the bikes.
There's no wind and it never rains.
The game uses complex fatigue mechanisms that try represent reality. But there is only two parameters the player has access to. It is the endurance and the % sprinter/endurance. Having more parameters would be too complicated for a game.
You can compare the intermediary times and speeds of a kilometer time trial obtained in this game with the ones of a real event.
Fatigue goes back to zero after a race. Riders are not tired from past races.
Keirin races in Japan have more riders. The format is different.
The first laps when all riders follow the pacer are skipped so the player does not have to wait too long for the real action to start.
You keep the same gear for the whole competition! This could be changed in the future if players ask me to. I chose this option because it makes the gamer experience better: not having to choose each time a new gear. Choosing the correct gear is part of your strategy.
Draft
The draft is the reduction of wind and pressure a rider feels when behind another rider. The closer to the front rider the more draft. There are 3 draft areas behind each rider.
The first area has a triangle like shape just behind the body of the rider in front. It reduces the wind by 36%.
The second area follows the first area. It has a width of 0.64 meter and a length of v/10 behind the rider (v being the speed in m/s). It also reduces the wind by 36%.
The third area has a width of 0.88 meter and a length of v/2. It offers a regressive draft from 36% to 0%.
The draft behind behind the pacer is approximately twice larger.
Only the portion of your body in the draft area feels the reduction of wind. So if only half of your body is in the draft area, as in the image below, then the draft is divided by 2.
Image showing drag and draft. Taken from this article.
Fatigue
There are two fatigues the player can visualize: one for the velocity or cadence (RPM) and one for the force.
One diminishes the maximal velocity/cadence (and so the maximal force), the other one diminishes the maximal force.
Endurance reduces both fatigues.
In this game fatigue and recovery follow non linear equations contrary to models like 3CC.
Strategies
Strategies are a huge part of the race. The computer randomly choose a strategy for the riders it controls. They don't collude against you. In a future version of the game collusion could be implemented. During your rider's career you might be offered such a deal... So there can be collusion between the player, you, and another rider.
Your strategy starts by choosing a gear ratio. In this version of the game you keep the same gear for the whole competition.
When the race starts you can change your position, decide which rider to follow, when to place an attack etc. For example, in a long race, riders might choose to accelerate early. In this case your endurance and strategy are going to have more importance than your force or velocity/cadence.
Do not hesitate to try different strategies and gear ratios. Most of the time, following the other riders and trying to pass them in the last lap is not going to be enough of a strategy. You will have to be more proactive and disrupt other riders race.
Progress
All riders progress through the year.
Your rider progresses by participating at competitions, doing time trials and breaking personal records. He progresses in force, velocity/cadence and endurance. He also gains weight, gets thicker and as a consequence his drag area increases.
At the end of the year you can exchange your points with a specific progress. Hence if, for example, you prefer longer races you might want to exchange your points for more endurance.
As your rider ages his progress will get smaller and he can regress if he does not train enough.
Frictions
The main friction is the drag force by the air.
With increase of altitude the air density becomes lower and so is the drag force.
Air density and drag also decrease with temperature.
The air density is computed as follow. First the pressure is calculated for the given altitude with a lapse rate of 6.5K/km. This is the average pressure at this altitude.
Then we compute air density using the local temperature. It differs from the barometric formula which uses a fixed temperature model. In reality we have local variations of temperature while pressure remains almost constant. We can have a change of temperature between the inside of a velodrome and the outside, while pressure is the same.
The relative humidity has a more subtle effect. It is known that humidity decreases air mass density as a water molecule is lighter than the average air molecule. This effect increases with temperature and below 30°C it is lower than 1%.
What is rarely mentioned is that water molecules bind easily to particles and bodies. This second effect increases air mass density and creates another friction. This small effect is taken into account in the game.
The next friction is the rolling resistance. It is due to the deformation of the tires. It depends on the pressure in the tires, the surface of the velodrome and the quality of the tires. Tires quality was taken as the best on the market. Pressure is 9 bar (9 atmosphere).
For wood and epoxy the rolling coefficient is 0.0016.
For concrete it is twice much. And for asphalt it is 3 times higher.
Another non negligible friction is the drive chain friction. It depends slightly on the gear ratio used. But overall the power lost is proportional to the power output of the rider.
For a track cycling bike with no derailleur the best drive chain efficiencies are above 99.5%. The game uses an efficiency of 99.6%.
Rollout distance
The rollout distance is the distance traveled per revolution of the crank.
It depends on the gear used and the size of the wheel and tire.
In the game the total diameter of the wheel plus tire is taken as 662mm.
So a 50/10 gear ratio gives a rollout distance of 10.398m.
Crank
The crank length taken in the game is 165mm.
Weight of bike
For Keirin races the weight of the bike and rider's equipment is 7kg.
For time trials it is 2kg.
The moment of inertia of the wheels is included in the weight.
Arrival times and Photo-finish
The game prints around 60 frames per second, a frame every 16ms. In order to have more precision, the riders arrival times are computed using interpolation with their frame times, positions, speeds and accelerations at arrival. This way we get extremely precise times.
Then the photo-finish is reconstructed using this arrival time and the speed. This is why riders can appear far from the finish line on the photo-finish.
Inclination of the rider
The centrifugal force in the curbs imposes an inclination of the rider that has several effects.
The first effect is that the center of mass of the rider takes a shorter path. With our short tracks, the shortening of the distance can be around 20m on a kilometer time trial.
The second effect is that the RPM velocity/cadence is going to slightly increase in the curbs.
The third effect is the lowering of the center of mass, giving a small velocity boost at the entrance (first section) of the curb, and a slowing down in the second section.
The fourth effect is a transfer between translational kinetic energy and rotational kinetic energy of the rider around a vertical axis of rotation. At the entrance of the curb, translational kinetic energy is converted into rotational kinetic energy slowing down the rider. This energy is then returned in the second section of the curb. This fourth effect is independent of the previous three as it depends on the moment of inertia of the rider and his bike ("viewed" from above).
Finally, the fifth effect is an increase of the rolling resistance due to an increased force on the tires.
These 5 effects are taken into account for time trials but not for the Keirin.
Times comparisons
An important test for the game was to compare the intermediary speeds and times of time trials with the ones in reality. I gathered data from recent junior and top elites championships and compared them with the ones obtained in the game in the same conditions. Although there is a lot of variations between real world athletes the game gives pretty similar times. To match elite athletes times you will have to succeed bringing your rider at the top level.
It is important to note that the size of the track influences these intermediary and final times. A shorter track implies more inclination and more turns. More turns makes a shorter path. If there's a turn between two intermediary times then the time difference will appear shorter.
Also a shorter track has a steeper banking and offers greater acceleration in the 200m time trial. So we get better 200m times in the game compare to a longer track in real life, due to a steeper track, a greater rider inclination, but mostly because there is one more turn, shortening the time of about 0.15s!
Plans for the future
In the future I plan to allow two players to play on the same computer. The code was written so these expansions can easily be made.
We could also have another exciting race: Sprint (one-on-one).
And an Elimination race...
Then obviously the plan is to have an online multiplayer game so players from around the world could compete against each others, with possible betting. This would take time to implement.
The code could also be used for road race. However the fatigues formulas would have to be adapted.
Finally, I could improve the graphics... and have Godzilla break through the velodrome and eat people.
Summit of the Gods
The Summit of the Gods is a mythical Keirin competition at a velodrome hidden in the crater of Mount Fuji. If it exists for real and you are invited then according to the legend the Messenger will leave a tomobako next to you during your sleep. Inside the tomobako will be the invitation with a map. You are to climb Mount Fuji on the same day with your bike.