Skip to content

jpsheehan/tetris

Repository files navigation

Tetris

A simple implementation of the popular falling block game.

a screenshot of tetris

Prerequisites

Debian

sudo apt install liballegro5-dev make

Windows

  • Visual Studio. All dependencies should be automatically restored as needed by NuGet.

Tasks

Gameplay

  • Restore the "remaining lines" text
  • Add a "lines cleared" text
  • Add a locking delay for soft locking
  • Add a timer to the HUD
  • Detect T-Spins for scoring
  • Detect combos for scoring
  • Detect perfect clears for scoring
  • Detect lock-out (locking down above the play area)
  • Fix up the input (it doesn't feel right)
    • I think it needs to accept your first input, then wait a little bit before being sensitive
    • At the moment it is too sensitive
  • Add a way to pause the game (think about blurring the stack)
  • Display a Win/Lose screen with the final score.
  • Offer to let the user type their initials here (for high score if neccessary).
  • Add a short delay after clearing line(s)

Fluff

  • Add a countdown before starting
  • Smooth out the preroll (we have 60 fps, let's use it!)
  • Add some background graphics (maybe this could be based on the level?)
  • Add a program icon (and window icon)
  • Add a fullscreen mode (press F11)
  • Scale the app window when resized
  • Add more information about each mode in the menu
  • Add a sound effect for when rotation fails
  • Add a sound effect for leveling up
  • Add some special effects for when lines are cleared (perhaps even animate the lines clearing)
  • Upscale the UI to 640x480
  • Think about using panning based on the piece position.

Menu Stuff

  • Add a menu system
  • Add more modes:
    • sprint (40 lines, leaderboard is time-based)
    • marathon (complete level 15, 150 lines, leaderboard is score based)
    • ultra (2 minute timed, leaderboard is score based)
    • endless (leaderboard is score based)
  • Add pause-menu option to restart
  • Offer confirmations for restart and and abandon
  • Add highscores for each mode
    • View the highscores before entering the mode
    • Show each "next" highscore to beat during the game
  • Add options for muting sounds
  • Add a retry menu after finishing the game
  • Add a debug menu with setups for testing common patterns
    • Test line clears
    • Test perfect clears
    • Test T-Spins
    • Test T-Spin minis

Bugs

  • Fix sounds dropping out from preroll... sometimes??? Usually after pausing.
    • The preroll timer was being skipped because it was counting too fast in some instances.
  • We appear to do too much in the input loop for the game (MIGHT NOT BE AN ISSUE ANYMORE)

CI/CD

  • Get GitHub Actions creating build artifacts for download.
  • Investigate using CMake instead. I might be able to get it compiling for all three major operating systems using GHA that way.

Credits

Audio

About

A simple game of Tetris written in C.

Resources

Stars

Watchers

Forks