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.
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”
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.
[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”
If there’s any looming, unwritten rule of learning a programming language, it states that one must break in the syntax by printing
Hello, World! in some form or another. If any such rule exists for game programming on a new microcontroller, then it is certainly that thou shalt implement Snake.
This is [__cultsauce__]’s first foray away from Arduinoville, and although they did use one to program the ATtiny85, they learned a lot along the way.
It doesn’t take much to conjure Snake with an ’85 — mostly you need a screen to play it on (an OLED in this case), some buttons to direct the snake toward the food dot, a handful of passives, and a power source.
[__cultsauce__] started by programming the microcontroller and then tested everything on a breadboard, both of which are admirable actions. Then it was time to make this plywood and cork sandwich, which gives the point-to-point solder joints some breathing room and keeps them from getting crushed. Be sure to check it out in action after the break, and grab the files from GitHub if you want to charm your own ‘tiny Snake.
There’s a ton you can do with this miniature microcontroller, and that includes machine learning.
Continue reading “ATtiny85 Snake Game Is A Circuit Sandwich”
In many people’s memories, Snake lived and breathed on Nokia handsets from the late 90s and early 2000s. However, the game has been around for much longer than that, and will continue to live on in the future. That’s at least in part thanks to people like [Hari Wiguna] keeping it alive by implementing it on new platforms.
[Hari] set about writing Snake in MicroPython for the Raspberry Pi Pico. The hardware side of things is simple enough – five buttons hooked up to the Pico, along with an 128×64 I2C OLED screen to display the game on. On the software side of things, [Hari] pushed the boat out, deciding that his version of Snake had to have the player character slither like the real thing. This took a little effort to get right, particularly when navigating corners in different directions. However, perseverance paid off and [Hari] got the job done.
Code is on GitHub for those that want to tinker at home. It’s a tidy piece of work, though not the weirdest place we’ve seen the game appear – we’ve actually seen it run within PCB routing software before thanks to some nifty scripting. Video after the break. Continue reading “Play Your Favorite Nokia Game On The Raspberry Pi Pico”
When conversation turns to the older Nokia mobile phones, it’s unlikely to be the long battery life or ability to conjure a signal out of thin air that tickles people’s memory, instead it’s the Snake game built into the stock firmware. Snake was an addictive yet extremely simple game in which a line of pixels — the snake in question — was navigated around the screen to eat the fruit without crashing into walls or itself. As the game progressed the snake grew in length, making it a surprisingly difficult challenge. If you hanker for Snake, as [VK5HSE ] writes, you can now play it in a PCB layout.
The software in question is PCB-RND, a cross-platform open-source PCB CAD tool, and the game is achieved through the magic of user scripting. Simply download the script, run it in your favourite circuit board, and away you go!
We can’t imagine a productive use for this piece of software, but it wouldn’t surprise us to see a snake slithering into a few boards we feature. It does provide a handy reminder though of the power in your PCB CAD tool’s scripting features, something it’s likely not many of us use to their full potential.
We’ve featured [VK5HSE]’s work with PCB-RND before, in a very useful Eagle import tool.