About Flappy Dog

What Is This?

Flappy Dog is a browser-based arcade game where you guide a dog through an endless series of pipe gaps. Tap, click, or press spacebar to flap. Dodge pipes, avoid cats, and try to beat your high score. The game runs entirely in your browser with no downloads, no sign-ups, and no dependencies.

The game was produced in about five prompts to a local AI model running on consumer hardware. From the first prompt to the final deployed version, the entire game went through five iterations of back-and-forth with the model before the AdSense review. You can read more about the process on the development blog.

The Game

The dog is drawn as a circle with radial gradients for body shading, two floppy ears, white eyes with dark pupils and specular highlights, a black nose, a curved mouth, and a pink tongue that sticks out slightly. The ears use elliptical shapes with darker fill and inner pink ear details.

The pipes are rendered as vertical rectangles with linear gradients to simulate cylindrical lighting, topped and bottomed with flared caps. The gap between the top and bottom pipe is randomized each spawn, and the pipes move left across the screen at a constant speed.

The cats appear on the ground as small rendered figures with rounded bodies, triangular ears with inner ear coloring, oval eyes that blink on a timer, small pink noses, curved mouths, whiskers drawn as thin lines, and animated tails that oscillate using a sine wave. Five cat color variations exist: orange, grey, white, black, and ginger. The cats move slower than the pipes, giving them a lazy, independent presence on the ground.

The day/night cycle toggles every twenty seconds. During the transition, the sky background shifts, stars appear with individual twinkle rates, cloud opacity changes, ground colors darken, and pipe gradient values shift to match the new palette. The transition is driven by a CSS class toggle on the body element and a boolean flag in the game code.

Game Mechanics

You start each run with five lives, shown as hearts in the top-right corner. Colliding with a pipe, the ground, or the ceiling costs one life. After losing a life, the dog enters a 1.5-second invincibility period where he flashes on screen and cannot take further damage. When lives reach zero, the game ends.

Score increases by one for each pipe gap cleared. Every ten points, pipe speed increases and the spawn interval decreases, making the game progressively harder. Best score is saved to localStorage and persists between browser sessions.

The game can be paused by pressing Escape, which freezes the game loop and displays a pause overlay. Pressing Escape again resumes from where you left off.

How It Works

Flappy Dog is built with plain HTML, CSS, and JavaScript. The game renders on an HTML5 Canvas element using requestAnimationFrame for smooth 60fps gameplay. All visual elements are drawn with Canvas 2D rendering calls — no images, no sprites, no external assets beyond the favicon.

Your high score is stored locally in your browser using localStorage. It persists between sessions and does not require a server or database. Everything stays on your device.

Deployment

The game is containerized with Docker and deployed to Google Cloud Run through a GitHub Actions workflow that uses Workload Identity Federation for authentication. It is served through the domain flappydog.peruf.me.

Why All This Text?

Most of the text on this website was generated by AI to meet Google AdSense's content requirements. AdSense needs a certain amount of original text on a site before approving it for ads. The game is the real product. The text exists to keep the site monetized so it can stay online. Feel free to skip it and just play.

Contact

If you have questions, feedback, or just want to say hello, reach out through the contact page.

Thanks for playing.