Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brenns10/tetris
Tetris in C and NCURSES.
https://github.com/brenns10/tetris
c game ncurses sound tetris
Last synced: about 10 hours ago
JSON representation
Tetris in C and NCURSES.
- Host: GitHub
- URL: https://github.com/brenns10/tetris
- Owner: brenns10
- License: bsd-3-clause
- Created: 2015-06-11T13:20:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-09-25T23:56:21.000Z (over 5 years ago)
- Last Synced: 2024-12-23T13:59:45.436Z (4 days ago)
- Topics: c, game, ncurses, sound, tetris
- Language: C
- Homepage: https://brennan.io/2015/06/12/tetris-reimplementation/
- Size: 104 KB
- Stars: 239
- Watchers: 13
- Forks: 60
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Tetris
======![tetris.gif](tetris.gif)
A tetris game in C using NCURSES. It's pretty feature complete, except for
stretch goals I may pick up in my free time.Building
--------My dependencies are:
* `libsdl` and `libsdl_mixer` 1.2 for sound.
* `ncurses` for terminal manipulation.To install them on Arch Linux:
sudo pacman -S sdl_mixer ncurses
To install them on Ubuntu:
sudo apt-get install libsdl-mixer1.2-dev libncurses5-dev
To compile:
make
To run:
bin/release/main
You will need to provide a file named `tetris.mp3` in the same directory that
you're running the game from. As I understand it, the official Tetris theme
song is legally protected in the use of games like this, so I will not be
providing or linking to that. But I'm sure you could find something! (**You do
not need to provide `tetris.mp3` in order to play the game, only if you want
sound!**).Instructions
------------The controls are typical of Tetris:
* ← and →: Move the tetromino,
* ↑: Rotate (clockwise?) the tetromino,
* ↓: Immediately drop the tetromino (not a fast drop, an immediate drop),
* Q: Exit the game prematurely,
* P: Pause the game (any key to resume),
* B: "Boss mode" - show a mock terminal screen to fool nosy onlookers. Hit
F1 to resume the game afterwards.
* S: Save game and exit (just assumes filename `tetris.save`). To resume the
game, run `bin/release/main tetris.save` (or whatever you may have renamed the
game save to).Future/Stretch Goals
--------------------* Sound effects (in addition to the theme music).
* Networked multiplayer!