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

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.

主站蜘蛛池模板: 富裕县| 天等县| 舟曲县| 汝阳县| 营山县| 涟源市| 济阳县| 商都县| 莱芜市| 彰武县| 彝良县| 翼城县| 永兴县| 三原县| 长宁区| 建始县| 泾阳县| 本溪市| 永安市| 遂宁市| 乌审旗| 嘉峪关市| 杭锦后旗| 运城市| 麟游县| 正安县| 太仓市| 万年县| 清水县| 西华县| 利辛县| 视频| 康定县| 宁国市| 柳江县| 聊城市| 浮梁县| 县级市| 大同县| 武夷山市| 永顺县|