Physics-driven strategy · Babylon.js · browser native

Protect the energy that keeps you alive.

Defend is a strategy game about scarcity, temporary fortifications, and manipulating a physical battlefield. Energy is your health, construction budget, defended resource, and the economic consequence of combat.

Core loop
Build · redirect · recover · endure
Battlefield
3D physics, momentum, obstruction and ejection
Architecture
Babylon presentation + deterministic Rust/WASM experiments
Defend modern towers and terrain systems preview
Current systems preview — towers, projectile misses, impacts and deformable terrain.

History

One playable game, then a deliberate rebuild.

The modernization treats the original as a behavioral reference rather than discarding it. New systems must prove that they preserve Defend's identity before replacing historical ownership.

  1. Repository begins

    The first public commits establish the original browser game.

  2. PWA work

    The project explores installable web delivery while keeping the game browser-first.

  3. Babylon.js community release

    Defend is shared publicly as a 3D tower-defense webgame and later becomes part of the Babylon.js Community Demos collection.

    Original Babylon.js community thread · Babylon.js Community Demos

  4. Modernization program

    The project formalizes its game-design manual, deterministic contracts, Storybook laboratories, Rust/WASM core, and a Babylon 9 hybrid-engine preview.

  5. Classic MVP remains the game

    The complete historical MVP remains the primary playable Defend experience. Modern systems are published separately as unfinished experiments until full gameplay parity is certified.

Historical version

The original is still the reference game.

The historical Webpack/Babylon.js 3/Cannon application contains the complete original gameplay loop: direct world interaction, tower placement and upgrades, attacking spheres, energy recovery, finite-lived enemies, procedural sound, victory/defeat and restart behavior.

Playable MVP: the classic implementation is published on this site as the current complete game while modernization continues. The experimental routes below are development previews and do not replace the MVP until parity is certified.

Modern deterministic arena inspired by the original Defend battlefield

Unfinished development experiments

The future game is being built as inspectable systems.

These playgrounds are experimental development surfaces, not the current game. Each isolates a real part of the intended modernization so mechanics can be evaluated before they become production authority.

Energy is everything

One reserve connects survival, construction, combat recovery and later strategic operating cost.

Physics is gameplay

Mass, momentum, collision, obstruction, knockback, falling and spatial clearance matter tactically.

Time is a weapon

Raiders are finite-lived. Delay, trapping and inefficient routing can defeat them without raw damage.

Infrastructure is temporary

Towers age and degrade. Building purchases a period of control, not permanent accumulation.

Game manual

How Defend works.

This manual distinguishes the historical playable loop from mechanics still being developed for the improved version.

Objective and economy

Protect the central energy silo. The same reserve is your health, build budget and defended resource. Spending makes the fortress stronger but reduces the margin you are protecting. Projectile damage can return energy, while surviving raiders that reach the silo drain it.

A strong defense therefore balances immediate safety against future sustainability. The intended campaign eventually exposes the paradox that complete deterrence can remove the interaction that replenishes the system.

Historical controls and interaction
  • Orbit / inspect: drag the 3D scene; wheel or pinch controls camera distance through Babylon's ArcRotate camera.
  • Place a tower: interact directly with an available ground position. Placement occurs in-world rather than through a separate construction screen.
  • Upgrade a tower: tap/click an existing tower base. The next tier is constructed when reserve and placement rules permit.
  • Observe state: the HUD communicates energy and battle state while geometry, motion, material changes and procedural sound communicate threats.
  • Restart: after victory or defeat, restart the scenario from the game UI.

Touch and pointer interaction are part of the historical design; the modernization preserves direct world manipulation and adds explicit accessible alternatives where needed.

Towers

T1 — Barrier / Deflector

Low-cost spatial control. It does not need direct damage to matter: block lanes, create congestion, lengthen routes and buy time against finite-lived raiders.

T2 — Interceptor

Responsive granular projectile defense. Frequent packets suit lighter or mixed threats, target switching and active correction.

T3 — Siege / Impulse Cannon

Slower, higher-commitment fire with larger projectile packets and stronger impulse. Placement and timing matter because misses are costly and cadence is slower.

Higher tiers are not permanent upgrades. Towers age; stronger tiers degrade through lower tiers and eventually disappear. The improved version extends this with visible construction, maintenance, finite slew and geothermal dependencies.

Enemies / raiders

R1 — Scout / Swarm Raider

Small and comparatively cheap. Its size and flexibility make narrow routes useful and large-cadence weapons easier to waste.

R2 — Breaker

Medium pressure body. It occupies the middle of the physical and economic trade space rather than relying on a hidden damage-type rule.

R3 — Titan / Siege Boulder

Large, expensive and persistent. Greater inertia makes displacement harder, but a trapped or ejected Titan represents a much larger lost investment.

Raiders can be defeated by damage, delay, obstruction, redirection, finite-life expiry or physical ejection. They share the same physical world and should differ through continuous properties—size, mass, momentum, survivability and mobility—not arbitrary immunities.

Combat and physics
  • Projectiles carry both damage and impulse; moving an enemy can be as valuable as damaging it.
  • Friendly geometry changes line-of-fire and movement, so tower placement reshapes the battle.
  • Falling or being pushed off the viable arena is a valid defeat condition.
  • Enemy finite life means a wall can win simply by delaying contact long enough.
  • Modern experiments add deformable terrain, physical energy flow, local geothermal sources and bounded surface routing.
Mothership, raids and role inversion — improved version

The longer-term design turns the defended silo into a mothership. The player then uses the same energy economy from the other side: operating the ship, selecting sectors and investing energy into raiders that must extract more value than they cost. Existing defenses become the obstacles the player once built.

This inversion is not yet full production gameplay; current playgrounds expose finite mothership energy, raid navigation and energy/world-ecology components independently.

Modern playground controls

Every playground exposes its current scene controls in the Controls panel. Keyboard shortcuts are printed in the buttons themselves. Common interactions include drag to orbit, wheel/pinch to zoom, Space to pause where supported, R to reset/rebuild, C to change/reset camera, and scene-specific controls for energy, eruption, routing, migration or target selection.

The playgrounds are experiments, so their controls are evidence surfaces rather than the final game input scheme.

Tips & tactics

Win the physical problem, not only the damage race.

01

Spend only for the problem you have.

Energy spent on unnecessary upgrades weakens the reserve you are defending.

02

Use barriers to manufacture time.

A longer path or congested lane can let finite-life raiders expire without an expensive kill.

03

Fight near edges when impulse favors you.

Ejection can end a threat before its HP reaches zero. Heavy shots become positional tools.

04

Match cadence to composition.

T2's frequent packets reduce overkill on light targets; T3's larger impulses matter when inertia becomes the problem.

05

Leave yourself recovery paths.

The improved energy-flow model makes geometry relevant to whether released energy can return to the reserve.

06

Do not confuse quiet with safety.

The campaign's central trap is perfect deterrence: fewer attacks can eventually mean less recoverable energy.