A Game Of Snake On A LEGO Mechanical Computer

Really, [OzzieGerff] had us at “LEGO.” But then he took it to another place entirely and built a completely mechanical, nearly 100% LEGO version of Snake. And it’s just as cool as it sounds.

Mind you, it’s a little hard to grok how this whole contraption works, which has been in the works for a while, but we’ll try to summarize as best we can. The most important aspect of this build is that there are no electronics at all — everything is done with mechanical linkages, with some Technics pneumatic components and a couple of electric motors to provide the oomph. The three main components are the input section, which consists of a two-axis joystick, a tail buffer, which keeps track of the length of the snake’s tail as gameplay progresses, and the largest component, the 16×16 display.

The joystick translates user inputs into pneumatic signals which pass through a mechanical filtering unit that prevents the head of the snake from doubling back on itself. The filtered inputs then pass into the screen reader, a complex device that probes the status of a given pixel on the display and determines the status of the snake’s head. If it touches a snake pixel, the game’s over. Hitting a blank pixel moves the head of the snake by one and takes one pixel off the end, while a food pixel extends the snake’s length.

Keeping track of the length of the snake is the job of the buffer, which uses Technics tank tracks and levers. Setting a one is done by flipping the lever to one side as it passes under the write head; a read head further down the track senses which way the lever is flipped and translates it into a pneumatic signal. The buffer has four channels, one for each possible direction the snake’s head could be moving. The signals drive a screen writer, which moves a pyramidal follower across a series of push-rods that flip the corresponding pixel on the display to show the proper icon. Simplicity itself? No, but the video below will make things a lot clearer.

It doesn’t look like [Ozzie] is quite done with this game, as he doesn’t show any actual gameplay yet. We’d love to see and hear that — we suspect it’ll make quite a racket. We’ll be keeping an eye out for this one, but while we wait, check out this rope braiding machine or watch Lego break steel.

Continue reading “A Game Of Snake On A LEGO Mechanical Computer”

A stack of PCB business cards that can play Snake on an 8x8 LED matrix.

2024 Business Card Challenge: Snakes On A Business Card

Once [Lambert the Maker] saw the Arduboy, he knew the thing was ripe for remixing into a business card with an 8×8 LED matrix instead of an OLED screen. [Lambert] already has a PCB business card for work, but it looks like it doesn’t do anything. So this Snake-playing card is for their personal information.

The brains of this operation is an STM32F0, which required a bit of finesse when it came to programming the LEDs. According to the datasheet, the max current through a given GPIO pin is 30 mA. The LEDs are running at 20 mA through the limiting resistor, so the code only turns on one LED at a time and makes sure the previous one is off first. The whole screen is updated every 125 ms, and persistence of vision takes care of making the animation look right.

In the short videos after the break, you’ll see a preview followed by brief videos on versions one and two. The prototype was built in 2020, when the board house only offered green PCBs with their assembly service. Fast forward to 2024, when the board house is now offering colors other than green.

Version two is actually thinner than a credit card, and features tiny buttons instead of cap-sense pads for input. [Lambert] also added a floating ADC pin that acts as a random number generator, placing the apple in a new location every time the game is powered on.

Continue reading “2024 Business Card Challenge: Snakes On A Business Card”

Play Giant Tetris On Second-Floor Window

Sometimes it seems like ideas for projects spring out of nothingness from a serendipitous set of circumstances. [Maarten] found himself in just such a situation, with a combination of his existing Tetris novelty lamp and an awkwardly-sized window on a second-floor apartment, he was gifted with the perfect platform for a giant playable Tetris game built into that window.

To make the giant Tetris game easily playable by people walking by on the street, [Maarten] is building as much of this as possible in the browser. Starting with the controller, he designed a NES-inspired controller in JavaScript that can be used on anything with a touch screen. A simulator display was also built in the browser so he could verify that everything worked without needing the giant display at first. From there it was on to building the actual window-sized Tetris display which is constructed from addressable LEDs arranged in an array that matches the size of the original game.

There were some issues to iron out, as would be expected for a project with this much complexity, but the main thorn in [Maarten]’s side was getting his controller to work in Safari on iPhones. That seems to be mostly settled and there were some other gameplay issues to solve, but the unit is now working in his window and ready to be played by any passers-by, accessed by a conveniently-located QR code. Tetris has been around long enough that there are plenty of unique takes on the game, like this project from 2011 that uses Dance Dance Revolution pads for controllers.

It’s Snake, In A QR Code, But Smaller

We’re not sure that many of you have recognised the need in your life for an x86 machine code program encoded into a QR code, but following on from someone else work [donno2048] has created a super-tiny Snake clone in assembly which comes in at only 85 bytes long. It fits far better in a QR code than the previous effort, but perhaps more useful is a web page demo which runs an in-browser DOS compatibility library. We followed the compilation instructions and got it running on our Manjaro installation, with the result of a somewhat unplayable but recognisable Snake, we’re guessing because it was written for a slower platform. The web version is more usable, and allows us to investigate its operation more thoroughly.

