HTML5APP practice (1): neural cats (2) and html5app practice

Source: Internet
Author: User

HTML5APP practice (1): neural cats (2) and html5app practice

Previous articles analyzed the "contingency" of neural cat games. This article mainly introduces how to design and develop the entire game through Gamebuilder + CanTk.

1. Create a project to delete the balls and lawns in the scenario, place the background image, and move the square with the cat:

Here, the background image and the circle moved by the CAT are simple Label images.


2. Place a frame animation to represent the cat

The cat has 16 statuses from squatting to standing up. Click to select an image to split the image.

3. Place the game start interface image:

Click Start game to hide the control and display the Frame Animation:

Gamebuilder provides user-friendly code editing tools, which greatly reduces the difficulty of non-programmer game development and requires almost no lines of code. You can complete complex operation logic :)

4. The main program logic is implemented in the Onopen event handler in the scenario window:

This part of the code is mostly the implementation of the shortest path and the maximum Path Algorithm. This is not covered in our discussion. You can find it in Onopen event processing on the online editing interface.

5. Finally, place an image on the game end interface to start the game again:

Implement the logic of the game when the user clicks "again:

By now, the entire neural Cat Game is basically over. It is such a simple game that swept the whole circle. It is also known as the god of God. I believe that with the help of the Gamebuilder + CanTK set of artifacts, the next game that will detonate the circle will come from you :)

References:

Https://github.com/drawapp8/gamebuilder/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3


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.