A simple tetris clone written in zig programming language.
https://raulgrell.github.io/tetris/
- Left/Right/Down Arrow - Move piece left/right/down.
- Up Arrow - Rotate piece clockwise.
- Shift - Rotate piece counter clockwise.
- Space - Drop piece immediately.
- R - Start new game.
- P - Pause and unpause game.
- Escape - Quit.
- Zig compiler - use the debug build.
- GLFW
- libepoxy
- libpng
- Browser supporting WebGL
Run the following command from the project root:
zig build
Open the index.html file to run. You can also run a local http live server on the project root so the game restarts whenever you make a change. If you make changes to the zig code, rebuild the wasm binary by running the following command from the project root:
zig build-exe -target wasm32-freestanding --release-small src/main_web.zig