TETRATOR POSTMORTEM
IT’S POSTMORTEM TIME !!
This Ludum Dare #32 was the first one I made an entry for. You would think I would show my creativity and innovative spirit by making something incredibly original and new and stuff… Nope ! Made a Tetris clone instead 😀 .
Why would I even do that ?
I strongly believe that there is much to learn in cloning games. See how people made their game, what makes it good (and worthy of your cloning), what are its flaws, and of course how can you make it your game and how could you make it better. Of course this really is worth doing on games you already appreciate rather than on ones you don’t like. If you think they’re good, how awesome would it be if you could make them even better ?
Besides, I’ve been wanting to try and make a Tetris clone for some time now.
When I first saw the Ludum Dare #32’s theme ‘unconventional weapon’, I had no idea of what I was going to do. Being in my bed at that moment since I had just woken up I lied there thinking. Ideas of shooters came first but I couldn’t get something unconventional enough. I figured out the good idea wouldn’t be found by just looking directly around the theme. So I thought about the things I wanted to do. The Tetris clone thing came up. How about a Tetris-powered weapon ? That’s unconventional right ?
Behold the TETRATOR !
Quick note #1 : PRETTY COLORZ
The color-changing that makes the game look so charming is the first thing I set up. That was an old idea I had when playing around with writing text (that’s more exciting than you think). Basically I had a color-changing text with a grey shadow homemade effect and I thought it would look cool if a whole game was exactly like that.
Basically, what I did is drawing everything in white on a black background first, then use it as a stencil for what you actually see, drawing the grey shadow first and then the colored thing with magic secret mathematical formulas for the colors. And that’s being done each frame.
Making a Tetris game !
Here is what you should know about making a Tetris game :
– It takes probably more time than you think. I hoped it would take maybe slightly more than 4 hours. It took me the whole first day along with the color thing.
Tetraminos !
– Each tetramino shape should have its own block style with a different symbol. Just makes it feel way more polished.
– Tracking the blocks that are already in the Tetris board with a boolean table is the right idea.
– You’ll have to manage collisions for each tetramino shape, in each rotated state, for both the tetramino’s fall, moving the tetramino left and right and rotating the tetramino left and right. It’s not very complicated but it is boring and it takes a lot of time.
– Deleting lines probably may prove to be extremely buggy while it is being coded. That slowed me down a bit.
– A good scoring system is also needed. In ‘authentic’ Tetris games the score goes up for almost anything and getting thousands of points isn’t that hard. I did simplify it though, because the ‘authentic’ Tetris score system is quite complicated and I didn’t want to dive into that. When a piece is laid down you get 5 points. If you pressed up to lay the piece down instantly you get 95 more points. When you complete lines you get [the nomber of line]²*500 points.
– The difficulty curve should be worked on. I made the mistake of not spending enough time on that as I did it in the very end. Almost every one who played the game said it was getting too hard too early. Which I understand as the tetraminos going too fast, too early.
– Be prepared for the fact that everyone already played Tetris. People will compare your Tetris game to the one they already played. They will say how they are ‘already’ bad at Tetris if they are. They will say controls are weird, however you put these, simply because most Tetris games have different controls. Several comments were speaking of how the up key should rotate the tetramino and the down key should do what the up key does (which is finish the tetramino’s fall). I set the controls I was used to because I felt like they were comfortable. I guess the best thing about that would have been to make the controls rebindable but that would have taken time and it doesn’t sound very exciting to do…
Quick note #2 : Unsuspected technical difficulties

Don’t mind the mess in front of my screen
When I woke up the second day, I was all pumped up, ready to make an awesome game out of my Tetris game. I got to my PC which is just by a big plate-glass window that has no shutter. I never used that PC that early before. The sun was hitting the screen directly from outside the window which it usually doesn’t. I couldn’t see a thing on my screen. Made an opaque curtain out of clothes and even had fun while doing it.
Making an ‘original’ game out of my Tetris game !
I already had the idea of enemies coming from the left of the screen and that would make you lose if they get to the right of the screen. So I started with that.
Every second, a ‘pixy’ (that’s how I called them in the code, before I see them as invaders) is created. The new pixy is randomly either a normal, a normal bis, a small or a big one. Small ones go faster, big ones go slower but take two missiles to kill and the difference between the two normals is purely graphic. Even so, the speed of each invader is slightly random and is set higher at higher levels.
I do recommend to have several graphical versions of your default enemy because that adds diversity to the game and that leads directly to that ‘polished game’ feeling.
I also do recommend to have the slightest random factors for the same reason. Random can be very frustrating but none of it sets very strict boundaries to your game. So make sure you have the right amount !
Also, the pixies jump. In fact they jump quite a lot. They jump way more than I first thought they would. But that’s actually really good. Each frame, every not-big pixy has a chance to jump if it is not already doing so. And it looks great. Lively and unsuspectedly cute. That jumping is something I wanted because of this.
maths and physics !
Then, I implemented the cannon and the missiles. And I had no idea how to do it. I wanted a parabolic trajectory for the missiles but that was going to require some thinking. So I took half an hour to figure it out on paper with what I know about physics and maths. Then, I had a genius idea : take the squared function (which is already parabolic) and reverse-and-stretch it to make the missiles’ trajectories. It worked great. Way better than I thought it would.
Explosions ! That was important. If you don’t get why, go take a look at this talk from master JW. Each explosion is actually a one-frame colored circle followed by a one-frame black circle which you can’t really see in this game, with a sound effect that has much bass to it.
Also, on the same line of thought, screenshake ! Not detailing that but it is incredibly important !
Finally, after managing some kind of hitbox system, I needed to let the player lose. So I created another sprite for the turret, coded a bigger explosion, made the tetramino’s fall instant, wrote a big YOU LOST and there you go !
Then I built the text interface elements : counters around the Tetris game and then the main menu of the game. For both, I tried several layouts before choosing one and I believe everyone should do the same because interface is more important than what most of jammers seem to think, the problem being that we know what the game does but the player only has the clues we give him. So give it to him nicely !
Safer than the iCloud !
And at the very end, while I was thinking of uploading the game, I felt like something was missing. The top of the screen was awfully empty. Sure, a missile came there from time to time but that was it. Added procedurally generated clouds. Like a boss.
Quick note #3 : Music…?
One of the big advantages of making a retro styled game is that you can make shitty art and call it retro-styled without being too much questioned on your tastes :3. I ‘made’ all sound effects with the mighty SFXR and two music loops with FL Studio, one that is very bare (but existant) for the main menu and another, rather more complete, for the actual game. My only regret is that I set the music too loud.
So that was nice !
In the end, TETRATOR came up really nice. I was able to take the time and deal with each problem that presented itself which is good. I scoped really well what I wanted to do and I am very glad about that. And above all that, the game is actually fun to play !!
Looks pretty nice, doesn’t it ?
I’ll be there again for the next Ludum Dare !
Have fun playing all the wonderful games that have been made for Ludum Dare #32 !
TRASEVOL_DOG (you can find me on Twitter, there).
Source: ludumdare.com archive