Games

Petal Ward keeps the controls small and the loading separate

by

Eight waves give Petal Ward a clear destination. OpenKrill’s browser defence game places Hana inside a magic circle while yokai approach, with automatic bolts, an extra cast on a tap and a crowd-clearing Petal Burst. Its Phaser feature also describes a less visible choice: the rules live in plain TypeScript, while the Phaser renderer loads separately.

Those two decisions make a useful pair for a small web game. One limits what the player needs to learn at the entrance. The other gives the developer a boundary between the game’s decisions and the machinery that presents them.

Hana stands in a magic circle as purple yokai approach and a pink bolt travels across the arena.
Petal Ward keeps Hana at the centre while enemies close in. Image: OpenKrill, via Phaser.

Give a tap one understandable job

The playable page’s instructions say that a tap targets the nearest enemy. Between waves, the interface asks players to tap an upgrade to inspect it and tap again to buy. That is a deliberate change of context: during a fight, a tap acts; in the shop, there is a chance to read before spending.

For a touch-first prototype, write down those meanings before adding more buttons. What happens if the player taps a second time while a panel is opening? Can the same gesture dismiss an explanation and buy something behind it? An input can be simple to describe while still needing careful handling at the boundary between two screens.

The Bomber Bunnies controls article follows a similar concern with deliberate button presses. Its keyboard and gamepad examples belong to another kind of game, but the question transfers well: does one intended action produce exactly one result?

Keep the rules usable without the renderer

OpenKrill told Phaser that Petal Ward’s rule code has no Phaser import, and that the renderer is loaded as a separate, lazy chunk. The team reports a mobile Lighthouse performance score increase from 70 to 99. That is their measurement, not a benchmark we have reproduced. The same write-up discloses generative AI assistance with art and code.

Separating the rules suggests a manageable exercise for your own project. Take an upgrade purchase: its inputs might be the current coin total, the selected upgrade and the upgrades already owned. Its output should say whether the purchase succeeded and what changed. You should be able to inspect that result without drawing the shop, playing its animation or opening a WebGL canvas.

Daniel uses shared TypeScript rules in his Slime & Steel account to support a much larger project. Our browser replay walkthrough explores another reason to make the state and accepted actions explicit: reproducing the same result later. A separate rule module helps create that boundary, although deterministic replays still need deliberate handling of time and randomness.

Measure the wait after Start as well

A higher page-load score does not tell you how every wave performs. Google’s Lighthouse scoring guide explains that the performance score combines weighted metrics and varies with testing conditions. Treat a reported improvement as a reason to inspect the loading sequence, rather than as a promise about every phone.

For a small experiment, record three moments: when the title screen appears, when Start is pressed, and when the first meaningful input is accepted. If loading moves behind the Start button, the first number can improve while the second wait gets longer. Decide what should happen during that wait and make the button acknowledge the press immediately.

Then compare a fresh visit with a repeat visit under the same conditions. Our texture memory comparison is a useful reminder that download size and runtime cost are different measurements. Keep transfer time, input readiness and in-game responsiveness separate when deciding what to optimise next.

Petal Ward title artwork with the pink-haired heroine Hana holding a star wand inside a magic circle.
OpenKrill’s Petal Ward artwork, as featured by Phaser.

Finish one loop before adding another

Petal Ward’s eight-wave structure makes it possible to inspect a complete sequence: learn an action, survive, choose an upgrade and return to the arena. That is a sensible scope for studying whether a game explains itself across transitions.

Try the browser version of Petal Ward on the device you normally use least for testing. Watch the first shop visit as closely as the first fight. The most useful improvement to a compact game may be a clearer purchase or a quicker response to Start, even when the combat already looks finished.

Leave a Reply

Your email address will not be published. Required fields are marked *