This is a small (4 week) project, building a low-level tetris game. It's main goal was getting familiar and comfortable with writing assembly code, and learning about new concepts along the way.
The code was written mostly with NASM (~1250 lines of code), and the rest with C (~250 lines).
It was written for linux OS, Using XLib for graphics and ALSA for music.
The first part of the project was the graphics interface, written with C. It used XLib to create a window and to draw on it, and it implements simple functions (drawRect, drawText...). It uses an event based system to run the game.
The second part was the game logic, written in assembly. It Used the previously implemented event system to work.
The project can be compiled with $ make
, which produces a single executable called Tetris
.
You can also run it directly using $ make run
.