A small PCB with an OLED screen showing a Dinosaur Game

Hackaday Prize 2022: RunTinyRun Is A Fully Solar-Powered, Portable Dinosaur Game

Fully solar-powered handheld gadgets have so far mostly been limited to ultra-low power devices like clocks, thermometers and calculators. Anything more complicated than that will generally have a battery and some means to charge it. An entirely solar-powered video game console is surely out of reach. Or is it? As [ridoluc] shows, such a device is actually possible: the RunTinyRun gets all its power directly from the Sun.

To be fair, it’s not really a full-fledged game console. In fact it doesn’t even come close to the original Game Boy. But RunTinyRun is a portable video game with an OLED display that’s completely powered by a solar panel strapped to its back. It will run indefinitely if you’re playing outside on a sunny day, and if not, letting it charge for a minute or two should enable thirty seconds of play time.

The game it runs is a clone of Google’s Dinosaur Game, where you time your button presses to make a T-Rex jump over cacti. As you might expect, the game runs on an extremely minimalist hardware platform: the main CPU is an ATtiny10 six-pin micro with just 1 kB of flash. The game is entirely written in hand-crafted assembly, and takes up a mere 780 bytes. A 0.1 farad supercap powers the whole system, and is charged by a 25 x 30 mm2 solar cell through a boost converter.

RunTinyRun is a beautiful example of systems design within strict constraints on power, code size and board area. If you’re looking for a more capable, though slightly less elegant portable gaming console, have a look at this solar-powered Game Boy.
A Dinosaur Game implementation running on a breadboard setup

512 Bytes Ought To Be Enough For Dinosaurs

It’s said that slow internet is worse than no internet at all, which is mainly a matter of continuously crushing all hope and sanity vs. finding peace in accepting a fate out of your control. Plus, you can easily pass the time of being catapulted back to the prehistoric ages by navigating a jumpy little creature from that same age through a field of cacti — at least if you’re using Chrome or Chromium. But neither a browser nor actually an operating system are really necessary for that, as [franeklubi] shows with a boot sector implementation of the same game.

Sure, the graphics aren’t quite on par, but compared to the original’s 3000+ lines of JavaScript, [franeklubi] managed to implement it in a few hundred lines of assembly, and was of course constrained by the 512 bytes of the boot sector itself (well, 510 plus the signature). This constraint causes a few limitations, like a slight lack of randomness in the obstacle arrangements, and a constant running speed, but it also makes it the perfect playground and starting point to delve into the world of nifty knacks and hacks, trying to squeeze every last byte.

If you want to give it a try for yourself, all you need is NASM and QEMU — and while you’re at it, why not have some Tetris along the way? We could also see this nicely combined with the real-world jumping version from a few weeks back, and turn it into a standalone arcade game. Bounce Crouch Revolution anyone?

Offline Dinosaur-Jumping Becomes A Real Workout

It’s great to see people are out there trying to find fun ways to exercise amid the current crisis. Although jumping up and down isn’t great for the knees, it does give decent cardio. But if you don’t have a rope or a puddle, we admit that jumping can lose its bounce pretty fast.

Quarantine has been a game-filled time for [fridaay]. Somewhere between a handful of FPS games, he decided to try to play Google’s offline dinosaur-based side scroller game by making the dinosaur spring over the saguaros whenever he physically jumps in the air. (Video, embedded below.)

Here’s how it works: [fridaay] holds a transmit circuit that consists of an Arduino UNO, an accelerometer module, and an nRF24L01 transceiver, all running on a 9 V battery. Whenever [fridaay] jumps, the accelerometer reads the change in Z and sends it to the receiving circuit, which is just another UNO and nRF. The receiving UNO is connected to a laptop and configured to press the space bar so the dinosaur canters over the cacti.

We’ve never been able to stay alive long enough in the game to see this happen, but apparently you need to crouch at some point in the game. [fridaay] has yet to implement a control for that, but we’re sure he’ll think of something. Jump past the break to see the video, and hit him up if you need the code.

If you have a lot of parts at your disposal, why not make a physical version?

Continue reading “Offline Dinosaur-Jumping Becomes A Real Workout”