Wednesday, July 5, 2017

Tetris Game

Tetris is a very popular game among children. It is considered one of the arcade/classical games. An aspiring game developer is recommended to develop a game of Tetris. It is the "Hello World of the Gaming Industry". Wiki page of Tetris says It is a tile-matching puzzle video game, originally designed and programmed by Russian game designer Alexey Pajitnov.
Readers and players would not need any instructions to start playing this one. The Goal? It is to play as long as possible. The game is time based. We would have played this game in our mobiles/consoles since childhood is'nt it.
Developing this game is not as easy as playing it and will test the intelligence of an average coder.
I encountered some problems in rotating the tetris and stacking the tetrises over one another. I am giving a link to my GDrive the code that implements the game of Tetris that I developed. You are welcome to modify the code and I would recommend you give out this code to others too. In the game I developed some problems are yet to be sorted out.
>>>>>Click Here<<<<< for the Code.
If you want to modify my code then you need to
1) Detect the end of the game.
2) Display points scored and create a two level game.
3) Draw the boxes in a better manner may be with borders for each box and some pattern filled inside them.(OO code esp a class to draw each Tetris may be useful here)
4) Delete a completed row at the bottom and increment the points which it does not do.
5) If down arrow is pressed the Tetris should fall by two or more steps.

As a developer it gives me immense displeasure to display "Game Over" and most of the time based games I develop do not have any end. I just let players start the game and play and whatever happens in the end is the untested and un-anticipated part.

No comments:

Post a Comment