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

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.

主站蜘蛛池模板: 保亭| 和静县| 中卫市| 沧州市| 高雄市| 湘乡市| 喀喇| 沙坪坝区| 宜春市| 西乌珠穆沁旗| 闸北区| 临城县| 丹棱县| 辽宁省| 焦作市| 米泉市| 溧阳市| 井陉县| 中方县| 临汾市| 吉安市| 凤翔县| 诸城市| 德昌县| 南开区| 临沭县| 城口县| 黑水县| 吉隆县| 达尔| 肇州县| 英山县| 怀远县| 洛宁县| 嘉鱼县| 建德市| 抚远县| 阳原县| 伊宁市| 越西县| 湘乡市|