Tap an enemy mech to start.
Mech Arena playable ad demo
A 20-second 3D playable built with three.js: tap enemy mechs, charge a missile strike, finish on an end card with a store CTA. Everything — mechs, arena, effects, sound — is generated in code, so each network build is a single self-contained HTML file.
Builds
| Network | Single HTML | gzip | Budget | |
|---|---|---|---|---|
| Loading… | ||||
Each build ships exactly one adapter: FbPlayableAd.onCTAClick() for Meta, ExitApi.exit() for Google, mraid.open() with ready/viewable handling for MRAID networks (Unity Ads, AppLovin…). The build fails if a file exceeds the budget or references anything external.
Under the hood
- Zero allocations in the frame loop. Projectiles and particles live in fixed-size slot pools backed by typed arrays and are drawn with
InstancedMesh. - Few draw calls. Each mech is 3 merged, vertex-coloured meshes; obstacles are one instanced mesh; shadows are blob decals instead of shadow maps.
- No assets. Procedural geometry, canvas-generated textures, WebAudio-synthesised sound effects, system fonts.
- Ad lifecycle. Waits for the network to be ready, pauses rendering and audio when the ad is hidden, unlocks audio on the first tap, adapts to portrait and landscape.
- Named game states.
intro → tutorial → battle → strike → won | lost → end; illegal transitions are impossible and covered by tests.