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

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.

主站蜘蛛池模板: 农安县| 莱阳市| 财经| 浦县| 奉贤区| 新巴尔虎左旗| 靖宇县| 乐昌市| 阿克| 安达市| 仁怀市| 廉江市| 玉树县| 博湖县| 镇康县| 彰武县| 定州市| 博客| 霍山县| 福海县| 常州市| 泌阳县| 玉溪市| 通江县| 嵊州市| 客服| 嘉鱼县| 云南省| 福海县| 敖汉旗| 南康市| 宝丰县| 咸阳市| 广河县| 中卫市| 元氏县| 乐平市| 多伦县| 长治市| 凯里市| 安吉县|