About Atomic


Ludum Dare 25
Ludum Dare 22
MiniLD 25
Ludum Dare 16

Atomic's Trophies

Atomic's Archive

SIRTET Postmortem

Posted by
Tuesday, December 18th, 2012 10:58 am

Game over:


But I can say without doubt this is my best LD entry so far!

I spent about 17h on it (that’s way more than I spent on my previous entries). Twice I thought I wouldn’t make it.. lost a lot of time deciding how to store the pieces and making the damn title screen bitmap work. Thought I’d have to use a random AI. But…

I made it and had a great time doing it! I assembled a “console” from electronic parts and wrote a game for it, from scratch, all by myself in under a weekend. If I had to make a pretentious guess I’d say less people have done this than been to space (I shouldn’t watch The Big Bang Theory as much as I do, LOL).

What went right

-It works!

-It doesn’t need a “real” computer to run.

-The AI doesn’t feel random and I came up with the algorithm.

-The idea was original enough that only chas made something similar (check out his entry, BTW!). With 1300 entries that’s not bad at all.

-It’s very complete: title screen, music, sound effects, score, increasing difficulty, AI.

-Feedback has been great so far. Didn’t expect any feedback at all!

What went wrong

-Lost a lot of time deciding how to store the pieces and making the damn title screen bitmap work. Probably over 4h.

-The AI needs a lot of improvement. I believe it would’ve been significantly better if it hadn’t been for the reason above.

-The music sucks. It was supposed to be an evil take on the Tetris theme but it sucks,  seriously.

-People won’t be able to play my game but I knew that from the start.

-I didn’t have enough experience on the platform – again. I really need to break this tradition. Will I?


To wrap up.. here’s a picture of the whole setup:


See it here


Posted by
Monday, December 17th, 2012 10:24 am

I’m surprised with the sheer amount of .NET entries. Me likey :)


Posted by
Sunday, December 16th, 2012 7:00 pm

Sirtet is done!

The AI could be a lot better if I had a couple more hours but it’s definitely not random and the game is playable.

I’ve decided to submit to the jam for 3 reasons:

-It requires an Arduino Mega (haven’t tested but probably won’t run correctly on the Uno because it uses slightly more than 2KB of RAM) which means (almost) no one will be able to play it.

-I might have broken a rule, not sure. I used a self-made library (a very simple one) without declaring before starting. I did share it on one of my posts.

-Since people won’t be able to play it I *need* to upload a gameplay video. Its uploading to YouTube right now but it’s 400MB and will take over an hour, which means I’ll only officially submit the game tomorrow.

That said the game *is* done before midnight and I even took care of showing my clock on the video for the sake of honor 😉

I’ll zip the source right now and upload tomorrow.

AI working but really dumb

Posted by
Sunday, December 16th, 2012 2:24 pm

Implementing the AI of my last post wasn’t nearly as hard as I figured it’d be.. and not very slow either. It’s likely that a more complete AI is possible!

Here’s what it does:

(do this every time a new piece is chosen)

Repeat for each column and rotation possible:

-Apply r rotations and move piece to x column as fast as possible

-Compute the resulting board

-Store the sequence of moves and the amount of points (inversely proportional to average column height and directly proportional to number of lines cleared)

Choose the sequence of moves that gives higher points.


Minimizing average column height is a bad idea after all. It ends up chosing to stack high towers to keep some columns really low and loses the game very quickly. I’ll try throwing in more criteria and see what happens.


Posted by
Sunday, December 16th, 2012 12:29 pm

Spent a lot of time thinking about the AI. Here’s what I think is my best shot:

(do this every time a new piece is chosen)

Repeat for each column and rotation possible:

-Apply r rotatiosn and move piece to x column as fast as possible

-Compute the resulting board

-Store the sequence of moves and the amount of points (inversely proportional to average column height and directly proportional to number of lines cleared)

Choose the sequence of moves that gives higher points.


This will miss all scenarios where the best move involves going to one side and then back below another piece. It will also require one move per y drop or it’s gonna look very ugly.

Wish I could’ve come up with something better but I’m not even sure I’ll be able to get this working under a 16MHz processor in the few hours I have left.


Posted by
Sunday, December 16th, 2012 11:12 am

Regular tetris is fully playable!

Added a title screen (press button to skip). Never thought I’d have such a hard time making the LCD display a bitmap… ended up drawing it in MS Paint, converting to code with LCD assistant and hacking to copy it directly to the framebuffer:


Added code to play an animation when the board gets filled, clear it and increase speed.

Added sound effects: when you press the button to change the next piece, when a piece falls, when a line is cleared and when the board is filled. They’re not that bad but I wish I had more time to improve.

Added music that plays while the title screen is shown. It’s supposed to be an evil variant of the tetris song (which is traditional Russian music, hope this doesn’t break a rule). TBH it sucks but I only had about half an hour to compose it and write the code. For that I used a library that I had previouly made to play notes – it’s pretty much just a huge table of frequencies.

“Only” thing left to do is the AI! Porting is just not gonna happen, I only have about 5 useful hours to finish this.

Second day

Posted by
Sunday, December 16th, 2012 4:42 am

After making a lot of progress last evening a lot still remains to be done, including the hardest part: the AI.

If everything goes perfectly here’s a rough schedule for today:

-Next level (board clearing, animation and speed increase)

-Sound effects

-Skippable title screen

-Dumb AI with random movement

-Good AI


I’ve pretty much given up on porting this because of the time constraint. Also chas decided to do something very similar after I had already started and there’s no way my port is going to look that nice or be optimized for running on a PC. I might reconsider if the AI turns out to be much easier than I expect.

