Tetris

Difficulty: Medium

551

ABOUT

The game Tetris is a great game to make in Java since it is object-oriented. My goal for this project was to make it in about two days. I wanted to add more features to the game such as a guide to help the users play the game and a High Scores list. There is multiple ways to implement and I chose a way similar to the Scrolling Marquee Java project I helped developed with a team.

Diagram

How this game works is that there is a double array of integers. This is initialized with the width and height of the game board and filled with 0's. The 0's represent empty spots and any number that is greater than 0 represents a certain colored of Tetris block. For each digit I display a Tetris block from the image 0-7 and I split it according to the value of the position in the array. In the array to the right, I  would render the "4" values as green because it is the fifth position of this image. I split this image up in 8 different positions and the first position is transparent.  

More Projects You May Like

Guitar Hero

Create a custom version of Guitar Hero in Java. A great game to practice building skills.

Baccarat

Create and learn a high payout game called Baccarat, which I built in Java.

Rock Paper Scissors Game

Create a fun and interactive rock, paper, scissors game that can play against the computer or another player.

Blackjack

Create a stunning Blackjack game in Java with an easy user interface while finding the best strategies with the AI.