- Hands-On Game Development with WebAssembly
- Rick Battagline
- 123字
- 2021-06-24 13:41:09
Summary
In this chapter, we learned how to get keyboard input for use with WebAssembly. There are two primary methods. We could either take in keyboard input on the JavaScript side and communicate with WebAssembly through a wrapper made with Module.cwrap, or by calling WebAssembly functions directly with Module.ccall. The other way to accept keyboard input in WebAssembly is by using SDL keyboard input events. When we use this method, we can use the default Emscripten shell. This second method, using SDL events, will be our preferred method throughout the rest of this book.
In the next chapter, we will learn more about the game loop and how we will use it in our game, as well as games in general.
推薦閱讀
- 極簡Spring Cloud實戰
- 深入淺出SSD:固態存儲核心技術、原理與實戰
- 3ds Max Speed Modeling for 3D Artists
- 硬件產品經理手冊:手把手構建智能硬件產品
- 筆記本電腦維修不是事兒(第2版)
- Learning Game Physics with Bullet Physics and OpenGL
- 微軟互聯網信息服務(IIS)最佳實踐 (微軟技術開發者叢書)
- Spring Cloud微服務架構實戰
- Creating Flat Design Websites
- Hands-On Artificial Intelligence for Banking
- 單片機技術及應用
- FL Studio Cookbook
- Corona SDK Mobile Game Development:Beginner's Guide
- 計算機組裝、維護與維修項目教程
- The Machine Learning Workshop