Skip to documentation
CranberryClock.Ideas / Systems / Design

GAME TEMPLATE / v0.1.0

AfterglowOverview

Read the warning. Find your opening. Survive three rounds in a forgotten temple.

Keep the last light alive. A complete 54-second arena survival game in an original floating sun temple, made with native Three.js, Cranberry Forge Signal and Cranberry Forge Flux. Read a charged warning, move into safety, or dash through the moment of impact. Survive three rounds to win; spend all three light charges and try another sunrise.

The portable download includes the game, official Three.js 0.180.0, its required addons, the two independent Cranberry Forge packages, and a small local web server. It needs no build step, npm install, external artwork, API key, account, or network service at runtime. All art is original procedural Three.js geometry. Signal supplies real warning meshes and the matching footprint query; Flux supplies the actual dash ribbon.

Play

Action Keyboard Touch
Move relative to the fixed camera WASD or arrow keys Direction pad
Dash in the current or last movement direction Space Dash button
Pause / resume P; Escape also opens pause Pause button
Read the rules How to play ? button on small screens
Reduce decorative motion Calm visuals Calm visuals
  • Sunfall: leave the circle before it fills.
  • Solar fan: cross either side of the wedge.
  • Light lance: sidestep the straight lane.
  • Corona: move into the ring's empty center.
  • Twin sunfall: later rounds can charge two circles together.

Only the instant a warning finishes can deal damage. The drawn fill communicates charge progress, while its full boundary communicates the entire danger area. Warm colors indicate danger; the thin mint floor ring marks the movement limit. There is no damage-over-time zone after the brief impact flash.

A dash lasts 0.22 seconds and provides protection for that interval. Its 1.25-second cooldown begins when the dash starts. A hit consumes one light charge and grants 0.75 seconds of protection against stacked impacts. The controller treats the keeper as a point on the XZ floor; the character's hat, staff and body do not enlarge its hitbox.

Each survived strike earns 100 points, including strikes blocked by dash or post-hit protection. Survival time earns 10 points per second. Winning adds 250 points for each remaining light charge. The optional personal best is stored only in this browser's local storage; denied storage never prevents play.

Opening help, switching tabs, or losing window focus pauses gameplay. Calm visuals follows the device preference initially and can be changed in the page. It stops decorative animation, player blinking and Flux ribbons, and reduces bloom. Essential warning progress remains visible. There is no camera shake, sound dependency or timed dialogue.

Scope and verification

This is a complete small survival game and an editable integration example. It uses kinematic movement constrained to a circular floor; there is no physics engine, obstacle collision, jump, pathfinding, enemy AI, networking, audio system, authoritative score verification or general save/load layer. The decorative pillars sit outside the default movement boundary. Scores are local and can be edited by a device owner.

Seven targeted Node tests cover a full public-input win loop, a finite loss/restart loop, pause immutability, dash protection/recharge, every warning kind's footprint agreement against actual Signal transforms, malformed inputs, detached state, and renderer-free scene/reset/disposal. The repository's portable archive check also verifies local imports and HTTP assets after extraction. Browser visual QA was unavailable in the build environment; offline geometry illustrations are labeled accordingly. Try your target devices before shipping a customized game.

The code and procedural art are MIT licensed. Keep this template's license and the included third-party license files when redistributing.

View versioned source on GitHub ↗