Check out Samus looking boss in this pixelated image. Who would have thought of using Tetris as a canvas for these types of graphics? Coming up with the original idea of strategically clearing and leaving Tetris pieces to end up with what is shown above is hard enough. But how in the heck do you implement the algorithm that generated this programmatically?
First off, two thing should not be surprising about this. It wasn’t manually generated during normal gameplay. That would be beyond savant level. The other thing to note is that the order in which pieces occurred was not random, but strategically calculated by the algorithm. The challenge is not only to occupy and clear the correct pixels, but to make sure the correctly colored pieces remain.
You need to see the fast-motion video embedded after the break to fully appreciate the coding masterpiece at work. We’re not going to try to paraphrase how the algorithms functions, but get comfy with the link above which walks through all of the theory (in addition to supplying the code so you can try it yourself).
[via Reddit]
“The other thing to note is that the order in which pieces occurred was not random, but strategically calculated by the algorithm.”
boooooooooooooooooring
I thought so to at first. But I followed the link anyhow… I already read every other post of the day.
This is actually impressive, don’t write it off because the pieces are predetermine.
If you knew the piece-generating algorithm, I wonder if you could plan ahead based on knowing the future…
Baxter was doing this sort of TAS back in 2011, just not as well documented.
http://www.youtube.com/watch?v=rP4B4LRiIoU
Thanks for sharing this. Using the actual tetris game is more impressive to me than the simulation.
Neat, it looks like an excellent programming puzzle.
Now I wonder how one could do it using the least possible amount of pieces…
I wonder if, given an sufficiently high Tetris “field” (I’m talking hundreds or even thousands blocks high), you could do this with (fair) randomized pieces.
Isn’t this pretty old? I thought i learned about this the last time it was on hackaday.
The Tetris play field is supposed to be 10 blocks wide.
So, not random pieces, and not the standard play field.
While this reduces it down to a definite NON-TETRIS hack, it’s more than I could do in a hurry.
at last im liberated from the label of crazy!
i just KNEW there was a pattern.
it’s what ive been telling people for years…
you should see me play, i use the button that drops the piece
ALL the way down instantly and play a LOT faster then most people.
the first few levels go much faster that way.
and subconciously knowing the next 3 pieces
helps with beating other people’s top scores too.
too bad it takes days of playing several hours each
to warm up to the patterns. once your there,
you can trash anybody’s highscore list in less then an hour.
KUDOS FOR BEING ABLE TO CALCULATE THE PATTERENS!
i always thought about how hard that would be to do.
it would be eaiser to teach something HOW to learn.
PS: im talking about tetris with ONLY one next-piece displayed.
https://www.youtube.com/watch?v=_tipJDjeKuY
Here’s a Tetris pattern manually generated during normal gameplay… he’s not the only one who can do this either. Much easier than your article makes it out to be.