Skip to content

nhlmg93/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tetris

A minimal Tetris clone written in C11 with raylib. The entire game lives in a single main.c file.

Requirements

On Arch Linux:

sudo pacman -S raylib

Build

git clone https://github.com/nhlmg93/tetris.git
cd tetris
make

make downloads only json.h from stb into vendor/ (requires curl).

Run the game from the project root so shape assets can be loaded:

make run

Format the source:

make fmt

Assets

All tetromino shapes live in assets/shapes.json and are loaded once at startup. JSON is parsed with stb json.h (fetched by make; define JSON_IMPLEMENTATION in one source file).

Controls

Key Action
Left / A Move left
Right / D Move right
Up / W Rotate
Down / S Soft drop
Space Hard drop
R Restart

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors