Swooping Simulator
A Flappy Bird style game where you fly an Australian magpie over an Aussie suburb.
Play: https://wizzard262.github.io/swooping-simulator/
Controls
- Arrow keys or W A S D: up to flap, down to dive, left and right to fly; up and down tilt the magpie 30 degrees
- Hold Space to swoop: very fast flight with afterburner flames and a motion blur, steered 30 degrees up or down with the arrows. The charge bar empties in 6 seconds and refills in 10
- Land on the Hills Hoist on the lawn and it spins, carrying you round and turning you with it; press up to fly off. Swoop past it and it whirls round fast, the washing flung outwards (+200 and a flashing WHIPPER-SNIPPER!). Fly up under it and he grabs hold and rides round underneath, hanging upside down by his feet; press down to let go
- A kangaroo in a cork hat hops along the lawn: land on his back to ride him; swoop into him or poop on him and he falls over (doiiinggg!) and sees stars for 5 seconds
- A big gum tree to perch on, with a koala climbing the trunk and central branch up into the canopy and a kookaburra on top: swoop into the kookaburra or poop on him and he tumbles down, sees stars, then flies back up laughing (he also laughs every minute or two, and you only ever hear him while he's on screen)
- A bloke at his barbie flipping burgers, and every 4 seconds a snag spinning high into the air: catch it in your beak (SNAG-A-SNAG!) and take it to the three chicks in the nest at the top of the big gum (BREKKIE!). Swooping, pooping or getting knocked about makes you drop it. Poop on the hot plate and it sizzles: land on the hot plate and you smoke, go red and get flung off with a sizzle and a scream, tumbling over and over to land on your back with your legs waving. Swoop while you're tumbling for a flashing SNAG-ROCKET! that travels along above you
- The postie rides his motorbike along the front street, stopping at letterboxes: poop on him and he somersaults off over the handlebars in slow motion, arms and legs flailing, lands on his feet, walks back to his bike, picks it up and rides off the other way; an Aussie flag flaps in one front yard; a green-and-cream ferry crosses the harbour back and forth, and a shark fin often cruises past (about half the time, until you've swooped it): swoop it and it dives with a splash (FIN-ISHED!)
- A cyclist rides along the lawn with 4 short cable ties fanned round his helmet like spokes: poop him and he wobbles, shakes his fist, rings his bell and shouts "Oi!"; swoop him and the cable ties spike you: knocked back tumbling, you land on your back with your legs waving
- Hang about under the big gum for 3 seconds and a drop bear drops on you, then climbs back into the leaves
- Land on the postie or the ferry and ride along with them
- A possum (a bit bigger than at first) is out on the power line between two houses about 40% of the time, scurrying back and forth and stopping for a rest (poop on him and he spins round and round the wire for 3 seconds); a screeching flock of cockatoos flies across the sky (fly in among them for 5 seconds to join the flock: FLOCK YEAH!); tiny bridge climbers cross the Harbour Bridge (poop on them and they jump up and down swearing: #!$?)
- Fly through the BOTTLE-O and he's drunk for 10 seconds: left and right swap now and then, he hiccups, the whole scene sways from side to side (3% of the screen's width), three faint echoes of him trail along his path, every sound echoes, and now and then the game jolts sideways in 10 strips and slides back
- Every few minutes a summer storm rolls in: dark sky, rain, lightning and thunder, then a rainbow. The rain slants past you the way you're flying: fly forward, swoop, climb or dive and it tilts, streaking longer the faster you go
- Score points for knocking things over, poops on target, stunts and rides; each score within 6 seconds of the last builds a combo (up to x5, shown next to the points, e.g. +40 COMBO X4), with a COMBO bar under the poop bar counting down the 6 seconds; your high score is remembered. You lose 100 points (a red minus) for swooping the cyclist, landing on the barbecue or getting drop-beared, and the score can go below zero
- On the ground the magpie carols every 10 to 20 seconds, head up and beak working
- B for a barrel roll (two turns on his own axis, bursting forward at swoop speed with no afterburner), L for a loop-the-loop; in both he stretches out to half as long again and back
- M (or the speaker icon) turns the sound on and off
- O (or the OBJECTIVES link under the timer, top right) opens the list of all 31 objectives, each named by the caption it shows, with a tick when done; the game waits while it's open, and any key closes it. A timer runs from your first move
- Do all 31 and the game is complete: a fanfare, a big TOO EASY, MATE!, your time and score, and only then does your score count for the high score. Press any key to play again
- Poops fade away after 10 seconds
- The game keeps a 16:9 view and fits any window size, centred, with black bars top and bottom (tall windows) or at the sides (wide ones)
- Everything you hit or ride gets a pop-art Aussie caption: ROO THE DAY!, KANGA-POO!, ROO-DIMENTARY!, KOOKA-BOOM-A!, SPECIAL DELIVERY!, CYCLO-PATH!, STREWTH!, ROUND THE TWIST!, COAT-HANGER!, BARBIE-POO!, COOKED, MATE!, SNAG-ROCKET!, YEAH, NAH!, DOWN UNDER!, BLUDGER! (the ferry), POSTIE-PILLION! (RBT TIME! if you land on the postie drunk), SPIN-CYCLE!, WHIPPER-SNIPPER!
- Poop on someone during a swoop for a pop-art SWOOP-AND-POOP! (red comic lettering) above the magpie, loop during a swoop for SWOOP-AND-LOOP!, or barrel roll during one for BARREL SWOOP!. Loop-the-loop and then, within 6 seconds, land a swoop-poop on someone for LOOP-POOP-SWOOP! (+400, and it counts for SWOOP-AND-LOOP! too)
- Things done together all count, and their captions stack: a swoop-poop on the kangaroo is KANGA-POO! and SWOOP-AND-POOP!; a barrel roll in the BOTTLE-O mid-swoop is BEER-BARREL! and BARREL SWOOP!, then GROG RUN! on the way out; landing on the postie drunk is POSTIE-PILLION! and RBT TIME!
- Press P to poop: a white teardrop that sploshes on the lawn. It takes a full poop bar, which refills in 3 seconds
- Fly through the BOTTLE-O (in through one side, out the other): bottles and cans of Foster's and Johnnie Walker tumble out (GROG RUN!), or barrel roll while you're inside for BEER-BARREL! and two beer barrels come bouncing out instead; and for 10 seconds he flies erratically with bubbles and glowing red eyes. You can also land on its roof; the BOTTLE-O sign on posts above it is just scenery
- The magpie drifts down slowly under gravity, lands softly on the lawn and walks along it
- Touch screens: hold where you want the magpie to go; tap quickly to start or stop a swoop; tap with a second finger to poop
Game controller
Standard layout (Xbox, PlayStation and similar). Press any button once after plugging it in so the browser sees it.
| Control | Does |
|---|
| Left stick or D-pad | Fly |
| A / Cross | Flap |
| Right trigger or right bumper (hold) | Swoop |
| X / Square | Poop |
| B / Circle | Barrel roll |
| Y / Triangle | Loop-the-loop |
| Back / Select | Sound on or off |
| Start | Objectives list |
Objectives
Do all 31 to complete the game (press O in the game for this list, with ticks). Each is named by the pop-art caption that shows when you do it.
| # | Caption | How |
|---|
| 1 | SWOOP-AND-POOP! | Swoop-poop on someone |
| 2 | SWOOP-AND-LOOP! | Loop-the-loop in a swoop |
| 3 | LOOP-POOP-SWOOP! | Loop, then swoop-poop someone |
| 4 | BARREL SWOOP! | Barrel roll in a swoop |
| 5 | GROG RUN! | Fly through the BOTTLE-O |
| 6 | BEER-BARREL! | Barrel roll in the BOTTLE-O |
| 7 | RBT TIME! | Land on the postie drunk |
| 8 | WHIPPER-SNIPPER! | Swoop past the Hills Hoist |
| 9 | SPIN-CYCLE! | Ride on top of the Hills Hoist |
| 10 | DOWN UNDER! | Hang under the Hills Hoist |
| 11 | SNAG-A-SNAG! | Catch a flipped snag |
| 12 | BREKKIE! | Feed a snag to the chicks |
| 13 | BARBIE-POO! | Poop on the barbie |
| 14 | COOKED, MATE! | Get flung off the hot barbie |
| 15 | SNAG-ROCKET! | Swoop tumbling off the barbie |
| 16 | ROO THE DAY! | Swoop the kangaroo over |
| 17 | KANGA-POO! | Poop on the kangaroo |
| 18 | ROO-DIMENTARY! | Ride the kangaroo |
| 19 | KOOKA-BOOM-A! | Knock the kookaburra off |
| 20 | CYCLO-PATH! | Poop on the cyclist |
| 21 | STREWTH! | Swoop the cyclist |
| 22 | SPECIAL DELIVERY! | Poop on the postie |
| 23 | POSTIE-PILLION! | Ride on the postie's bike |
| 24 | BLUDGER! | Ride the harbour ferry |
| 25 | FIN-ISHED! | Swoop the shark fin |
| 26 | FLOCK YEAH! | Fly 5 s in the cockatoo flock |
| 27 | ROUND THE TWIST! |
How it's made
- One HTML page and plain JavaScript in js/, with the 2D canvas (no WebGL). The scripts are ordinary ones, not modules, so you can also just double-click
index.html to play, no web server needed:
sun-image.js: the sun picture; data.js: the world's numbers and the colour, font and sprite tables; helpers.js: maths, colours, pixel painting and the font
sound.js: all the sound; scenery.js, magpie.js, shop.js, cast.js: building and drawing everything you see
game.js: input and how the magpie moves; draw.js: drawing each frame; main.js: start-up and the game loop
- Sound made in code with Web Audio: the swoop's afterburner roar, poop plop and splosh, clanging cans, hiccups, the magpie's carol, a sizzle, a kookaburra laugh, doiiinggg, a bike bell and an "Oi!", a drop bear's growl, screeching cockatoos, rain and thunder, and a background of breeze, cicadas and a didgeridoo
- The scenery is pixel art drawn in code at 180 pixels high and scaled up; the magpie is drawn smoothly at about 3/4 of a scenery pixel (a little pixelated), and the sun is a photo of the Sun King emblem (supplied with the prompts), cut out of its background and embedded in the page
- The level is 6 screens wide and loops round, with 8 parallax layers: lawn, the front street, 3 back streets that tier off into the distance, hills (Sydney Harbour Bridge, Opera House, Uluru) and billowy clouds. The sun moves slowest of all
- screenshots/: numbered screenshots of the game as it was built, shown in order on
screenshots.html (linked in the game, bottom right)
- PROMPTS.md: every prompt used to make the game (also linked in the game, bottom right)
- The version number under the links (bottom right) counts the updates published, one per commit
- Performance: about 2 to 3 ms a frame (of the 16.7 ms a 60 fps frame allows), even with a storm, cockatoos and a blurred swoop; still about 56 to 60 fps with the CPU slowed 4 times