Tet.rs

####TET.RS Tetris is a deceptively challenging game to program - especially if, like me, you’ve only really made action games before. I got pretty frustrated trying to wrap my head around the architecture of the program - this conceptual implementation was a great help.

Creating a system that restricts the movement and rotation of the pieces to make sure they don’t leave the boundaries of the grid or clip placed blocks is tough. In the end I went with an ‘undo’ system that makes the tranformation (rotational or horizontal), checks whether that new position is valid, and undoes the transformation if it’s not. Moving blocks are not monitored by the grid manager, only when they reach a resting position are the cells ‘checked in’ to the grid. At this point we check & clear full rows and shift down the above rows appropriately.

The track playing is In Decay, by Com Truise. It’s available from Ghostly International.

Project Details

Date: May 20, 2015

Team: Jack Harrison

Download Links:

Tagged: Game, Clone, Learning

Source: GitHub

More Projects.

About

Making games is crazy good fun. I'm working to improve my skills by creating clones of classic games, covering a wide range of genres and complexity. Check it out!

Contact