FlappyRL – try not to run into things

I’ve never written a Rogue-like before. Well, I’ve never finished writing a Rogue-like before. This year for 7drl, I decided to change that. Allow me to introduce FlappyRL (or download here: FlappyRL). This was done in around 36 hours start to finish, minus sleeping and working.

As in the wildly popular mobile game of a similar name, our hero is a bird subject to the whims of gravity and an onslaught of green pipes. The bird may flap (by pressing up or ‘F’) or advance without flapping (by pressing right or ‘A’). In addition, the bird must wing its way through gaps between pipes. For each pipe the bird skirts, it scores a point. Hitting the ground, slamming into a pipe, or flying away into the upper sky are all fast ways to die.

How high can you get your score?

If you want to make changes, the source code is here. It’s a Processing sketch with a few hacks and shims so it’ll run under Processing.js for 7drl.

5 thoughts on “FlappyRL – try not to run into things”

  1. Also, I’m calling it a Rogue-like because it has two key elements: Death is permanent (there’s no save file, no undo, etc.) and it has procedurally-generated content. The spacing and height of opening in the pipes, plus placement of clouds, are procedural.

    edit: spelling

    1. Thank you, good catch. I’ll see if I can fix it today, though chances are slim because I’m getting on a plane just a few hours after work.

      I think I could keep a 1-item memory of whether the previous opening was high, medium, or low. If medium, the entire range is valid. If high, only high and medium openings could be used, and similar if the last opening was low. This would give it more of a random walk feeling rather than just random.

      Fixed it and posted version 1.0.1. Instead of tracking h/m/l like I proposed above, I just keep generating random heights until something is less than half the screen away. There may still be tight spots, but I think every single opening should be traversable now.

Leave a Reply