Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dashed/tetris-sdl-c
đšī¸ A toy project implementing a simple tetris clone in C for learning SDL 2.x.
https://github.com/dashed/tetris-sdl-c
c game sdl2 tetris
Last synced: about 2 months ago
JSON representation
đšī¸ A toy project implementing a simple tetris clone in C for learning SDL 2.x.
- Host: GitHub
- URL: https://github.com/dashed/tetris-sdl-c
- Owner: dashed
- License: mit
- Created: 2014-03-14T01:34:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-12-24T21:56:12.000Z (about 7 years ago)
- Last Synced: 2024-04-15T04:21:54.189Z (9 months ago)
- Topics: c, game, sdl2, tetris
- Language: C
- Homepage:
- Size: 430 KB
- Stars: 76
- Watchers: 8
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
tetris-sdl-c
============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.gif)
**Demo on El Capitan OSX:**
[![](https://thumbs.gfycat.com/CraftyEntireCleanerwrasse-size_restricted.gif)](https://gfycat.com/gifs/detail/CraftyEntireCleanerwrasse)
Install
=======1. Install SDL 2.x ([www.libsdl.org](http://www.libsdl.org/)) in UNIX style; something like `./configure && make && make install`.
Also you'll need:
- `sdl2_ttf`: https://www.libsdl.org/projects/SDL_ttf/
- `sdl2_gfx`: http://cms.ferzkopp.net/index.php/software/13-sdl-gfxOn OSX (or macOS), you may use [homebrew](http://brew.sh/):
```sh
# As of Dec 2, 2017brew 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`
Usage
=====- Move tetromino with WASD keys or arrow keys.
- Press `spacebar` for hard Tetromino drop.- Press `r` to reset.
- Press `esc` to quit.To Do
=====- Add wall kick
- Implement any other interesting mechanics listed in http://tetrisconcept.net/wiki/Main_PageLicense
=======MIT.