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?

Via r/duino

16 thoughts on “Offline Dinosaur-Jumping Becomes A Real Workout

  1. If the dinosaur gets too boring, give geometry dash a bash, it’s nothing to do with geometry really, graphic theme is sort of based on it, but jumping is sort of synched to the music, which is EDM-y chiptune-y which makes it addictive, I guess like playing one note on rock band too. Anyway should be able to rig this project to work with that too, or flappy bird if you’re a real masochist LOL

  2. I can’t find it now, but there’s a recent YT video of someone hooking a treadmill to a game where you walk on the treadmill to make the game character walk. For something as quickly hacked together as it was—IIRC, the treadmill was hooked to the PC via a USB game controller with some glue logic—it seemed to work quite well and provide quite a workout.

      1. I’ve been experimenting with a phone accelerometer streaming data to the laptop. It’s trickier than I thought. There are two acceleration spikes in every jump: when you push up and when you land. Looking at acceleration graphs, the landing spike is sometimes very similar to the take-off spike.

        One needs to filter out the second spike, while still allowing for multiple jumps in quick succession. I’ve had good luck with a fairly crude algorithm that counts 2g acceleration (including gravity) as a jump, but then it requires either a short period of ~1g acceleration or a 0.8sec delay (which empirically is enough to cover the landing spike) to reset before the next jump.

        A constraint on the algorithm is that we want to trigger the in-game jump at the earliest possible point in the jump, as otherwise the game becomes really unplayable. So we can’t just analyze the shape of the acceleration curve in hindsight, as we could if we were doing fitness tracking.

        My current (and far from final) jump-detection algorithm is here: https://github.com/arpruss/jumpdetect . It requires an app running on the phone to stream acceleration data over bluetooth, but that app is in such sorry state that I don’t want to post it yet.

  3. Technically speaking the solution is very cool! Congratulations to the author and article with many useful information.
    But I can’t help thinking on one NC switch with an upcycled ps/2 keyboard controller board!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.