Using HTML 5 to develop a body sense game: A brief introduction to Velomaze development

Source: Internet
Author: User

HTML5 is now more and more like a game development platform. But sometimes the game area sets a lot of limits on how to apply HTML5 features, especially for those accessing hardware devices.

In early November 2012, I joined the Copypastel group and decided to share my experience in developing games in the third annual Nodeko competition. I believe the results are still worth sharing with readers interested in game-related technology, despite the inability to explain the whole project due to time constraints. Next, I intend to expose the game's technical background and how to build the entire project on the basis of a variety of network technologies. The techniques applied to the game are: node.js,express (static content Service), Socket.io (handling client and server-side communication about ball reciprocating motion), sylvester.js (vector Library of physical engine) and jquery.

Then what is Velomaze? Velomaze is a maze occupied by many point-like dinosaurs (raptors). The Raptors want the ball to move in the maze all the time. Because of the continuity of the maze, it can be said that there is no end. But every time you pass a level, it will cause more trouble to the player after you because he or she will get another ball! Isn't it funny? This is the life in the maze.

This game is perfect for those who are in the same place, and everyone has a mobile phone team. This is very common today. There is also a video explaining the requirements of the game system.

The most important condition for system operation is the accelerometer. Accelerometers are devices for measuring acceleration. Devices with accelerometers usually return the gravitational angle or vector data of gravity. This is possible in some browsers, as mentioned in the following Web posting:

iphone and ipad 4.2 Safari: Accelerometer, Web interface and better HTML 5 support

What are some good examples of using the HTML 5 accelerometer in Web sites and Web applications?

Use iOS devices to provide game control based on HTML 5 accelerometer

As you can see from the video that describes the system requirements, there are also accelerometers in some laptops. Quite a few new MacBook Pro notebooks also have accelerometers installed to prevent hardware damage from falling (one was installed in my 2009 laptop). I think the field of game development based on notebook rotation is still a rare area of people's involvement! The following diagram shows how the application architecture is built at the top.

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.