DEV Community

Cover image for Innovating on Tetris
Justin Nearing
Justin Nearing

Posted on • Edited on

Innovating on Tetris

While I am in the games industry, my day job has me in the #DevOps and #SRE world. I wanted to get back to my #GameDev roots, and decided to jump headfirst into a new game prototype: Build Tetris, then innovate.

The following is an in media res snapshot of the planning around my Innovating on Tetris project. Hopefully there is something to learn on how I've approached this project to help you achieve your goals on your gamedev journey.

You can follow along with the open repo here.

Step One: Build Tetris

We all know it. Pretty dope stuff.

Uses SRS rotation, the rotation system users didn't realize they want. Handles wallkicks.

Basically an exact copy of the (amazing) YouTube tutorial by Zigurous. This includes their assets and copypasta tetromino data.

There are some nice advantages of taking an existing game and innovating on top of it. It gets you a first milestone very quickly- a couple hours to get Tetris working (thanks to the tutorial).

From that starting point, I can really start thinking about my goals for the remainder of the project.

Step 2: Define Goals

There are a bunch of different goals I'm working on for this prototype. Maximum learning and experimentation is top-of-mind, all the while pushing to become a better developer.

Design Goals

Detailed Design requirements in Blog/multiboard_tetris_design.md

  • Stitch multiple boards together.
  • After clearing arbitrary amount of lines from current board, move to the next board.
  • Complete all boards to complete game.

Programming Goals

For this project I'll be dusting off Unity3d for the first time in over 4 years (coincidentally my kid is 4... funny how that works).

The nice thing about choosing a well established casual game with tons of tutorials, is it allows you rediscover all those Unity basics- GameObjects and Components and Monobehaviours.

From there I can start playing with different features and think critically about the code I'm writing.

Large Goals

  • Unity UI DONE
  • Data Serialization DONE
  • Gameplay Manager DONE
  • Better Input Systems
  • Complete Multiboard Tetris feature requirements

Small

  • Score/Reward
  • Scaling Speed on line(s) cleared.

Completed Goals

  • Complete Tetris Tutorial
  • Dynamic Border
  • Dynamic Background Grid
  • Add proper new piece queue (A bag containing each piece randomly chosen until every piece chosen, then create new bag). "Real" Tetris shouldn't be full random Piece selection.
  • Dynamic Camera
  • Multiple Boards
  • Board Editor mode
  • Gameplay Manager

Known Bugs

  • Ghost piece shouldn't search from bottom up, it should start from top and search down.
    • If the I piece is the first to spawn, its Ghost will be placed in an incorrect position.
    • The ghost for I in general seems a bit messed up. I think its because its the only piece that is one size high.

Top comments (0)