Learning by Doing, Tetris in Webassembly, a Roadmap
The current goal of this blog is to implement a Tetris clone in Webassembly. During the course of this implementation, we are going to touch on key Webassembly development points and hopefully we are going to have a better understanding of what it takes to have a full project implementation in Webassembly. This is not going to be a quick and dirty implementation, we are going to try to address concerns as debugging, loading time, split code into multiple modules, etc…
Here is an unordered and not comprehensive list of tasks to get there (
crossed items are already done): Setting up C/C++ environment.How to Update the Emscripten C/C++ Compiler
How To Setup Webassembly in a Windows PC?
Exception, what happens?Webassembly, Traps, Exceptions and other learning experiences
Taking a look at a Webassembly module.Dissecting a Minimum (Useful) Webassembly Module
User browser supports webassembly?This Browser Supports Webassembly? At what degree?
In browser debug.Using Browsers To Debug Webassembly
Webassembly and the DOM.Webassembly can’t access the DOM. What?
Print based debug.
How To Debug Webassemly?
- SHA256.To be used to avoid loading a Webassembly module that is already locally loaded in indexDB.
- Unit test framework to test SHA256.To test the SHA256 implementation.
- IndexDB.To be used to avoid loading a webassembly module that is already loaded in indexDb.
- Create 2 separate Webassembly modules and make sure they are loaded only if they are not present in IndexDB.
- Random().So the game can choose the next block.
- Implement a Monte Carlo algorithm to test the Random function.
- Key strokes, passing them to Webassembly.
- HTML canvas.Game presentation layer.
- TETRIS!! Rules and implementation details.
- Pieces: Data structure Rotation Down Collision Play field Scores Next piece
Subscribe to the mailing list to receive an email whenever a new post is out!
Image above from WikipediaLeave a message below. Webassembly is evolving rapidly, please let me know if this post got outdated.