3D Tetris - XNA Gaming Heaven
Computers, Gaming, Programming, Student, University, Xbox 360 8 Comments »3 weeks ago, we were given an assignment to work on in small groups. The assignment was to make a game for the Xbox 360 in XNA Game Studio Express, which could either be 2D or 3D. The possibilities were endless, and so me and my partner Conrad decided to go all out and port one of the most popular 2D games (Tetris) to a 3D environment.
When our lecturer first heard about this, he was concerned that it might be a bit too much work for 3 weeks, and that we should start out small, perhaps trying to make 2D Tetris, and then if we thought we could port it across, start to make it in 3D. Fuck that we thought, and started planning a 3D game engine.
Of course, being lazy students, we didn’t do much but plan for the first 1.5 weeks, and then realised we had so much to do in very little time. So we started out by building an environment, which had a rotatable platform, and an array of booleans that would act as the movable area for the blocks. We then decided that even if Tetris 3D was even possible to play in 3D, it would be the hardest game ever…and so we did what any irrational programmer would do…make it harder. We renamed out project “3D Psychedelic Techno Tetris”, applied a spinning background with awful clashing colours, and added the aptly named “Logical Song” by German techno band Scooter…on and infinite loop.
Programming went better than we had ever expected, and we soon had a fully playable game that used a multitude of clever and intuitive methods to move and detect blocks. Without intending to do so, we had inadvertently created the first fully operational 3D Tetris Engine, which could be easily modified, and content (such as new bricks) easily plugged in. Since everything in controlled by a series of constants and calculations, you can easily change the size of the platform, the shapes of the blocks, and even the way the camera moves around the grid, and the game will work out how to make it playable. As so many people have claimed for so many different products: “It just works”.
So I guess I should get down to features:
- Blocks spawn at the top of the environment and move down until they either hit the platform or another block.
- Blocks can be rotated about the X, Y, and Z axis.
- A “shadow” block predicts where the block will come to rest if you were to do nothing further to it.
- Lines and columns that are “complete” will disappear and blocks above will move down to fill the gaps.
- The next block is displayed in the top right corner, and score / level system components are kept track at the bottom.
- The camera can be moved 360 degree around the platform, as well as up above the platform for a birds-eye view, and down the bottom for a normal tetris view.
Some pictures:
The game when you have just started. The first brick is floating above the platform, whilst the shadow brick predicts where it will fall. Both the current brick and the next brick are the same, and examples of the new types of brick we created in the game for the 3D version. Other than the standard bricks, there are 5 extra bricks to make the game more challenging.
![]()
An alternate view is gained by rotating the camera.
![]()
An example of how things can rapidly build up if you don’t play well enough.
![]()
What happens if you really mess up…
![]()
I should point out that all images above were prepared by myself in the game, and I am really not as bad at this game as it appears. I am in fact the current world champion at 3D Tetris, with a score of 3800 at level 8, and I welcome anyone who reckons they can score more than me.
Popularity: 4% [?]















Recent Comments