The original Tetris game would delete a row once it became completely filled in, but this code doesn't do that. It also kept score and the original game was in color. You could add all of these things, the first two by making functional changes to the code, and the last item by means of the previously mentioned ANSI Escape sequences. Sep 03, 2014 Creating Tetris Using Visual C Windows Form. Submitted by pavel777 on Wednesday, September 3, 2014 - 09:25. Tetris is an old and simple game of the puzzle matching kind. This game is a good example of creating a game application for every beginner developer.
A tetris game in C using NCURSES. It's pretty feature complete, except forstretch goals I may pick up in my free time.
Building
My dependencies are:
libsdl
andlibsdl_mixer
1.2 for sound.ncurses
for terminal manipulation.
To install them on Arch Linux:
To install them on Ubuntu:
To compile:
To run:
You will need to provide a file named tetris.mp3
in the same directory thatyou're running the game from. As I understand it, the official Tetris themesong is legally protected in the use of games like this, so I will not beproviding or linking to that. But I'm sure you could find something! (You donot need to provide tetris.mp3
in order to play the game, only if you wantsound!).
Instructions
The controls are typical of Tetris:
Dev C++ 5.11
- ← 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. HitF1 to resume the game afterwards.
- S: Save game and exit (just assumes filename
tetris.save
). To resume thegame, runbin/release/main tetris.save
(or whatever you may have renamed thegame save to).
Free Tetris Game
Future/Stretch Goals
Dev C++ Bloodshed
- Sound effects (in addition to the theme music).
- Networked multiplayer!