To achieve a working game in so little code is an impressive feat, and since we found different keys responded on machines with different keyboards we’re curious how it does its keyboard input. Also we think it has the Snake bug where turning back on yourself means instant game over. We would be interested to hear the views in the comments of readers who know something about x86 assembly, to help explain these points.

This Retro Game Console Puts Vacuum Fluorescent Display To Good Use

Small in size, low-resolution, blocky segments, and a limited color palette — all characteristics of the typical vacuum fluorescent display, any of which would seem to disqualify them as the display of choice for a lot of applications. But this is Hackaday, and we don’t really pay much attention to what we’re supposed to do, but rather to what’s fun and cool to do. So when we see something like a VFD game console, we just have to sit up and take notice.

In a lot of ways, the design of [Simon Boak]’s Arduino-based VFD console is driven by his choice of display. The Noritake Itron GU20X8-301 VFD is a “tricolor” display with eight rows of 20 rectangular pixels. Each pixel is composed of six short linear segments, with alternating red and blue colors. Turning on either set of segments yields one of the two base colors, while turning on both yields a sorta-kinda whitish color, if you squint a bit.

[Simon] chose a two-piece design for his console, with a separate controller and display. The controller holds the Arduino Nano and all the controls, plus a piezo buzzer for fun. The display case connects to the controller with a ribbon cable and holds the VFD power supply and driver. To celebrate the retro look of the VFD, both cases are decked out with woodgrain side panels. [Simon] chose appropriately blocky games for the console, like Snake, Conway’s Game of Life, and the venerable snow demo. We’d imagine Pong would be a good choice too, as well as perhaps Tetris if the display were flipped on its side.

We really like the look of this console, and we appreciate putting an otherwise obsolete display to use in a creative way. If you want to learn a little more about these displays, check out this love letter to the VFD.

Continue reading “This Retro Game Console Puts Vacuum Fluorescent Display To Good Use”

A handheld game console made from bare PCBs

Minimalist Homebrew Hardware Recreates Arcade Classics

Classic video games might look primitive by today’s standards, but the addictive gameplay of Breakout or Pac-Man remains fun no matter what decade you were born in. Keeping the relevant hardware running becomes harder as the years pile up however, so when [Michal Zalewski] decided to introduce his kids to classic video games, he didn’t dig up his old game consoles. Instead, he decided to recreate several games from scratch using the bare minimum amount of hardware needed.

The first project is a copy of Snake, the arcade classic that millennials will recognize from their Nokia phones. [Michal] made an initial version using an ATmega328P with an 8×8 LED matrix as a display, but quickly upgraded the hardware to a 16×16 display powered by an ATmega644, and added an LED seven-segment display to show the score. All parts are simply soldered onto a piece of prototyping board, with no need for any custom PCBs or enclosures.

Game #2 is a side-scrolling space shooter called Dino in Space. This game runs on an ATmega1284 and uses a 4×20 character text display, allowing simple graphics as well as an on-screen score counter. Similar hardware, although with a 128×64 graphic OLED screen, powered game #3, a Breakout/Arkanoid clone called Blockbuster 7000.

[Michal]’s blog post is filled with interesting tips for real-life game programming. For example, a true random number generator creates a rather odd-looking bunch of asteroids in space – tweaking the distribution to make it a bit more uniform greatly enhances the game’s playability. Source files for all games are available on [Michal]’s website, and include a description of the exact hardware setup needed for each game.

Recreating Snake on custom hardware is sort of a rite of passage for microcontroller hackers, as you can see in  many impressive projects. Breakout-style games can also be implemented on various hardware platforms, including analog oscilloscopes.

This Snake Has Legs

[Allen Pan] loves snakes. He loves them so much that he’s decided to play god, throwing away millions of years of evolution — just to give snakes back the legs they’ve “lost”.

Ok, so this hack has tongue planted firmly in cheek, but it’s still pretty darn cool. [Allen] designed and 3D printed what can best be described as a robot for snakes to ride.

The build wasn’t easy. Allen’s first attempts using toys based on [Jamie Mantzel]’s giant robot didn’t go exactly to plan. Thankfully those were only tested with a plush snake test dummy.  Thankfully [Allen’s] second was on target.

The robot itself consists of 4 legs, each with 3 joints and two servos. The foot joint pivots freely to handle any uneven terrain. The robot’s gait is derived from lizards Allen observed in a pet shop. The main body of the robot is a clear plastic tube. Once Shinji the snake decides to get in the robot, it isn’t strapped in. In fact, the snake is free to leave whenever it wants.

Currently, the whole system just walks forward. [Allen] appears to be using a servo controller with a hard-coded walking sequence. We’d love to see the next step – figuring out a way for the snake to control the robot’s direction.  Perhaps with a camera with gaze detection?

We’ve covered robots driven by animals before, and we’ve covered some of [Allen]’s builds — like this electromagnetic rendition on Mjölnir.
Continue reading “This Snake Has Legs”