Let's show the final results:
http://gamebuilder.duapp.com/apprun.html?appid=genius-441422599398441
Online editing interface:
http://gamebuilder.duapp.com/gamebuilder.php?appid=genius-441422599398441
1. Create a new project and delete the basketball and grass. Select tile vertically to place a new physical examination in the middle of the road dividing the road into 2.
2. Set the virtual height of the game scene to 5000,x direction and y-direction gravity set to 0
3. Place a counter to calculate the display score
4. Place two rigid bodies and set a background image to represent two cars.
4. Set the car density to 1, the friction coefficient and the elasticity coefficient are 0.5
5. Place random tissue and stool on the runway to indicate obstructions.
6. In order to avoid the collision effect, the obstacle rigid body is set as the sensor.
And then you start writing code,
1) deal with the update score when a small car crashes:
2) OnOpen event handling for the implementation scenario
Resources:
https://github.com/drawapp8/gamebuilder/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3
Html5app Combat (2): Racing games