Designing a one-control iron ball arena brawler in Three.js: sub-stepped flail physics, combos, and builds

By Ant Games (@antgames.bsky.social)
Published:

SCARECROW SMASHER: a hero with a swinging iron ball on a chain bursts scarecrows into straw in an arena at dusk

A melee survivor-style game has a design problem that auto-shooters do not: if the player never presses an attack button, how do you make every hit feel earned instead of automatic?

When we built SCARECROW SMASHER — a free iron ball arena brawler in the browser where you only move and a chained flail does the smashing — the answer came down to physics and readability. If your footwork directly drives the ball's speed, if speed unlocks clearly visible power tiers, and if the chain itself sweeps light enemies into the head, then movement becomes your attack button.

Here is how the simulation, Three.js HDR dusk pipeline, and card-family build system work under the hood.

Watch the 16:9 gameplay trailer: SCARECROW SMASHER Official Trailer on YouTube

Why a swinging ball needs 240 Hz sub-stepping

The entire combat loop lives in a pure, deterministic 60 Hz TypeScript simulation (src/sim/flail.ts) with no DOM or clock dependencies. Inside each 1/60 s tick, however, the flail runs 4 sub-steps (SUB_DT = 1/240 s).

At 60 Hz alone, a fast iron ball orbiting a 3-metre chain (CHAIN_LEN = 3.0) at top speed (V_MAX = 36 units/s) travels 0.6 metres per frame—wider than a small scarecrow—and a single-step constraint pull causes jitter whenever the player reverses direction. Sub-stepping at 240 Hz solves both:

Making the chain feel tactile instead of frustrating

A swinging head on a tether creates two classic physics edge cases: small enemies slipping inside the arc, and the ball getting wedged against a heavy boss. We handled both directly in the flail sub-step:

Combos, FRENZY, and ground-warning discipline

Every burst enemy adds +1 to your combo and refreshes a 2.5-second window (paused when no enemies are alive or while FRENZY is active). Reaching combo milestones at 10, 25, 50, 100, and 200 boosts how fast smashes fill your card bar—up to 3× speed.

At 20 quick smashes (and every 60 smashes after that in the same streak: 20, 80, 140, 200...), you trigger a 6-second FRENZY: the flail arm hits 1.6× stronger drive speed, impacts count 1.5×, and the ball stops bouncing off targets. Taking damage that reduces your life ends your combo (though any active FRENZY finishes its timer), which gives every red line and circle on the arena floor double weight: dodging saves both health and momentum.

Keeping a dusk 3D arena crisp in Three.js

On the rendering side (src/render/stage/post.ts), SCARECROW SMASHER runs a custom Three.js half-float (RGBA16F) linear-HDR post-processing chain tuned specifically for crowded melee combat:

Card families, permanent hero levels, and ten nights

A run lasts about 10 minutes: eight escalating waves followed by the Scarecrow King. Whenever smashing fills the card bar, the game deals three cards from six distinct families (ball, chain, hero, life, smash, combo) with a strict rule that no two cards in an offer share a family—and every ball card you take stacks its traits permanently for that run while letting you swap a bad draw twice (R).

Out of the box, there are 26 base run cards (most upgradeable across multiple levels) plus 6 more unlockable cards in EXTRAS (such as Twin Ball, Anchor, Snap Back, Close Call, Unhurt Frenzy, and Ripe Apples) bought with MERIT earned after wins. Between runs, cleared waves grant XP up to level 30, giving 1 point per level across 5 permanent stats and 18 skills arranged in three boughs (Ball, Guard, and Combo), including active skills starting at level 3. Beating all 10 nights without help unlocks YOUR NIGHT, where you stack custom rules to push your best RISK record.

Try a ten-minute run

If you want to feel how a single-control flail brawler plays when speed is your damage, open SCARECROW SMASHER in your browser—mouse, WASD, arrow keys, or touch all work, with English and Simplified Chinese built in. The game is free, no pay to win, no sign-up, and plays in the browser with nothing to install.

A note on how it was made: the game was built with heavy AI assistance (including Claude Code), directed, tuned, and verified by our team at Ant Games, and this article was also drafted with AI assistance.