

Plants vs. Zombies Web Demo
The Plants vs. Zombies web demo is PopCap's official 2009 Flash slice of the lawn-defense hit, first hosted on PopCap.com and Pogo.com. Plant sunflowers and peashooters, bank sun, and hold all five lawn lanes against the zombie wave — the opening act of the full game, playable in minutes.
This page is a 460 kilobyte Flash build of Plants vs. Zombies running inside Ruffle, and the SWF carries the real game: eighteen mode constants, a scripted tutorial for the first two plants, and a plant roster of nearly thirty animation sets. This guide is about what the demo actually ships.
The page is under two kilobytes: a canvas, a script tag and a call into Ruffle, the Flash emulator. Everything that matters is in the SWF beside it, which measures about four hundred and fifty kilobytes and contains the original Flash game rather than a video or a stripped demo.
That matters for what a player gets. A Ruffle page does not reimplement the game; it runs the 2009 ActionScript build, which is why the timings, the sun drops and the seed packet prices behave as they did. When something feels off, it is the emulator layer rather than a remake.
The string table inside the SWF is a full inventory: `com.popcap.flash.games.pvz.logic` prefixes the board logic, `GAMEMODE_` prefixes every mode and `TUTORIAL_` prefixes every tutorial step. A demo label does not mean a cut down engine.
The mode constants are the clearest measure of content. Adventure is there, along with Wall-nut Bowling, a nine stage Scary Potter run and its endless variant, four survival stages, an endless survival stage and an upsell screen.
| Mode family | Constants |
|---|---|
| Adventure | GAMEMODE_ADVENTURE |
| Challenge | GAMEMODE_CHALLENGE_WALLNUT_BOWLING |
| Scary Potter | GAMEMODE_SCARY_POTTER_1 to _9, plus _ENDLESS |
| Survival | GAMEMODE_SURVIVAL_NORMAL_STAGE_2 to _5 |
| Survival endless | GAMEMODE_SURVIVAL_ENDLESS_STAGE_2 |
| Storefront | GAMEMODE_UPSELL |
The survival list starts at stage two rather than stage one, which is not a missing string: the first survival stage is the day lawn and is handled by the normal board path. The upsell mode is the demo’s own addition, and it is why a session can end on a purchase prompt rather than on a game over.
Twenty two tutorial constants describe a step by step opening. The sequence is Peashooter first: pick it up, plant it, then refresh it. Sunflower follows the same three steps, then a more-sun variant repeats them so the player learns that sun is the currency before the second plant.
| Step family | Constants |
|---|---|
| Level one | PICK_UP_PEASHOOTER, PLANT_PEASHOOTER, REFRESH_PEASHOOTER |
| Level two | PICK_UP_SUNFLOWER, PLANT_SUNFLOWER, REFRESH_SUNFLOWER |
| More sun | PICK_UP_SUNFLOWER, PLANT_SUNFLOWER, REFRESH_SUNFLOWER again |
| Shovel | PICKUP, DIG, KEEP_DIGGING |
| Stays | LEVEL1_STAY, LEVEL2_STAY, LATER_STAY |
The shovel has its own four steps, including a keep digging reminder, which is the one place the tutorial teaches removal rather than placement. A tutorial that spends a whole step on how to unplant is the difference between a demo that teaches and one that only shows.
A tutorial off constant also exists, which is how a returning player can skip the whole sequence rather than clicking through it. That single flag is the difference between a demo that a returning player tolerates and one they abandon on the second launch.
The art references name the plants and props directly: Peashooter, Sunflower, Wall-nut, Cherry Bomb, Chomper, Potato Mine, Snow Pea, Squash, Puff-shroom, Fume-shroom, Sun-shroom, Grave Buster, plus lawnmower, flag, sun, dirt and the zombie rig.
A zombie rig is one animation set in this list, but it is the one with the most variations: bucket, paper, football, flag and charred heads all appear as separate image names under the same rig. That is why a single zombie can look like five threats without five models.
Sun spawning is described in the string table as from sky, from sky slow, and small sun, and a seed chooser plus a seed packet object handle the selection. That confirms the two income sources and the packet cool down model without quoting a single price, because the prices are compiled numbers inside the board logic.
A seed chooser offset constant also appears, which is the panel placement rather than a gameplay value. It is a reminder that in this build the interface is drawn on the Flash stage: the seed row, the sun counter and the flag meter are all stage objects, not DOM elements.
Grave tiles are handled separately, with the strings not on graves and only on graves controlling where a plant may go. A demo that keeps grave placement is a demo that keeps the level variety, since the graveyard rows are what make the later stages different rather than harder.
A flag meter image and a huge wave message style appear in the asset list, so the level structure with a mid level flag and a final wave is present rather than implied. That is the pacing system the whole game runs on, and a demo that keeps it keeps the tension curve.
Wave counts, sun values and seed packet prices are compiled ActionScript numbers rather than named constants, so no table of costs can be quoted from the SWF strings. Level order is in the board data the same way.
The other limitation is the emulator. Ruffle runs the Flash build, and the game’s own tutorials assume a mouse and a Flash stage size. This guide therefore describes the content inventory and leaves the tactics to the gameplay guide for the same series.
Ruffle, the Flash emulator, with the original 460 kilobyte SWF beside the page. It is not a remake.
Eighteen mode constants: adventure, wall-nut bowling, nine Scary Potter stages plus endless, four survival stages, endless survival and an upsell screen.
Yes. It walks through picking, planting and refreshing a Peashooter, then a Sunflower, then a more-sun repeat, and finally the shovel.
Twenty nine animation sets are referenced, covering the plants, the sun, the lawnmower and the zombie rig.
Yes. Four normal survival stages and an endless survival stage are present as mode constants.
An upsell mode is part of the build. It is why a session can end on a store prompt rather than a game over.
No. Sun spawning is described in strings, but the amounts and packet prices are compiled numbers.











