A toy project implementing a simple tetris clone in C for learning SDL 2.x.
Clone or download
Latest commit 80e6bad Dec 24, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
src update score Dec 2, 2017
.gitignore clean up. add tetromino hard drop. Mar 14, 2014
LICENSE add MIT license Mar 14, 2014
README.md macOS Dec 24, 2017
demo.gif refactor + ghost tetromino Mar 14, 2014
makefile removed unnecessary link Mar 16, 2014



A simple tetris game implemented in C using SDL 2.x. This is just a toy project to play with and learn SDL 2.x.

Demo on Snow Leopard OSX:

Demo on El Capitan OSX:


  1. Install SDL 2.x (www.libsdl.org) in UNIX style; something like ./configure && make && make install.

    Also you'll need:

    On OSX (or macOS), you may use homebrew:

    # As of Dec 2, 2017
    brew install sdl2
    # http://formulae.brew.sh/formula/sdl2_gfx
    brew install sdl2_gfx
    # http://formulae.brew.sh/formula/sdl2_ttf
    brew install sdl2_ttf
  2. make to create tetris_toy

  3. ./tetris_toy


  • Move tetromino with WASD keys or arrow keys.

  • Press spacebar for hard Tetromino drop.

  • Press r to reset.

  • Press esc to quit.

To Do