官术网_书友最值得收藏!

Summary

You learned a lot in this chapter about the basic techniques of creating a simple Ping Pong game with HTML5 and JavaScript. Specifically, we created our first HTML5 game—Ping Pong. In the game, we used jQuery to manipulate DOM objects. We were able to use the mouse event to get the cursor position. We used a very simple method to detect collisions with the bounding box. In the logic, we separated data manipulation and view rendering. We also discussed how to create a game loop and move the ball and paddles.

Now that we've warmed up by creating a simple DOM-based game, we are ready to create more advanced DOM-based games with new features from CSS3. In the next chapter, we will create games with CSS3 transition and transformation.

主站蜘蛛池模板: 钦州市| 乌兰察布市| 西峡县| 福州市| 四会市| 都安| 二手房| 平谷区| 沙田区| 佛学| 佳木斯市| 建湖县| 灌云县| 徐水县| 荥经县| 灵宝市| 革吉县| 上饶市| 武清区| 湘潭县| 深泽县| 渝中区| 松潘县| 永丰县| 探索| 钟山县| 剑川县| 丰镇市| 龙海市| 越西县| 元谋县| 柳州市| 库尔勒市| 铜山县| 南阳市| 宿迁市| 安义县| 岑巩县| 凤山市| 黑龙江省| 丽江市|