Pic of current state:


First playable version

Posted by
Saturday, December 15th, 2012 4:30 pm

After I solved the whole how-to-store-those-damn-pieces thing my progress got much faster :)

I ended up implementing commands to move/rotate the pieces like regular tetris to help debugging before making the AI (hardest part by far). Those are via USB to the Arduino so I don’t have to mess with hardware buttons again. You also have the physical button to change the next piece (I do it a couple times on the video below).

Tetris is somewhat playable but with some of the twists of Sirtet (the name of my game!): you gain negative score when a line is filled and positive score when the top of the board gets filled. As of now it has no restart option (on the final version you’ll just gain points from making the AI fail and speed will increase).

Here’s a video (forgive me for the shaky camera, poor lighting and the damn LCD glitches):


Way over my head

Posted by
Saturday, December 15th, 2012 11:58 am

Thought making a basic tetris game on the Arduino would be way simpler… right now all it does is draw a 10×20 board (each block is 2×2 filled pixels with 1 empty pixel around) and draw the next piece on the top.

All pieces are made of 4 blocks so I ended up storing 8 bytes per piece with the relative x and y coordinates of each block. I’m pretty sure I went the wrong way about this.. actually this consumed pretty much all of my afternoon ’cause I kept trying to think of a better way to avoid using up those 8KB of RAM..


First interaction

Posted by
Saturday, December 15th, 2012 6:55 am

Coded the button interaction. Electronic buttons need a hack known as debounce because they bounce back and forth between 0 and 1 very quickly  until they settle. The hack consists of reading the button twice with a short delay (say 10ms) to see if the state is the same.

So here’s what the code does now: init the screen, button and speaker. When the button is pressed the speaker beeps a middle-A note and the screen inverts (black to white or white to black).

Now to figure out the game loop!

Electronics are done

Posted by
Saturday, December 15th, 2012 6:13 am

At least I think they are. Wasn’t very hard at all 😛

I had to use the screen sideways to ge the most pixels vertically. It’s also glitching very badly due to a poor contact between the PCB and the LCD itself.. Can’t fix that but it’ll still be playable. If you look closely you’ll be able to see an image there (from the library demo, not my code yet).

The small square besides the blue speaker is the only button, it will be used to switch the type of the falling piece.


I’m making a console game (kinda)

Posted by
Saturday, December 15th, 2012 5:41 am

I wasn’t in the mood for LD but the theme is awesome… I have to give it a shot!

After sleeping on the theme I came up with the worst idea in quite some time: I’m making a console game, not a PC game!

How? I bought this Arduino a few months ago. It’s like a small 16MHz computer-in-a-board that you program over USB on a variant of C. It’s low level stuff so you can plug LEDs, buttons, resistors, motors and all kinds of electronics you want.

I’m going to be using a small Nokia 5110 LCD screen (and this lib) – it’s only 84x48pixels which means I’ll have to keep it simple. If there’s time I might include some chiptune music (not that I have any other option, the Arduino only plays one square-wave note at a time) on a small piezo speaker.

Now for the game… what does a small LCD screen remind me of? Those handheld tetris games. So I’m going to make one where you’re the villain!
The AI will try to stack the pieces as neatly as possible and you’ll have to choose the falling piece before it hits the ground in order to make the AI lose the game. It’s gonna be hard to make because the Arduino only has 8KB of RAM and the AI might be too heavy for the small processor… we shall see.

I did a quick search of the old posts and AFAIK I’m the first one with the idea of inverted tetris (probably because it’s a *really* bad idea).

Here’s my setup, with a cameo by an old tetris game I dug up for inspiration:

IMG_1632 IMG_1633

I’m aware chances are no one else will have an Arduino with the proper LCD to play this so I’ll either submit to the jam or make a PC port if time allows. No idea what I’ll use to port – that’ll be figured out when (if) I finish the game.

Leave Me Alone!!! Post-mortem

Posted by
Monday, December 19th, 2011 6:12 am

==What went right==

-I really liked my idea (a boy that wants to stay alone playing his video game while everyone tries to disturb him)

-I managed to finish my first 3D playable game using an engine I’d never used (Unity)

-Made the art with my own voxel tool (Paint3D) and it looks kinda cool and old-school. And it took very little time!

-I learned *a lot* (specially Unity and 3D game making)

-Had a good time on a rainy weekend 😛

==What went wrong==

-Lots of other games with the same name (700 games is way more than I expected), at least I haven’t seen one with the same idea yet.

-RIGGING – lost 3 out of about 13h trying to rig a character voxelled on Paint3D. This is not something you “learn” over an afternoon. Had to give up on animations.

-As always I decide to use something I’d never used before and got only about 13h working on my game. It’s good to learn something new but I reeeeally need to change this on the next compo 😉

-The game isn’t 10% of what I intended it to be – it should’ve been funny with several “enemies” with different behaviours (mom, dog, little sister, neighbours, guitar player, aliens), dialogs, music and realistic recorded can-hit sounds. Right now it’s just a barely playable one enemy shoot-em-up.


Posted by
Sunday, December 18th, 2011 3:39 pm

Slightly playable and starting to look better but there’s no way I’ll finish it in 3h.


Posted by
Sunday, December 18th, 2011 2:49 pm

A moving NPC that can be killed and a basic score counter.

Killing NPCs and living longer will increase score.

Concentration will go down faster if more NPCs are alive and up slowly if you’re alone.

No way it’ll be done in time.


Posted by
Sunday, December 18th, 2011 2:24 pm

Now I have a moving (hovering, not animated) NPC that can be killed. Too much to do, probably won’t finish in time.

[cache: storing page]