It’s Swooping Season
If you’re not Australian, let me paint you a picture. Every spring (September to November), magpies across Australia enter their nesting season. And when magpies nest, they become territorial. Aggressively territorial. If you ride a bike or walk through their territory, they will swoop you. Repeatedly.
This isn’t folklore. This is a real thing that happens to millions of Australians every year. There are interactive swoop maps. People wear cable-tie helmets. Cyclists take 2km detours to avoid known danger zones. It’s genuinely chaotic.
So naturally, when swooping season rolled around this year, I thought: “This would make a great retro game.”
Why Build This?
I was working on some “real work” and waiting for deployments to finish. You know that limbo state where you’ve pushed code, CI is running, and you have 10-15 minutes of downtime? That’s when this started.
- Nostalgia for simple games: Flash games and retro arcade titles with simple mechanics and tight controls. No tutorials, just “here’s the game, survive.”
- Vanilla JS challenge: Most of my time is spent with frameworks. Sometimes it’s refreshing to write raw JavaScript and manipulate canvas pixels directly.
- Australian culture as game design: Swooping magpies are uniquely Australian. The territorial behavior, the dive-bombing, the spring chaos - it all maps perfectly to a retro game loop.
The Stack
HTML5 Canvas + Vanilla JavaScript + CSS3 + LocalStorage. No frameworks, no build step. Game loops, collision detection, animation timing: these are fundamentals that transcend frameworks.
The game uses delta time for frame-independent movement and timing. All speeds and timers are time-based (seconds), not frame-based, ensuring consistent gameplay at any frame rate. The game also features a gradual difficulty ramp - speed increases by 5% every 10 seconds, and spawn rates decrease. You can adjust GAME_SPEED
in game.js to speed up or slow down the entire game.
The Fun Bits
- Magpie AI: Cruise → warning indicator → dive at your lane. Timing-based duck mechanic means you need to duck at the right moment. Too early or late? You’re getting swooped.
- Combos: Chain perfect ducks for up to 5x multiplier. Take damage and it resets. Risk vs reward.
- Coordinated attacks: 40% chance of 2-3 magpies attacking different lanes at once. Chaotic and stressful, exactly like real swooping season.
- Procedural pixel art: Everything’s drawn with canvas rectangles. No sprites, just code. Makes tweaking colors trivial.
Game Feel
The difference between a functional game and a satisfying one is game juice: all the tiny feedback systems that make interactions feel impactful.
- Camera shake: When you get hit, the camera shakes. Small detail, huge impact on conveying damage.
- Death sequence: Camera zooms, rotates, and the cyclist flips in 3D space. If you’re going down, it should feel dramatic.
- Floating text: “DODGE!”, “MUGGED!”, “PERFECT!” - immediate visual feedback for every action.
- Combo multiplier: Numbers that grow as you chain successful ducks. Visual reinforcement of skill.
- Invulnerability flash: Brief flashing after taking damage. Classic arcade feedback that you’re temporarily safe.
Game juice turns “the magpie hit me” into “I got MAULED and the screen is shaking and I’m tumbling through the air.” Same outcome, completely different feel.
Play It
See how long you can survive. Build those combos. Dodge the coordinated attacks.
And if you’re in Australia right now: stay safe out there. Swooping season is real.
The full game source code is available on GitHub: paddo/magpie-swoop
Built during swooping season 2025. Dedicated to every Australian who’s ever been swooped while minding their own business.