Skip to content
/ tetris Public

Play Tetris! Saves high scores for up to 3 users.

Notifications You must be signed in to change notification settings

nedsels/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Tetris

Instructions

1. User menu

image
  • Use Up↑ and Down↓ arrows to navigate user menu
  • Press Enter on a blank user (_____) to add a name
  • Press Backspace on an existing user to delete
  • Press Enter on an existing user to begin playing

2. Add user screen

image
  • Hover the cursor over the grey box to type in a name
  • Maximum 13 characters allowed
  • Press Enter to confirm and begin playing

3. Delete user screen

image
  • Press Enter to delete user
  • Press Backspace to cancel and return to menu

4. Game

image

Blocks of different shapes will fall from the top. You can move them, left, right, and down, and rotate them. You can also lock them to the "ghost block" shown at the bottom of the game area.

You earn points when you press down and complete rows. The more rows you complete simultaneously, the more points you are awarded. Every 500 points, your level increases, and so does the speed at which the blocks fall. If a new block that spawns at the top overlaps with a block that has already fallen, the game is over.

Controls

  • Press Right→ to move the falling block right
  • Press Left← to move the falling block left
  • Press Down↓ to move the falling block down
  • Press Up↑ to rotate the falling block clockwise
  • Press Enter to lock the block to the position of the "ghost block" at the bottom
  • Press Space to pause the game
  • Press Backspace to end the game and return to the menu
  • When "GAME OVER" shows, press any key to restart the game

Credit

  1. This tutorial was followed, excluding the sounds. However, the menus, pause feature, highscore and users, scoring system, level and speed system, and ghost blocks were made by me.
  2. This uses the Raylib library.

To do

  1. Add include guards to .h files.
  2. Create horizontal and vertical text centering functions in main.cpp to avoid manual centering for each piece of text.

About

Play Tetris! Saves high scores for up to 3 users.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published