Html5app Combat (2): Racing games

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.