- HTML5 Game Development by Example:Beginner's Guide(Second Edition)
- Makzan
- 132字
- 2021-07-16 14:09:59
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.
推薦閱讀
- Vue.js 3.x快速入門
- jQuery Mobile Web Development Essentials(Third Edition)
- Learn Type:Driven Development
- Rust編程:入門、實戰與進階
- Python數據分析(第2版)
- Xamarin.Forms Projects
- 深入理解Elasticsearch(原書第3版)
- Swift Playgrounds少兒趣編程
- 編程與類型系統
- C和C++游戲趣味編程
- Spring技術內幕:深入解析Spring架構與設計原理(第2版)
- Python網絡爬蟲技術與應用
- 從0到1:HTML5 Canvas動畫開發
- Learning Ionic
- C++ System Programming Cookbook