Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 1.45 KB

README.md

File metadata and controls

73 lines (48 loc) · 1.45 KB

A Tetris Clone

Controls

Key Action
A / H / ← Move current piece to the left
S / J / ↓ Move current piece down
D / L / → Move current piece to the right
Z / ␣ Rotate current piece clockwise

Building

To build, you will need the following C/C++ libraries and headers available:

  • GLFW (Graphics Library Framework)
  • GLEW (The OpenGL Extension Wrangler)

Ubuntu (and likely most Debian-based distributions as well):

# apt install libglfw3 libglfw3-dev libglew2.1 libglew-dev

Fedora:

# dnf install glfw glfw-devel libGLEW glew-devel

Arch Linux:

# pacman -S glfw glew

Then, to compile it using GCC, just run

make tetris

or simply

make

(Assumes the pkg-config command is globally available)

Additionally

make DEBUG=1

compiles with the -g flag (for debug information) and no -O,

make TRACK_FPS=1

will flood your stdout with some measure of frames per second when the game is ran,

make FAST_RENDER=1

will render the game by mapping each tile of the field to a texel instead of doing more complex vertex / triangle stuff, which I think is pretty neat, but doesn't seem faster at all... I mean, it's still about 10000 FPS on my machine but...

Of course, you can mix those flags whatever way you like.