Skip to content

olzhasar/sdl-tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL Tetris

An implementation of the classic Tetris game in C programming language using SDL-2 library

WebAssembly

The game has been ported to WebAssembly using Emscripten

Check out the Live Demo

Desktop preview

Preview

Installation

Clone this repository to your system:

git clone https://github.com/olzhasar/sdl-tetris.git

Install SDL2 and SDL2_ttf on your machine

On MacOS you can use Homebrew:

brew install sdl2 sdl2_ttf

Compile and run the project code with make

cd sdl-tetris
make

Controls

  • Rotate - Up arrow, W
  • Left - Left arrow, A
  • Right - Right arrow, D
  • Soft Drop - Down arrow, S
  • Hard drop - Space
  • Quit - ESC

TODO

  • Next shape preview
  • Sounds