Skip to content

Latest commit

 

History

153 Commits

Folders and files

Repository files navigation

Pineapple Defense

Flick pineapples at jealous penguins. Defend your fruit stand. Nobody gets hurt.

Play it now · About · Source code

alpha MIT free no ads, no tracking works offline

Pineapple Defense

What it is and how it works

A silly, glossy toy-box game for kids of all ages. Penguins march toward your fruit stand and you flick a pineapple from the bottom of the screen: the direction picks the target area, the speed sets the power. It is one self-contained HTML file with no network calls, and it works on phones, tablets and computers.

Why it exists

LFC Foundry is a home for free, open source games and apps that each live in a single file. Pineapple Defense is the flicking game in that set, made for kids first: no ads, purchases, accounts, streaks, timers or leaderboards, and losing is gentle.

Made for kids, kept simple

  • No ads. Not one, anywhere in the game.
  • No accounts. Nothing to sign up for or log in to.
  • No data sent anywhere. The game makes no network calls, and progress stays in your own browser.
  • No microtransactions. Golden Pineapples are earned by playing and nothing is for sale.
  • Fully open source. MIT licensed, with every line on GitHub.
  • Nothing to install. No install, no administrator rights and no special computing knowledge: open the page and tap Play.
  • Works offline. The game is one self-contained file with no network calls, so once the page has loaded (or you have saved it) you can play with no connection.
  • Single player. Just you and the penguins: no online play, no chat, nobody else to meet.
  • Works in any modern browser. Tested in Chromium, Firefox and WebKitGTK, on phones, tablets and computers of most standard screen sizes.

Title screen Sandy Snack Shore Iceberg Harbor Hullabaloo Glacier Party Fortress

Highlights

Five stages, five Champions Pineapple Roll 21 trophies Comfortable settings
Each Champion fights differently, and a hint tells you how to win. A carnival bonus game after stage 4, with holes that score more the harder they are. Trophies pay Golden Pineapples to spend in the Shop. Left-handed layout, calm mode, larger text, high contrast and a battery saver.

Status: alpha (see the changelog for the current version). All five stages, five Champions, the Pineapple Roll bonus game and a shop are playable. The art is still being polished.

New here? The first time you open the game, a short picture tour shows how to play. You can skip it, and replay it any time from How to play.

By the numbers

One file Start-up Next stage Tested in
2.4 MB with all art and code, no network calls 113 ms to a finished start (Chromium, median of 9) 6.1 ms of page code to start stages 2 to 5 Chromium, Firefox and WebKitGTK

Silent by design: with no sound, the game is a visual and tactile experience with less stimulation for players with sensory challenges, and you can play anywhere with nothing to mute.

See the about page for screenshots, the stages and the upgrades.

How to play

A short picture tour shows the first time you open the game (you can skip it, and replay it from How to play).

  1. Flick up from the bottom of the screen toward a penguin (on a mouse or touchpad, swipe up over the game). A harder flick throws farther.
  2. Penguins that reach your fruit stand make it wobble and lower the Cheer meter (the tall bar on the right). Clear waves to cheer it back up.
  3. Each stage has five waves, shown by the bar across the top, then a Champion. Every Champion fights differently, and a hint tells you how to win.
  4. Every penguin you bonk pays Golden Pineapples (Rockhopper 1, Adélie 3, Gentoo 6, Champion 12). Spend them in the Shop on the title screen.

Handy things to know

  • Pick Classic (quick, free) or Lobber (slower, splashes nearby penguins, 2 Golden Pineapples a throw) at the bottom left. Mega pineapples splash the most and cost 3.
  • Watch for fish on parachutes. A penguin that eats one levels up and gets faster and tougher, and a Gentoo that eats another becomes a mecha penguin with armor that takes 3 hits.
  • Penguins wear all kinds of things: warm hats, scarves, mittens, and hot chocolate. Spotting one in a full outfit is a treat.
  • Combos: every hit within a second and a half chains, whether it comes from your slingshot, a helper or one big splash.
  • Tap the pickups that appear on your table, and the little surprises hiding in the scenery (a talking cloud, a duck, a whale, balloons you can pop). Each stage also hides one secret tap spot on each side.
  • After stage 4 you can play Pineapple Roll, a carnival bonus game: flick a ball up the lane into the holes. The harder holes score more, and a ball that rattles around a rim can still drop in. You get two plays per run, and what you win becomes Golden Pineapples.
  • Runs: clearing all five stages is a run. Each finished run makes penguins and Champions 10% faster (up to double speed) and brings a new challenge and more trophies.
  • Settings (title screen): game speed (100% down to 60%), left-handed layout, the dotted aim arc, high contrast, larger text, large buttons, a calm mode that turns off bobbing, confetti and other motion, a battery saver, an FPS counter with a plain-words verdict, tap or hold to throw (for very young players), an early flick helper, a one-tap Little hands setup, four game-feel options (hit pause, screen shake, sticky aim, smoother flick speed), every finger plays, a danger glow for penguins near your stand (on by default), a For grown-ups card, keep screen on and full screen. A new game asks once whether you want to Flick or Tap. On Android the back swipe pauses the game. A second copy opened in another tab plays without saving, so two tabs never overwrite each other.
  • Game feeling slow or stuck? Tap the top-left corner of the title screen five times to open a small panel that saves a plain-text speed report or an error log you can send to the makers. Nothing is sent anywhere by the game itself.
  • Keys on a keyboard: P or Esc pauses, R calls the Pineapple Rain, 1 and 2 pick the pineapple.

The five stages

