Game Development Reference
In-Depth Information
tetrominoe, I would just cheat and store four versions of each tetrominoe for
each direction it can be rotated. When the player presses the rotate button, the
current tetrominoe can be replaced with another new tetrominoe piece that is its
next rotation. Instead of 1
1 blocks continually falling from the top of the play
area to the bottom, random tetrominoes should be created.
The final challenge regarding Tetris is the chain reaction rule. This rule is shown
in Figure 11.4. Sometimes completing a row in Tetris leaves some blocks im-
mediately above the row hanging in space. These blocks need to fall down. When
these blocks do fall down they, in turn, may trigger the completion of another
row and this may cause a chain reaction.
The chain rule can be quite tricky; after a row is completed, the Tetris board
needs to be searched for any free pieces that can move down. All free pieces are
then moved down, and before the game resumes, all the rows need to be checked
to see if any have been completed. If you follow this rough road map, you should
have a reasonable Tetris without too much hair pulling.
First-Person Shooter Games
First-person shooter games may seem a little intimidating as they require famil-
iarity with a lot of complex mathematics. A lot of the complexity of 3D games
Figure 11.4
A first step towards a Tetrisgame.
 
Search WWH ::




Custom Search