Trail Brawl (prototype)

Local 2-player. First to 5 KOs wins. Click the canvas first so it has keyboard focus.

Player 1 (blue, left)

AD move   W jump   S aim down
Space dash (held WASD aims dash)
Shift kick

Player 2 (red, right)

move   jump   aim down
Enter dash
/ kick

Mechanics (own trails only)

Touch (endpoints meet)
        -> trails CONNECT, live 4s
           (refreshes on each new connection
           across the whole component)

Cross (mid x mid, after dash ends)
        -> ALL connected lines DETONATE
           along their geometry

Arrow (3+ trails clustered at ONE point)
        -> ball flies in V's tip direction
        -> two OLDEST in cluster define angle
        -> ball size scales w/ component count
        -> KICK during 1.8s windup -> instant
           fire in kick direction (faster)

Triangle (3 trails in REAL closed cycle,
          each using BOTH endpoints)
        -> physics object falls, kills below

Polygon (4+ trails in REAL closed cycle,
         each using BOTH endpoints)
        -> AOE inside polygon (1.0s windup)
        -> kill zone gets bigger as the
           polygon gets bigger (4, 5, 6...)
        -> KICK any side during windup ->
           that side flashes; AOE is
           cancelled; at end of windup a
           rectangle beam fires perpendicular
           OUTWARD from the kicked side,
           clipped to walls on all sides;
           shields cut the beam laterally
           (covered slice stops, uncovered
           slice slips past); only ONE side
           per polygon

Whip (H = |-|, crossbar's two endpoints
      T-strike two non-V-touching stems)
        -> twin lashes pivot at the
           contacts and sweep outward
           through opposite half-discs
        -> reach + thickness scale with
           consumed-trail count
        -> KICK a pivot during the
           animation -> that lash strikes
           a SECOND time, sweeping back

Spear (Bow = same as H but the two
       stems V-touch at one end)
        -> 1.2s windup, then a laser
           fires OUT THROUGH the bow tip
           edge-to-edge across the arena
           (~1.5s long-burn life)
        -> thickness scales with
           consumed-trail count
        -> SHIELDS reflect the laser; if
           a shield expires mid-fire the
           laser snaps back straight
        -> KICK during windup -> resets
           the windup AND arms a screen-
           splitting bidirectional fire

Tripwire (residue from cross-detonate)
        -> every T-stem in the explode
           set leaves a delayed tripwire
           after the explosion: ~2s, one
           kill on contact

All patterns fire only when a dash ends. Multiple spells can fire from one dash (e.g., arrow + cross detonate).

Triangle non-kickable. Arrow ball + Bow + Whip pivots + Polygon sides are all kickable during their windup/animation.

Dashes refresh on touching the ground. Wall-kick recoil exists but knockback is rough — to tune later.

Mobile / touch

Left half of canvas = follow-touch joystick (movement).
Right half: tap = jump, swipe = dash in swipe direction.
Bottom-right button = kick. Touch UI controls P1 only.

System

R reset match   P pause

Trail Brawl

Online 1v1 prototype (Milestone 2.1: position-only sync)

Hosting

Share this code with your friend:

----

Connecting to signaling…

Join Game

Enter your friend's 4-character code: