VITETRIS - Tetris clone by Victor Nilsson Homepage: http://victornils.net/tetris Rotation, scoring, levels and speed should resemble the early Tetris games by Nintendo, with the addition of a short lock delay which makes it possible to play at higher levels. (It does not make it possible to prevent the piece from ever locking by abusing lock delay resets.) How to Play ----------- To navigate in the menus, use the cursor keys, ENTER to proceed (or leave a menu), and BACKPACE or ESC to go back. Exit at once with Q. Move left: LEFT Move right: RIGHT Rotate: UP Softdrop: DOWN Harddrop: SPACE To pause in a single-player game, press P or ENTER. A-type means a normal "marathon" game. In a B-type game, the object is to clear 25 lines. (You can use "./tetris -lines NUM" to change this limit.) Options ------- The first thing you want to do if you have a white background is to enter "Options" and set "Term BG" to "white" (press right). To change key bindings, go to "Input Setup". To the left are keys used in menus, to the right in-game keys. Just press the key you want to use, skip to the next with TAB. If not explicitly set, the following in-game keys depend on some other key binding (e.g. if UP is used for "Up", it is also used for "Rotate"): Rotate - Up Rot cw - A Rot acw - B Softdrop - Dwn "Rot cw" means "Rotate clockwise" and "acw" anticlockwise. ########## The display will be adjusted to the size of your terminal. There are three height modes: 20, 24 and 25. If your terminal size is not detected, you can set the width and height with command-line options, for example: ./tetris width=35 height=20 You can also hide the Top Scores or tetrominos statistics this way. To see a list of all command-line options, type: ./tetris help Or, if you can't scroll up with SHIFT-Page Up etc.: ./tetris help | less ########## Game options and highscores are saved in .vitetris in your user home dir. If the file /var/games/vitetris-hiscores exists and is readable, it is used as a system-wide highscore file. Highscores are always saved in .vitetris still, merged with new scores (from other users) read from the system-wide file. ########## It is normally not possible to drop the piece while it's in its spawn position. If you wish to disable this, add the following line to the beginning of .vitetris: nosafedrop=1 The START button on a gamepad can be mapped to act like the ENTER key. Add the following line below [js0] or [js1] in .vitetris: start=NUM where NUM is the button number (which can be found out in Input Setup). Network Play ------------ To play against someone on the internet, one needs to listen with ./tetris listen PORT (where PORT is a number, e.g. 34034); the other connects with ./tetris connect HOSTNAME:PORT HOSTNAME may be an IP address or a hostname. If it is omitted, localhost is used. If the server (the one who listens) has mode set to B-type, such a game will be set up. It is also possible to play using Unix domain sockets, which means that filenames on the local system are used as addresses. The most convenient way to set up such a connection is as follows. Start tetris on two different terminals. Then one player enters "2-Player Game", which will bring up a list of ttys. When the tty of the other player is selected, an invitation will appear on his screen. FAQ --- 1. Does it run on Windows? Not really. It works under cygwin, but the easiest way to play from a Windows computer is probably to run it remotely using ssh, e.g. with PuTTY. 2. Why does the piece not move faster when I hold down a key? As only key-press events are read, this depends on your keyboard configuration. To change the auto-repeat rate under X, run: xset r rate DELAY RATE DELAY is the number of milliseconds before auto-repeat starts (e.g. 150), RATE is the number of repeats per second (e.g. 30). On the console, kbdrate may be used: kbdrate -d DELAY -r RATE 3. The "vi" in vitetris is for the vi editor, right? I never thought about it that way until I got this question. Sure, it is all written in Vim. But those two first letters are from my first name. Credits ------- The original Tetris game was designed and programmed by Alexey Pajitnov in 1985. The wiki at tetrisconcept.com has been a valuable resource. tt "Tetris for Terminals" was written by Mike Taylor in 1989. Hugo Fernbom and Andreas Carlsson have helped me with testing, ideas and feedback.