This is a simple Tetris clone, made in Odin using the Raylib game framework. This is simply an exercise. I make no claims about the correctness of the code. Use it for examples, fork it if you want. This is unlikely to receive updates.
If you have the Microsoft C/C++ extension and the Odin compiler in your system's PATH
, cloning this repo, opening the folder in VSCode, selecting the appropriate debug mode (Windows or Linux), and starting the debugger should build and run the game.
Both build scripts support the follwing options:
debug
- builds a debuggable version of the gamerelease
- builds a release version of the gameclean
- removes theout
folder. Intended to be used while developing to generate clean builds.
./build.sh
with one of the above options builds the game in ./out/Debug
or ./out/Release
, depending on the option chosen.
Identical to Linux, save for the script: powershell.exe -File ./build.ps1
is the command to run the build script.
A
: Move block leftD
: Move block rightS
: Speedy DropJ
: Rotate block clockwiseK
: Rotate block anticlockwise