1. Sandy Snack Shore
Coach Waddles
2. Flip-Flop Flats
Captain Flipper
3. Iceberg Harbor Hullabaloo
Sir Slidealot
4. Stormy Splash Sea
Madame Mohawk
5. Glacier Party Fortress
Grand Champion Bernard

Pineapple Roll Trophies Shop

Pineapple Roll (the bonus game) · Trophies · Shop

Shop upgrades

Upgrade
Auto Slingshot
A helper slingshot on your table that tosses pineapples for you. It aims at the penguin with the teal marker and sometimes misses.
Faster Fling (3 levels)
Your helper tosses faster: every 5.2, then 4.2, 3.4 and 2.8 seconds.
Better Pineapples (2 levels)
Unlocks the splashy Lobber, then the super-splashy Mega pineapple.
Lime Launcher
A small green helper for Champion fights. It pops the shields and snowballs around the Champion.
More Limes
12 limes in every Champion fight.
Lots of Limes
20 limes in every Champion fight.
Gull Pals (3 levels)
A gull swoops in and snatches falling fish, so fewer penguins level up.
Paper Umbrellas (3 levels)
Drink umbrellas on your table snap open and fling away a penguin that is about to bump you.
Pineapple Rain (2 levels)
Press the Rain button and a row of pineapples falls across the lanes.

Pickups

Pickup
Zippy!
Super fast throws for 8 seconds.
Mega!
Every throw splashes for 8 seconds.
Cheer up!
Fills the cheer meter.
Toasty!
Sleepy, slow penguins for 6 seconds.

21 trophies

Trophies pay Golden Pineapples. They show as a gold icon when you have them and as a gray one when you do not.

Trophy Trophy
First Toss
Fling your very first pineapple.
Hat Trick
Hit 3 penguins in a row.
Splash Party
Splash 3 penguins with one throw.
Perfect Wave
Clear a wave with no bumps.
Snowball Popper
Pop all of Coach Waddles’ snowballs.
Coach Champ
Beat Coach Waddles.
Power Pal
Grab a power-up pineapple.
Eagle Eye
Hit 5 penguins in a row.
Phew!
Clear a wave when the cheer bar is low.
Spotless Stand
Win a stage without one single bump.
Gull Pals
A gull swoops in and snatches a fish.
Brolly Boss
Fling a penguin with a paper drink umbrella.
Pineapple Rain!
Make it rain pineapples.
Big Rain
Hit 4 penguins with one Pineapple Rain.
Team Spirit
Chain a combo with both slingshots.
Combo Master
Reach a 6-hit combo.
All Five!
Clear all five stages in one run.
Faster Fun
Win a run when the penguins are a lot faster.
Top Speed
Win a run when the penguins are super fast.
Challenger
Finish a run challenge.
Grand Finale
End Pineapple Roll on a 100.

For developers

Everything is one self-contained HTML file built from src/. There are no runtime dependencies, no network calls and a strict content security policy.

  • Design brief: docs/pineapple-defense-design.md · QA and build process: docs/qa-process.md · ideas and performance audits: docs/ideas-qol-and-performance.md · changelog
  • Build: python3 build.py makes the single-file play/index.html from src/ (needs fonttools; npm i --no-save esbuild for the minified page, which starts about 20% faster; the readable copy lands in dist/readable/, or set PD_READABLE=1). Do not edit play/index.html by hand.
  • Packed single file: python3 tools/pack.py makes one smaller, self-unpacking .html in dist/; add --min to pack the minified page (python3 build.py --min first, needs esbuild).
  • Icons: python3 -I tools/make_icons.py regenerates src/sprites/icons.svg and the standalone files in docs/icons/.
  • Speed guard: node tools/speed_guard.js <chromium|firefox|webkit> before.html after.html takes turns between two builds in one test browser and prints start-up times with the 5% verdict (needs npm i --no-save puppeteer-core; see the file header).
  • Picture gate: python3 -I tools/picture_gate.py before.html after.html compares two builds in the three test browsers in about 60 seconds (99.5% of pixels within 3 of 255; needs numpy). Use it for look-only changes; the full run below stays the release gate.
  • Pictures and speed: the 77 pre-drawn sprites are lossy WebP data inside the page (no color profile, 2.6 MB page); Chromium decodes them in background workers, and the 384 pixel copies are let go on phone-sized screens. The speed report panel comes from the vendored field-report module and the quality governor from fx-governor (both from JS-modules, see src/vendor/).
  • Checks: python3 -I tools/qa.py (add --ff for Firefox). Release: python3 -I tools/release.py.
  • Test browsers: Firefox 158, ungoogled Chromium 155 and WebKitGTK 2.52.6, one at a time. GNOME Web was a fourth test browser until 2026-10-24 and is no longer used. The changelog lists what each release was tested in, and says "not recorded" where that was not noted. Targets: Android Chrome, Firefox and Chromium-based desktop browsers.

More from LFC Foundry

Credits and license

Forged by LFC Foundry. Copyright © 2026 LFC Foundry, released under the MIT License (see LICENSE). Branding notice: the name "LFC Foundry" and the project identities are reserved; if you fork, significantly modify or commercially redistribute this game, change the public product name and branding. The same notice sits at the top of every built page and the credit "Forged by LFC Foundry, MIT License" shows on the title screen.

Pieces with their own notices: fonts Bricolage Grotesque and Figtree (SIL OFL 1.1, see src/fonts/). sticker-text from JS-modules (MIT, see header in src/vendor/). Packer and unpacker for the single file: lzma-pack and lzma-decode from JS-modules (MIT, see tools/vendor/).