This post is dedicated to all the game developers who wants to learn programming games like Bike Baron, Trials Frontier, Trial Extreme, Bike Race, Bike Racing, Bike Rivals, Extreme Bike Stunts, Mad Skills Motorbike, etc. this all games have about more than 1 million download and few have more than 10 million download.Indeed, motorbike stunts game have a huge popularity all over the world.
After researching, I realized that similar game physics are released with different visual and game design are released in the market since a decade but the core mechanics of all the game remains the same. So you can develop the core module once and publish several different design games. the best and most popular example is “Trail Extreme series” which have released 4 games in the market in the last 3 years with different designs and all have above a million download.
So i started my development process to design a core module which will support motorbike movement physics, rag doll character behavior and a very robust module in which you can create similar games i mentioned in the beginning. This work was completed in a month precisely.
before we proceed let me give you a short step by step procedure to develop this project.
1> For 2d and 3d game development, I have chosen Unity3D as the game engine.
2> You can download the required materials and models from Turbo Squid. these models are available for free. You will need a motorbike and a character. remember these model should support rag doll behavior and motorbike where components can be separated. I have attached a image for a reference and a link at the bottom where you can download these models.
3> We will need to create a new scene in unity and construct a terrain for a mountainous road so that the player can test its front and backward movement and control its physics balance. creating terrain is a very easy process. there are many tutorials available on YouTube.
4>So now after you have a rocky mountainous terrain, the motorbike and the character with its materials. You will need to drag those in the scene and add collider to the game object models for a motorbike and the character. I have attached a hierarchy which you will need to maintain for a very robust physics rag doll behavior. please add a character joint for the hips, shoulders, back, legs, arms, hand. etc and capsule collider wherever you have a joint. Please note you will need a sphere collider for the front and rear tires. remember, you will need to add a hinge joint for the rear fork for its shock up tires movement and you can add a configurable joint component for the front fork.
5>You will need to add the script which you can download it from http://pastebin.com/wmXSEfHY and put that in the main game object or parent game object of all those components. Remember, to have body and player and all the character movement objects as a child of this game object. You will need to attach a body trigger script for the ragdoll movement and conditions. Please do attach a rigibody and a box collider component for the main body of the bike. I have attached the script in the following link: http://pastebin.com/s9qT0iY6
6>After you have added the collider components for various gameobjects and its script. you can add a simple follow camera script and buttons as its input. remember the tedious work is only arranging the components for its behaviour and its values.
7>Remember, you will need to apply the player movements with the bike.So i request you to first follow few tutorials to understand as how a ragdoll behavior works and also the physics and movement of a motorbike control. I have attached several screenshots for you as a reference of the hierarchy of the game objects.
If you face any issue or have any questions please do write it in the comments section and i will answer it within 24 hours.
Motorcycle model is downloaded from: http://www.turbosquid.com/3d-models/3d-motorcycle-games/349482
Using male character pack from Mixamo: https://www.assetstore.unity3d.com/#/content/124
Once you have mastered the core mechanics, you should be able to develop games like Bike Baron and Trials Frontier. hope to see your game on the market. All the very best. Thank you 🙂