No hackspace is complete without an arcade game project or two. Usually these projects are time-worn generic cabinets scarred by the frustrated kicks of a million teenagers, the decades-old Japanese CRT monitors inside of which are ready to shuffle off this mortal coil. You are lucky if you catch them on a rare moment of functioning, and their owners are always hovering ready to attend to any soon-to-expire electronics.
York Hackspace have done things a little differently though. Their member [John] has an arcade game project, but instead of an aged cabinet he’s produced his own tabletop game with an array of multicolour addressable LED strips powered by a Raspberry Pi. Each LED sits in its own foam cell under the translucent surface, so it forms a low resolution color block display.
It’s a Tetris game in its first incarnation, but there is also a copy of Snake underway for it. If it catches your attention you can write your own games, because all its resources are available in a GitHub repository.
This is one of many Tetris interfaces we’ve seen over the years. Largest was probably this skyscraper, but this oscilloscope version is particularly well-executed. One of our most recent forays into Tetris-land though is also one of the most technically interesting, a 446-byte implementation in a master boot record.
You want to play Tetris. You want to play Tetris on any operating system. You want to play on an old IBM PC, you want to play Tetris on a new MacBook. You want a Tetris that’ll fit inside the master boot record of a disk. You want Tetris as an operating system. You want TetrOS.
Or maybe you don’t, but it’s a fantastic piece of work, and we love tiny demos. Check it out below the break. Or read through the source code in the banner image.
Continue reading “Tetris in 446 Bytes”
There are reports of a Tetris movie with a sizable budget, and with it come a plentiful amount of questions about how that would work. Who would the characters be? What kind of lines would there be to clear? Whatever the answers, we can all still play the classic game in the meantime. And, thanks to some of the engineering students at Cornell, we could play it without using a controller.
This hack comes from [Bruce Land]’s FPGA design course. The group’s game uses a video camera which outputs a standard NTSC signal and also does some filtering to detect the user. From there, the user can move their hands to different regions of the screen, which controls the movement of the Tetris pieces. This information is sent across GPIO to another FPGA which uses that to then play the game.
This game is done entirely in hardware, making it rather unique. All game dynamics including block generation, movement, and boundary conditions are set in hardware and all of the skin recognition is done in hardware as well. Be sure to check out the video of the students playing the game, and if you’re really into hand gesture-driven fun, you aren’t just limited to Tetris, you can also drive a car.
Continue reading “Hand Gestures Play Tetris”
Cheap character LCD displays are more versatile than we give them credit for. Most of the cheapies have a 5×8 character display, which looks blocky but legible when you have an appropriate font. Where it gets fun is that most of the LCD displays also let you upload custom characters.
Taking this to the extreme, [numeric] abused the user-defined characters to write a tiny game of Tetris that would run in the 10×16 frame that you get when you combine four characters together. It’s tiny, it’s monochrome, and doesn’t play the Troika theme (which may be a good thing), but it’s playable. Check out the video below.
Continue reading “Tetris Everywhere: Character LCD Edition”
[Alex] needed a project for his microcomputer circuits class. He wanted something that would challenge him on both the electronics side of things, as well as the programming side. He ended up designing an 8 by 16 grid of LED’s that was turned into a game of Tetris.
He arranged all 128 LED’s into the grid on a piece of perfboard. All of the anodes were bent over and connected together into rows of 8 LED’s. The cathodes were bent perpendicularly and forms columns of 16 LED’s. This way, if power is applied to one row and a single column is grounded, one LED will light up at the intersection. This method only works reliably to light up a single LED at a time. With that in mind, [Alex] needed to have a very high “refresh rate” for his display. He only ever lights up one LED at a time, but he scans through the 128 LED’s so fast that persistence of vision prevents you from noticing. To the human eye, it looks like multiple LED’s are lit up simultaneously.
[Alex] planned to use an Arduino to control this display, but it doesn’t have enough outputs on its own to control all of those lights. He ended up using multiple 74138 decoder/multiplexer IC’s to control the LED’s. Since the columns have inverted outputs, he couldn’t just hook them straight up to the LED’s. Instead he had to run the signals through a set of PNP transistors to flip the logic. This setup allowed [Alex] to control all 128 LED’s with just seven bits, but it was too slow for him.
His solution was to control the multiplexers with counter IC’s. The Arduino can just increment the counter up to the appropriate LED. The Arduino then controls the state of the LED using the active high enable line from the column multiplexer chip.
[Alex] wanted more than just a static image to show off on his new display, so he programmed in a version of Tetris. The controller is just a piece of perfboard with four push buttons. He had to work out all of the programming to ensure the game ran smoothly while properly updating the screen and simultaneously reading the controller for new input. All of this ran on the Arduino.
Can’t get enough Tetris hacks? Try these on for size.
If you’ve clocked one-too-many hours at Tetris, it might be time to show the world your skills on this skyscraper-sized display on the Shell Centre in London. [Benjamin], [Tom], and their “army of volunteers” took to the Shell building and assembled their super-screen from a collection of 182 networked wireless lightbulbs, some tracing paper, and mylar to create a playable interface from the Jubilee Gardens below.
[Benjamin] doesn’t deliver many of the technical details on his post, but he does give us an overview. He achieves full wireless coverage of all floors by spacing out 14 TP-Link WR702n routers, each running the same version of OpenWRT. This interface wasn’t [Benjamin’s] first choice, as he would’ve preferred to tap into the building’s existing wireless network; unfortunately, he was left without support from the building’s network team. Equipped with a large donation of wireless bulbs controlled by a central bridge, [Benjamin’s] Python-adaptation of Tetris can refresh the building about about 1-to-2 frames per second. Given his description of the bulb interface, we suspect he’s using the all-too-familiar Philips Hue smart lightbulbs to illuminate the building.
In case you haven’t heard of Faraday’s Christmas Lectures, they’re the UK’s nationally broadcasted “science special” featured at the end of the year and founded in 1825 by [Michael Faraday] himself. The goal of these Lectures is to introduce young people to some aspect from the sciences. We’ve seen giant Tetrises before, but not in a way that inspires such a young audience. We’re thrilled to see that hacking both in software (Python, LAN networks) and hardware (ZigBee, OpenWRT) made the cut for this year’s special. After all, why should MIT keep all the fun to themselves?
If the building-scale is just too big for your taste, why not have a go on your oscilloscope?
Continue reading “Skyscraper Tetris Lets the City Know how Good or Bad You Are”
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).
Continue reading “Using Tetris Like MS Paint”