- Hands-On Game Development with WebAssembly
- Rick Battagline
- 208字
- 2021-06-24 13:41:02
HTML5 and game development
Most HTML rendering is done through the HTML Document Object Model (DOM). The DOM is what is known as a retained mode graphical library. Retained mode graphics retain a tree known as a scene graph. This scene graph keeps track of all the graphical elements in our model and how to render them. The nice thing about retained mode graphics is that they are straightforward for a developer to manage. The graphical library does all the heavy lifting and keeps track of our objects for us as well as where they render. The downside is that a retained mode system takes up a lot more memory and provides a lot less control to the developer. When we write HTML5 games, we could take images rendered in the DOM using <IMG> HTML elements and move those elements around using JavaScript or CSS animations to manipulate the positions of those images within the DOM directly.
However, this would, in most circumstances, make the game painfully slow. Every time we move an object in our DOM, it forces our browser to recalculate the position of all other objects within our DOM. Because of this, manipulating objects from within our DOM to make web games is usually a non-starter.
- 圖解西門子S7-200系列PLC入門
- 數字道路技術架構與建設指南
- Effective STL中文版:50條有效使用STL的經驗(雙色)
- 辦公通信設備維修
- 電腦組裝、維護、維修全能一本通(全彩版)
- Artificial Intelligence Business:How you can profit from AI
- 電腦軟硬件維修從入門到精通
- 基于Apache Kylin構建大數據分析平臺
- SiFive 經典RISC-V FE310微控制器原理與實踐
- Building 3D Models with modo 701
- Source SDK Game Development Essentials
- 深入理解序列化與反序列化
- RISC-V處理器與片上系統設計:基于FPGA與云平臺的實驗教程
- Python Machine Learning Blueprints
- 筆記本電腦芯片級維修從入門到精通(圖解版)