u/MaximumContent9674

Last Ship Sailing

Battle with your friends inside the arena. Maybe the arena is under the sea, or floating above your own home. In this game you can battle anywhere you want in the world! Player versus Player, you can get up to 5v5 over mesh networking. Load the game up in your browser, bring your GPU, and see if you are strong enough to be the Last Ship Sailing!
Play now! https://LSS.FractalReality.ca

u/MaximumContent9674 — 24 hours ago

A theory of consciousness cannot only explain parts. It must explain how parts become one experience. Neurons, sensations, memories, emotions, and thoughts are many. But experience appears as one coherent field. That unity is not a side effect of consciousness; it is what consciousness is: wholeness

reddit.com
u/MaximumContent9674 — 1 day ago

☉ I am one part and one whole. ☉ You are one part and one whole.

1 Part, 1 Whole: A Circumpunct Essay

The aether makes sense to me as the greater whole. It is the same energy some traditions call chi, prana, pneuma, ruach; the continuous medium that the discrete things of the world are local intensifications of. We are fractal wholes inside it. Our wholeness is a kind of aether within. Our mind is the whole of our body; not a thing inside the body, but the wholeness of the body as it perceives itself.

That intuition holds up under scrutiny. The aether keeps returning under different names because the underlying claim keeps being right: there is a continuous field, and "things" are not floating in nothing. The mind-body version is just the same shape in miniature. Not a bag of organs producing a ghost; a field of coherence in which "mind" names the wholeness, not a contents.

The circumpunct is the figure that holds this together: a point inside a circle. I have read it many times as focal awareness inside a field of being, the dot for attention and the circle for the larger self. That reading is still good. But today I saw it differently.

A Different Reading

I am 1 part and 1 whole. The dot is the part; the circle is the whole. The space between is the body, perhaps.

This changes what the figure does. Before, dot and circle were two aspects of one wholeness. Now they are two ontological facts about me at once. I am 1 part (singular, one-among-others, in direct contact with the larger Whole), and I am 1 whole (complete in myself, containing my own interior). The body is the territory where both truths actually have to coexist.

That move stops the body from being either a container (mind inside body) or a vessel (soul inside body). The body is the negotiation itself. It is what it looks like when "I am one part of something larger" and "I am a whole containing something smaller" are held in the same living thing. Without the body, the two facts would just be a paradox on paper. With the body, they become a person.

The edge of the circle gets a new job in this reading. It is no longer the soft horizon of a field; it is a real boundary, the place where my wholeness ends and another wholeness begins. Skin starts to mean something philosophical. Consent, contact, and integrity (in the literal sense, the integrity of the form) become concrete.

The dot also gets a new job. It is no longer just focal awareness; it is my point-of-contact with the larger whole. The thread by which I am a part of everything. And the body, the space between, is the medium where information moves between those two: from dot inward to circle (the part receiving from the larger Whole, then distributing across my interior) and from circle inward to dot (my whole self gathering itself back to a single point of expression). Breath does this. Attention does this. So does grief, and so does love.

One quiet thing about this geometry: the dot is not at the center by accident. Center is the only position equidistant from every point of the boundary, which means the part-of-the-larger-whole is also the most fairly related to all of my own interior. My singularity is my most democratic point.

The Interchangeable Middle

What I like most about this reading is that the body becomes interchangeable. The circumpunct continues as 1 part and 1 whole regardless of what fills the middle. The dot and the circle are the invariants; the space between is the variable. The pattern is portable.

A cell is a circumpunct with cytoplasm in the middle. A person is a circumpunct with a body in the middle. A conversation is a circumpunct with language in the middle. A community is a circumpunct with shared practice in the middle. A solar system is a circumpunct with field and space in the middle. Different fillings, same form. The pattern is what is real; the filling is what is local.

A few things follow:

Substrate independence. The pattern survives the swap of the medium. My body is not the same body it was seven years ago (the matter has cycled almost entirely), but the circumpunct held. The "me" that persisted was the relation between my point and my wholeness, not the particular atoms doing the holding.

Translation across forms. An idea moves from one mind to another. The body of the idea changes (felt, then worded, then sounded, then heard, then felt again), but if the part-whole signature survives the transit, the idea arrived. Translation is the circumpunct re-instantiating itself in a new medium without losing shape.

Ethics scales. Caring for a cell, a person, a relationship, a community, or an ecosystem is not a stretch by analogy. It is the same care applied to the same form. The respect owed to a "1 part that is also 1 whole" does not change when the medium changes.

One test still has to be passed: not every space-between is doing body-work. The medium has to be able to hold both the singularity of the point and the wholeness of the circle simultaneously, without collapsing either. Too loose and the dot dissolves; too rigid and the circle cannot breathe. The test of whether a given medium is alive (in this framework's sense) is whether the part stays singular and the whole stays whole while they are in relation through it.

A small note on language. Chi often gets translated as "energy," and that is not wrong, but the older sense is closer to coherence, breath, flow; the relational quality that makes a whole behave as one rather than as a pile. Energy (in the physics sense) is one measurable expression of that, but the wholeness itself might be better named as pattern, field, relation. Otherwise the word flattens.

The Truth Protocol

If the circumpunct is structurally a part-whole relation in direct contact with the larger Whole, then ethics has a natural foundation. To lie is to purposely distort Truth, Reality, God. The highest sin is lying, because every other harm depends on or is compounded by distorted perception. Manipulation requires misperception. Coercion is easier in the dark. Lying is the meta-sin that hides every other sin from the person it is done to.

This is also structural in the circumpunct. Each person is 1 part of Reality and 1 whole in themselves; the dot is in direct contact with the larger Whole. To lie to someone is to insert a distortion into the very channel by which their part-self touches the larger whole-self. It is to corrupt the connection between their dot and their circle from the outside. Other sins damage; lying severs the perceptual ground that lets a person notice damage at all.

The Circumpunct Truth Protocol says you never need to lie if you learn to tell the appropriate level of truth. You do not blast full truth on those not ready for it, but you do not have to lie. Partial truth and lie are not on the same axis. Partial truth is a true sentence at a true depth; a lie is a false sentence. Once you see this, Plato's Noble Lie loses its alibi. It was trading on a false equivalence ("sometimes we have to lie for their own good"). Burn it. You almost never have to lie; you have to learn to find the true thing you can say.

The protocol is harder to misuse than it sounds, because the skill is not solo. Appropriate-level truth is relational; you cannot know the right level without attending to where the other person actually is. The moment you decide for someone what they can handle without checking, you have slipped back into the Noble Lie posture at smaller scale. The test is whether you are reading them or assuming them.

Withholding is not lying, but only if you do not let a false picture stand. Silence is fine; "I am not going to tell you that" is fine; "this is what I can say right now" is fine. The line is crossed when you let someone walk away believing a thing that is not so, and you knew it. So the protocol carries both halves: do not state falsehoods, and help each other articulate the Truth.

The standard objection (Nazi at the door, the protective lie) usually depends on a failure of imagination about available true responses. "I will not answer that." "Leave." Silence. Refusal by form rather than by content. A skilled practitioner of appropriate-level truth has a much larger space of non-lying responses than a beginner does. The objection collapses when the skill is real.

The protocol also applies inward. To lie to myself is the same severance, just internal: a distortion between my own dot and my own circle. The Noble Lie I tell myself is the cognitive virus my other work already names. The protocol works at both addresses: do not lie outward, do not lie inward.

Honesty and kindness stop competing once the craft is real. People reach for lies when they think the choice is "tell the brutal truth or tell a soft lie." The Circumpunct move is to deny the binary. The third option (the true thing at the right depth) is almost always available; it just takes more skill than either of the easy two.

If Truth = Reality = God, then the protocol is also a theology of respect. Everyone is connected directly to Reality. I do not stand between a person and their God. I stand beside them and help them see more of what is already there.

How It Coheres

The aether is the greater whole. I am 1 part of it and 1 whole in myself. My body is the medium where those two truths live together. The circumpunct is the shape of that arrangement, and it recurs at every scale, with different mediums filling the space between. Truth is what holds the structure intact; lying is what distorts the connection between any part and its whole. To respect each other is to respect each other's circumpuncts: dot to circle, part to whole, person to Reality.

Same pattern, all the way down, and all the way up.

reddit.com
u/MaximumContent9674 — 3 days ago
▲ 4 r/webgpu

Gaming Browser/Launcher

Is there anyone out there building a html gaming only browser (or more of a launcher)? I haven't found anyone focused on specifically that, and I am starting to plan one. Anyone interested in jumping in on this? WebGPU is the next big thing, btw!

reddit.com
u/MaximumContent9674 — 6 days ago

Break time!

I have so many ideas, and I've been implementing so many of them. This project has only been a month and it has come so far! But today, even though I am flowing with ideas, my body is saying no. I think I'll enjoy playing the game as it is, for now, and maybe go touch some grass :) I hope to see you in the tunnels, to see who is the Last Ship Sailing!
Play here: LSS.FractalReality.ca

reddit.com
u/MaximumContent9674 — 7 days ago

Last Ship Sailing - Version 16d, big animation drop!

Last Ship Sailing v16d ; Feature Overview

Zero-gravity ship combat in a single self-contained HTML file. Three.js for rendering, Web Audio for spatial sound, peer-to-peer mesh networking for multiplayer, WebXR for VR. Drop the file on any modern browser and you have a playable game; no install, no build step, no server.

This document covers every feature shipped through version 16d (the current build).

Core concept

The game frames every match around a single fragile constraint: the last ship sailing wins the round. Two teams (Fleet A and Fleet B) spawn inside a sealed three-dimensional arena, fight to attrition, and the team with at least one ship still flying at the round-end clock takes the round. Rounds compound into matches.

The framing is deliberately physical: each player IS their ship. There is no avatar, no character, no "out-of-cockpit" view. In VR the abstraction is taken further; the cockpit frame is removed entirely and you experience the field as if your body is the hull.

Ships

Seven distinct ship loadouts, each on one of three chassis archetypes (Frigate, Corvette, Dreadnought) and each with three abilities plus a powerful core (the ultimate).

VORTEX (Corvette Beam). Purple beam class. Weapon: Energy Blaster. Abilities: Laser (single-shot massive beam), Vortex Shield (hold to absorb and return projectiles), Plasma Mines (proximity-detonating field). Core: Mega Laser (sustained 4-second high-power beam).

PYRO (Dreadnought Igniter). Heavy fire class. Weapon: Thermite Launcher. Abilities: Flame Chain (fire wall laid forward, 6-second duration), Fire Shield (hold to block and burn close enemies), Explosive Gas (area-denial cloud, ignitable). Core: Mega Flame Chain (massive AoE incendiary).

PUNCTURE (Frigate Sniper). Long-range yellow class. Weapon: Sodium Railgun (hold-to-charge mechanic: 2.5-second full-charge curve, quick-tap reset, decay-on-release). Abilities: Cluster Missile (impact + sustained zone damage), Afterburner (speed boost), Stasis Trap (slow and root). Core: Mega Barrage (speed boost + sustained rocket barrage).

SLAYER (Frigate Duelist). Close-range green class. Weapon: Shotgun. Abilities: Stun Bolt (piercing arc projectile with slow-on-hit), Absorption (blocks 70% incoming, 85% during core), Teleport (phase dash with sweep stun). Core: Mega Stun Bolt (sustained 5-second melee aura at 1800 DPS within 500 units, visualized by a green-lightning storm that follows the caster, plus a flurry of Stun Bolt projectiles firing automatically; the lightning bolts radiate within the same 500-unit reach as the damage, so the visible storm is the damage zone).

TRACKER (Corvette Spotter). Lock-on orange class. Weapon: Tracking Bolt (each hit adds +1 lock to its target, capped at 3). Abilities: Tracker Rockets (5-rocket volley fired at every 3/3-locked ship; partial locks preserved), Plasma Shield (one-way deployable shield, 10,000 HP, 10 seconds), Sonar Pulse (fire beacon, sphere of detection grants +1 lock per ship in radius). Core: Mega Tracker Rockets (remote-guided missile volley; all missiles steer toward crosshair aim in real time).

BLASTER (Dreadnought Gunner). Suppressive cyan class. Weapon: Gatling Cannon (1.2-second spinup, close-range default mode, switchable to long-range). Abilities: Charge Shot (3200-damage burst), Body Shield (frontal 5,000-HP shield), Range Mode (close/long swap, alters spread and damage falloff). Core: AI Assist (auto-aim + unlimited ammo for 10 seconds, raycasts line-of-sight per target).

SYPHON (Corvette Drainer). Support/sustain blue class. Weapon: Zapper (rapid hitscan). Abilities: Rocket Salvo (5-rocket spread, 10 with Missile Racks upgrade), Energy Syphon (drain enemy shields, heal self up to 800), Inner Spark (reset all ability cooldowns). Core: AI Nanobots (3-tier permanent upgrade selection: Arc Rounds, Missile Racks, Cooldown Reduction).

Chassis archetypes

Frigate. 7,500 HP, 2,500 shield, top speed 800 u/s, 3 dashes. Fast, fragile, dance-around playstyle. (PUNCTURE, SLAYER)

Corvette. 10,000 HP, 3,500 shield, top speed 600 u/s, 2 dashes. Balanced. (VORTEX, TRACKER, SYPHON)

Dreadnought. 12,500 HP, 5,000 shield, top speed 420 u/s, 1 dash. Slow, tanky, commits to positioning. (PYRO, BLASTER)

Pilot perks (one per pilot, chosen at ship-select)

Outline Optics. Crisp silhouette outline on every ship in line of sight; green allies, red enemies. Sees through gas clouds; blocked by walls.

Reinforced Shield. +1,000 max shield HP. Tanks more burst damage before the hull is exposed.

Extra Dash. +1 dash charge. More evasive maneuvers and ram pressure.

Auto Cloak. When the core meter charges past 75%, the ship goes 99% transparent for 4 seconds. Use the window to reposition. Networked: peers see the caster's ship fade to near-invisible during the window.

Nano Repair. 1% of max HP regenerated per second; over-heals past max up to 2x hull capacity (turns the ship into a self-repairing brick).

Combat mechanics

Health, shield, and hull layering. Damage hits shields first (regenerates after a delay), then hull (does not regenerate without Nano Repair). A "doomed" state triggers when HP crosses a critical threshold, with a screen-wide pulsing warning and audio cue.

Dash. Pilots have chassis-specific dash charges that recover on a per-charge cooldown. Dash boosters render as colored engine plumes; the burst is broadcast so peers see when an enemy is committing to a direction.

Ram damage. Ship-ship collisions deal damage proportional to impact velocity; the heavier ship takes less, and friendly-fire ram is shove-only with zero damage.

Stasis. Slows and roots affected ships. Sources: SLAYER Teleport sweep, PUNCTURE Stasis Trap, large stasis-field events. Stasis is visualized by a pulsing blue ring on affected ships and a warning bar on the player HUD.

Execution. Low-HP enemies can be rammed for an instant kill at close range, signaled by an on-screen prompt.

Hit-claim consensus. Multiplayer damage is verified peer-to-peer: the shooter broadcasts a hit claim; nearby peers vote on whether the projectile geometry actually intersected the target. Damage applies only on consensus.

Cores (ultimate abilities)

Each ship's core has unique behavior and visual signature:

VORTEX ; Mega Laser. 4-second sustained heavy beam; three layered renderings (volumetric cylinder shader, converging muzzle tracers, electric arcs cracking off the beam) stack into a single thick laser.

PYRO ; Mega Flame Chain. Instant massive AoE incendiary blast, ignites any deployed Explosive Gas in radius.

PUNCTURE ; Mega Barrage. Speed boost plus a periodic rocket barrage for 5 seconds.

SLAYER ; Mega Stun Bolt. 5-second activation: lightning storm visualizes a 1800 DPS melee aura that follows the caster, with bolts radiating to the same 500-unit reach as the damage; Stun Bolt projectiles fire automatically twice per second; all networked so peers see the storm, see the bolts, and can dodge.

TRACKER ; Mega Tracker Rockets. Remote-guided missile barrage; the player steers the swarm in real time off the camera quaternion. Quarter-speed missiles let the player actually fly the swarm rather than watch it pass through the room.

BLASTER ; AI Assist. Auto-aim plus unlimited ammo for 10 seconds. Targets the nearest visible enemy (line-of-sight raycast); fires at 20 shots/second.

SYPHON ; AI Nanobots. Tiered permanent upgrade selection: Arc Rounds (+50% damage vs shielded targets), Missile Racks (doubles Rocket Salvo count), or Cooldown Reduction (30%). Tiers unlock by core charges; the upgrades carry into subsequent rounds.

Cockpit frame system (new in v16d)

Each ship has its own painted cockpit border PNG that frames the gameplay viewport on flat-screen play. The system is now layered:

Base frame. The static painted border for each ship. Lives at ./frames/<TitleCase>/<KEY>.png.

Recoil flipbook. Up to five numbered frames per ship (<KEY>1.png through <KEY>5.png). The animator runs two drivers concurrently: a SHOT driver bumps the playhead forward one frame on each weapon fire (wraps at end), and a TIME driver advances one frame per 50 ms between shots. The combined effect: slow-firing weapons (Sodium Railgun) play the full kick-and-return cycle per shot; high-rate weapons (Gatling Cannon at 20 Hz, Zapper at 11 Hz) cycle visibly through the frames at the firing rhythm. Missing numbered frames are skipped automatically.

Named ability frames. Per-ship suffix frames keyed to specific abilities, registered in _SHIP_NAMED_FRAMES. VORTEX has VORTEX-L.png and VORTEX-L2.png: L shows whenever the Laser ability fires, and during the Mega Laser core L and L2 alternate at 10 Hz for a sustained pulse. PUNCTURE has PUNCTURE-C.png and PUNCTURE-C2.png for the Sodium Railgun charge, with alternation speed that scales with charge level (2 Hz at 0% charge, 20 Hz at 100% charge; visible urgency that builds as the shot becomes ready).

Image pinning. All loaded frame Image objects are stored in the cache entry. The browser cannot evict their decoded bitmaps, which eliminates the "transparent flash every Nth shot" symptom from texture re-decode.

Muzzle alpha-scan. On load, the base PNG is scanned to detect where the painted barrel tips are; the gameplay muzzle origin then matches the painted art exactly, even if the artist drew the barrels at an odd angle.

VR. The entire cockpit frame is suppressed; the player sees the world unobstructed with only the floating HUD.

Visual effects

Lightning system. Pooled (64 slots in v16d) with bespoke shader rendering: each bolt is a halo tube plus a core tube with subdivision-based jitter, branching, and AdditiveBlending. Color, lifetime, thickness, and branch count are all per-call. A separate 256-slot "dark lightning" pool renders black bolts for SLAYER's Absorption aura.

Plasma shields. Vortex Shield (purple), Body Shield (cyan), Fire Shield (red), Plasma Shield (one-way deployed wall), Absorption (green). Each renders as a hex-grid hologram with shader-based flicker plus a hull-hugging plasma layer. Networked: peers see the shielded ship's aura matching the shield type.

Explosions. Pooled mesh-based fireballs with multi-layer color falloff. Used for hit confirmations, projectile impacts, and core detonations.

Particle systems. Tracers, dot particles, hull bursts, shield hits, damage smoke (heat trail from low-HP ships), electric smoke, fireworks bursts (Cluster Missile zones), supershape bursts (cosmic events), heat trails on fast-moving projectiles.

Layered FX presets. A consolidated shader system (_makeLayeredFXMaterial, _makeFXMaterial, EFFECT_PRESETS) replaces what used to be a dozen bespoke shader factories. New effects can plug into existing presets (fireball, plasma wall, plasma purple, core beam, etc.) instead of writing fresh GLSL.

Persistent world effects. Firewalls (PYRO Flame Chain), trip wires (VORTEX Plasma Mines), tethers (PUNCTURE Stasis Trap), incendiary gas, particle walls, cluster zones, slayer-core damage-FX. Each is networked via effect_spawn or top-level event types so all peers see the same zones at the same positions.

Cosmic anomalies. Procedural large-scale entities (atom-fractal rocks, cosmic anomaly bodies, champion fields, stasis fields) rendered with their own shaders and integrated into the lighting / collision pipeline.

Wall patterns. Maps render walls via fractal SDF shaders (Mandelbox, soul array, custom patterns). Each map carries its own pattern data, and the wall_lab / wall_pattern_lab labs let you tune them visually.

Audio

Spatial 3D positional audio. Every weapon fire, explosion, ability activation, and persistent zone has a 3D position. Listener is the camera; reverb and stereo panning are positional.

Per-weapon sound profiles. Each weapon has its own signature: Sodium Railgun has a charge-up build that pitches up over the 2.5-second window; Gatling Cannon has a sustained chuggle; Zapper crackles; Thermite Launcher has thunk-plus-burn.

Sustained loops. Continuous fire effects (firewall burn, gas cloud crackle, Mega Laser hum, charge-up tones) loop seamlessly with positional tick-throttling so they don't stutter on retrigger.

Dynamic music engine. Adapts to combat state. Round transitions, killstreaks, doomed state, and stasis effects all modulate the music intensity. Ducking on big events (Mega Tracker Rockets, Mega Flame Chain).

Recipe-based audio. Each sound is defined by a JSON recipe (LSS_SOUND.json) that describes oscillator stacks, filters, envelopes, noise sources. The sound_lab.html is a live tool for tweaking the recipes; changes apply to the game without re-touching code.

HUD and UI

Circumpunct HUD. Centered crosshair (the "point"). Concentric rings around it for health, shield, ammo, and core meter. A small ability pie at the corner shows each ability's cooldown state. The visual is itself a literal circumpunct (the framework symbol the project is built around).

Kill feed. Top-right rolling list of recent kills; each entry shows killer chassis, weapon, and victim with chassis color.

Scoreboard (Tab to hold). Two-column team breakdown with kills, damage dealt, ship class, and Discord avatar/name for each player.

Damage direction indicators. Four screen-edge bands pulse red on incoming hits in the direction of the source. Also a glitched-text callout overlay near the ship taking damage.

Cinematic overlays. Damage vignette flash, killstreak text, countdown ring (round start), respawn fade, medal display, "ABILITY ACTIVE" labels, ability-color flashes, banner for round-end. All CSS-driven so they don't fight Three.js for render time.

Shield-active fullscreen tints. Vortex Shield, Body Shield, Fire Shield, Absorption each have their own screen-edge wash overlay so first-person feedback reads instantly.

Lock-on warning. When TRACKER's lock fills on you, a pulsing red ring appears around the screen; partial locks show partial fill.

Execution prompt. "RAM TO EXECUTE" floats on low-HP enemies within ram range.

Stasis warning bar. When you're caught in stasis, a blue progress bar shows how much of the slow remains.

Multiplayer

P2P mesh networking. Trystero-based WebRTC mesh; no central game server. The lobby uses lss.fractalreality.ca/rooms.html (a Cloudflare Worker) as a lightweight signaling and room-discovery layer.

Lobby system. Room codes auto-fill from URL query (?room=ABCD). Pre-game lobby shows all connected peers with their Discord avatars, ready state, chassis selection, and team. "All ready" launches the match with a synchronized countdown.

Synchronized round timing. All peers anchor round transitions to a UTC wall-clock timestamp; round-end resolution flows from the stasis field "owner" (the longest-running peer) so peers don't disagree on who won when the timer expires.

Loadout sync. Peer ship selection is broadcast on change; everyone sees who's flying what before launch.

Network projectile rendering. Other players' projectiles render with the same visual flags as locally fired ones (color, isArcWave, isFireSource, isCluster, sizeMult, splash, tracking, salvoGuided). The shooter's client is authoritative for damage; the broadcast carries damage=0 to receivers.

State broadcast. Each peer continuously broadcasts position, rotation, health, shield, cloak state, kills, damage dealt, doomed flag. Receivers smoothly interpolate the remote ship mesh.

Discord integration. OAuth login surfaces Discord username and avatar in the lobby; the game runs as a Discord Activity inside Discord clients (the activity SDK is wired up alongside the standalone browser flow).

Bandwidth tracking. Live byte counter on outbound and inbound network traffic, visible in the developer overlay.

Maps

Built-in maps. Hourglass, Spine, Tower, Cross, Octahedron, Pentagon, Gyre, Pyramid, Cube Center, Arc, Infinity, Middle Bars. Each is a JSON description of rooms and tunnels with optional champion-flagged finish-line rooms.

Real-world maps. Type any Google Maps location into the location picker; the map builds an arena over the actual geography. The wall pattern, sky, and lighting stay procedural, so the location is a layout template rather than a 1:1 reconstruction.

Custom maps. Drop a JSON file into the custom-map slot to play user-built arenas. Same schema as built-in maps.

Map-walk lab. A separate HTML tool for walking through a candidate map on foot before committing it to the rotation; useful for layout iteration.

Game modes

Standard arena. Last team alive at round-end wins. Bots fill remaining slots if the player count is low.

Champion mode. Activates at the 10-second mark of each round. A champion-flagged room becomes a contested control point; rotating tri-axis stasis fields close in on the rest of the arena; whoever holds the champion room when stasis catches everyone else wins the round.

Race mode. Champion-flagged rooms become finish-line objectives. The first team to reach the flag wins the round through the existing championResult pipeline.

Bot fill. AI opponents flying every loadout with situational behavior (cover-hugging, ability use, AI Assist auto-aim with line-of-sight checks). Bots scale to fill remaining slots up to a configurable per-team cap.

Quality and accessibility

Quality tiers. Potato, Low, Medium, High, Ultra. Each tier disables progressively more shaders, particle counts, wall complexity, and dynamic-light density. Potato is genuinely playable on low-end hardware (walls collapse to flat MeshBasicMaterial; no shader effects).

Custom keybinds. Every input is rebindable via settings; the bindings persist to localStorage. Tab is the default scoreboard hold.

Pointer-lock and gamepad. Mouse + keyboard with pointer-lock for free look. Gamepad supported with stick aim and shoulder buttons for abilities and core.

Screen wake lock. Browsers that support Wake Lock are pinned awake during active play (no sleep / no efficiency throttling).

VR / WebXR

Native WebXR session. Standalone Quest, Pico, and PC-tethered headsets supported through the browser's WebXR API. Headset controllers map to weapon-aim and ability triggers.

No cockpit frame. In VR the painted border is suppressed; the player perceives the world directly with only the HUD floating in front.

Performance tiers. Separate VR perf tier detection (getVRPerfTier) lowers particle counts and shader passes for standalone headsets to maintain 90 FPS.

Developer tools

sound_lab.html. Live sound recipe editor. Tweak oscillators, filters, envelopes, noise; hear changes instantly; export back to LSS_SOUND.json.

wall_pattern_lab.html / wall_lab_v2.html. Fractal SDF shader playground for designing map wall patterns. Mandelbox, custom escape-time functions, parameter sliders.

map_lab.html. Map authoring tool for designing arena rooms and tunnels in a 3D editor view.

fx_lab.html. Particle and explosion FX preview.

reaction_diffusion_lab.html / mixed_lab.html. Generative pattern research labs used to develop the wall shaders.

map_walk_lab.html. First-person walk-through of a candidate map without combat.

Licensing and ethics

Code: proprietary. All Rights Reserved to FractalReality.ca. See LICENSE in the repo root for the full terms. No fork, mirror, modification, reverse-engineering, or AI/ML training use is permitted without prior written consent.

Assets: proprietary. All Rights Reserved to FractalReality.ca. See LICENSE-ASSETS. Datamining and asset-ripping are explicitly prohibited.

Community use carve-out. Anyone may run the game for personal non-commercial play; create User-Created Content using the in-game tools (clips, screenshots, custom maps, fan art); and share that content in the official Fractal Reality Discord, on Owner-designated community channels, and on personal non-commercial channels with credit to FractalReality.ca. Creators retain ownership of their original expression.

Trademarks and merchandising reserved. All ship names, logos, characters, and overall look and feel are trademarks of FractalReality.ca. Merch rights are reserved exclusively to the owner.

Five-pillar ethics policy. The game ships under a published ethics policy based on the Circumpunct Framework: GOOD (no dark patterns, no FOMO timers, no slot-machine variable-reward schedules), RIGHT (fair purchase flows, minimal data collection, real responses to bug reports), FAITHFUL (offline stays offline, no ship-and-abandon, account state belongs to the player), TRUE (honest marketing, disclosed AI use in development, public post-mortems on breakage), and AGREEMENT (the four above, met by both sides).

What changed in v16d specifically

Cockpit frame recoil flipbook. Per-ship subdirectory layout (./frames/<TitleCase>/<KEY>N.png) with up to five numbered recoil frames. Dual-driver animator (shot bumps + time advances) means both slow and rapid-fire weapons read correctly.

Named ability frames. New _SHIP_NAMED_FRAMES registry plus _getActiveAbilityFrameKey state lookup. VORTEX has L / L2 (Laser ability and Mega Laser core, with 10 Hz alternation during the core). PUNCTURE has C / C2 (Sodium Railgun charging, with charge-rate-scaling alternation that builds from 2 Hz at 0% to 20 Hz at 100%).

Image pinning. All loaded cockpit frame Image objects are stored in the cache entry. The browser keeps the decoded bitmaps in memory across the session, eliminating the "transparent flash every Nth shot" symptom from texture eviction.

Title and manifest. Page title and PWA manifest both updated to v16d.

Forked clean from v16c. All v16c features (the performance pass, the renamed loadouts, the SLAYER core lightning storm, the proprietary licensing) are preserved.

Next planned work: PUNCTURE core revisit and continued cockpit frame iterations per-ship.

Contact: ashroney@gmail.com Site: https://fractalreality.ca

reddit.com
u/MaximumContent9674 — 8 days ago

Last Ship Sailing; v16

Last Ship Sailing: Feature Writeup

A single-file WebGL multiplayer space combat game .html built on Three.js r128, WebAudio, and Trystero peer-to-peer networking. Two fleets of three ships fight inside procedural SDF-based 3D arenas under cosmic-field-shaded walls, with a champion stasis objective that can decide rounds.

This document covers every system the player can see or feel.

Match Structure

A match is a best-of-seven contest. Each round runs on a clock (default 80 seconds) preceded by a 5 second warmup. Teams are FLEET A and FLEET B; first to four round wins (ROUNDS_TO_WIN = 4) takes the match. The score banner sits at the top of the screen with a Courier-styled timer between the two fleet labels.

The round timer scales the music tempo and pitches the announcer's pace. When the round timer drops to 10 seconds remaining,, a giant purple stasis field spawns at the map center; the first team to hold a ship inside it for three seconds wins the round outright, regardless of HP. If the round timer runs out with no champion declared, total team HP breaks the tie.

A 3-2-1-LAUNCH countdown plays at the start of each round; bots stay in warmup state (no firing, no movement) for the full visible countdown so the player isn't blindsided on spawn.

Game Modes - NEW MODE (RACING MODE!!!)

Classic is the default: 80 seconds, kill the enemy fleet or claim the champion field at 10s remaining. Race is the alternate mode where every chassis gets clamped to a boosted baseline speed, the champion field spawns immediately at round start as the finish line, and the bot AI gains a graph-BFS steering layer that walks rooms and tunnels toward the finish. Combat stays on; you can win Race by killing everyone OR by being first to cross the finish.

Chassis

Three hull classes, each tuning the speed/health/dash trade.

Frigate: 7,500 HP, 2,500 shield, fastest base flight (450 units/sec), three dashes at 900 units/sec, agile turn rates, narrow hull. Used by Puncture and Slayer loadouts.

Corvette: 10,000 HP, 3,500 shield, mid speed (350 units/sec), two dashes at 750 units/sec, balanced everything. Used by Vortex, Tracker, and Syphon.

Dreadnought: 12,500 HP, 5,000 shield, slowest (250 units/sec), one heavy dash at 550 units/sec, sluggish turning, large hull. Used by Pyro and Blaster.

Loadouts (Seven Ships)

Each loadout pairs a chassis with a primary weapon, three abilities (offensive, defensive, utility), and a class core (60s cooldown, dramatic burst).

VORTEX (Corvette MkII, purple): Splitter Rifle hitscan; Laser Shot beam (2400 dmg); Vortex Shield (hold-to-absorb-and-return); Trip Wire proximity mines. Laser Core sustains a 4 second high-power laser for 12,000 damage.

PYRO (Dreadnought Incinerator, red): T-203 Thermite projectile with splash; Firewall fire line (400 DPS, 6s); Thermal Shield (5s hold, blocks attacks AND burns close enemies, 10s regen); Incendiary Trap area denial. Flame Core dumps a massive AoE incinerator for 9,000 damage.

PUNCTURE (Frigate Starcaster, yellow): Plasma Railgun hitscan piercing multiple targets; Cluster Missile (800 impact + 500 DPS for 5s); Afterburner speed boost; Tether Trap slow-and-root. Barrage Core gives speed plus a rocket barrage (7,000 dmg).

SLAYER (Frigate Blade, green): Leadwall buckshot (8 pellets, short range); Arc Wave electric projectile (2000 dmg, stuns enemy ships 1.5s); Sword Block (blocks 70% incoming, 85% with Sword Core, can't shoot while up); Phase Dash teleport. Sword Core empowers melee plus arc waves for 9,000 damage over 5 seconds.

TRACKER (Corvette Tracker, orange): 40mm Tracker projectile (sniper-spotter pace, each hit adds a lock 1/3 -> 3/3); Tracker Rockets (no cooldown, fires a 5-rocket volley at every fully-locked ship); Particle Wall one-way 10,000 HP shield; Sonar Lock beacon adds +1 lock per ship in sphere. Salvo Core unleashes a massive missile barrage (11,000 dmg).

BLASTER (Dreadnought Siege, cyan): Predator Cannon spin-up hitscan (1.2s spinup); Power Shot pierces multiple targets (3200 dmg); Gun Shield frontal 5000 HP wall; Mode Switch between close and long range. Smart Core grants auto-aim and unlimited ammo for 10 seconds.

SYPHON (Corvette Sovereign, blue): XO-16 Chaingun hitscan; Rocket Salvo (5 rockets, 10 with Missile Racks upgrade); Energy Siphon drains shields and heals 800; Rearm resets ability cooldowns. Upgrade Core is unique: it grants three tiers of permanent upgrades over a 12 second window.

Pilot Perks

In v16, every pilot picks one perk from a roster of five, persisted to localStorage across sessions. Perks are independent of chassis and stack with the loadout.

Outline Optics: renders a crisp silhouette outline on every ship in your line of sight (green allies, red enemies). Uses the classic inverted-hull trick (backface-only mesh clone scaled slightly larger), with additive blending and distance-based scaling so the outline stays visible through clouds at any range. Walls block it (the depth buffer occludes); clouds don't write depth so the outline punches through gas.

Reinforced Shield: +1000 max shield HP (default perk). Tanks more burst before hull is exposed.

Extra Dash: +1 dash charge. Dash recharge respects the perk-bumped maximum, so the extra slot actually refills on cooldown.

Auto Cloak: every 30 seconds your ship goes 98% transparent for 3 seconds. On activation the HUD fires an ability flash banner ("Auto Cloak ACTIVE", purple) and the ship-AI announcer speaks "Auto cloak active.".

Nano Repair: 1% of max HP regenerated per second, OVER-HEALS past max up to 2x hull. Over a 3-minute round this can fully restore plus stack a bonus half-bar of survivability if you stay alive.

Dash and Dash-Ram

Every chassis has chargeable dashes (1-3 depending on hull). A dash is short (0.4-0.6s), fast (550-900 units/sec), and refills on a cooldown timer. Dashing while colliding with another ship triggers the v16 dash-ram: the dasher acts as the aggressor and the target gets an 85% share of an impulse multiplied by 3.2; the dasher keeps moving with only a 15% deflection. Damage on the target is multiplied by 2.4 if they're on the enemy team (friendly fire shoves but does no damage).

Dash-ramming the claimer of a champion stasis field breaks the claim: the field releases, the shoved team's accrued progress is PRESERVED (so they can resume on re-entry), and the dasher's team starts their own progress from zero. Repeated dash-rams ping-pong the claim back and forth with a 0.6s grace lockout on the just-shoved ship to prevent same-frame re-claims.

Stasis Fields

Two flavors. Regular pickup fields (cyan, 120 unit radius) spawn every 30 seconds up to three at a time; flying into one fully recharges your shield AND immobilizes the ship for 3 seconds in an iconic stasis state (vignette overlay, HUD warning, velocity zero, charge bar fill).

Champion fields (purple, 260 unit radius) are the round objective. They use a stasis-charge model: the first ship inside is LOCKED with velocity zero and the claiming team's progress ticks up. Reaching CHAMPION_CHARGE_TIME (2s) wins the round for that team, with a 5-second grace before the round-end logic resolves so the player sees the moment. Death frees the field for another attempt; dash-ram displaces the claimer and transfers the claim.

Map System

The world is an SDF (signed distance field) built from spheres (rooms) and cylinders (tunnels) blended with a smooth-min (k=45). This produces seamless room/tunnel junctions without CSG. The level dispatcher generates classic procedural arenas, lobby-selected static rooms, race courses, and v12 Google Maps overlays (real city geometry, baked tile leaf meshes, with raycasting against the photoreal mesh for line-of-sight and projectile hits).

Per-room volumetric fog modulates density by what room the player is in: team spawn rooms stay clear (sightlines), central rooms get hazy, tunnels land between. Lerp keeps transitions smooth across boundaries.

Wall Patterns

Walls render through a layered cosmic-field shader stack supporting 21 presets, cycleable in-game with P or via the gamepad button bound to "cycle wall pattern". Patterns include Kali IFS, Apollonian Gasket, Voronoi Cells, Wave Interference, Mandelbox Folds, Hex Lattice, Plasma FBM, Circumpunct Lattice, Soul Array dot lattice, Circuit Traces, Holographic Glitch, Cellular Membrane, Warped Streaks, Caustic Shimmer, Hex Pulse Radar, Cyber Datamosh, Neon Cube (raymarched), Panel Maze (architectural), Ring Tunnel, Layered Cube (transparent), and a special multi-layer composite slot that combines Panel Maze + Layered Cube + Wave Interference.

The wall pattern composite uses BG/FG1/FG2 layered passes; uTime is driven globally each frame.

Cloud System

The BillboardCloudSystem (BCS) is an InstancedMesh slot pool of 4096 sprite slots feeding the GasCloud class. Each cloud has per-sprite slots with offset, scale, alpha, wake offset, drift phases, and drift amplitudes. Clouds: inherit color from the rocks they spawn near (HSL desaturated/lightened), form soft lattices through a Lennard-Jones-like potential (attraction at distance, repulsion close-in, tangential damping for orderly settling), open up around the FORWARD part of any ship moving through them (sign-flipped tube push so sprites behind the ship pull inward, sprites ahead push outward, regardless of ship facing), respond to walls with friction and gravity (no harsh bouncing), and persist across rounds via a dispose loop in spawnDynamicObjects + applyWorldObjectsManifest.

Lightning arcs are emitted only by clouds, not rocks (rocks don't make lightning).

Visual Systems

Plasma materials use a shared FXMaterial preset library: plasma_purple, plasma_red, plasma_green, plasma_cyan, plasma_wall, and an atom_fractal cluster preset for rock formations. The hull-hug shield system (v14f) mirrors a ship's mesh tree scaled 1.07x with these presets, parented under player.mesh, with a localized hit ripple and per-weapon-color tinting.

Particle systems handle muzzle flashes, sparks, hull explosions (localized to hit point in v14f), pyro flame cone matching damage geometry, slayer buckshot (4x brighter, 4x particle count), and persistent debris/decal effects.

The cockpit-anchored CircumpunctHUD draws concentric rings: health, shield, core meter, abilities, ammo, speed; all mapped into ring arcs, tick marks, and bracket geometry. The HUD shake-counters camera shake by 35% so it reads as sprung cockpit, not pasted-to-screen.

Ship name labels are HUD callouts (v16): a small target bracket at the ship's screen position, an SVG-drawn diagonal-then-horizontal line, and a chassis name overlay that flips left for ships on the right half of the screen. Blue for allies, red for enemies. The reveal animation digitizes characters in over 0.45 seconds the first time a ship enters view; tagged with continuous jitter and infrequent CRT-glitch slice shifts.

Layered FX shockwave-ring presets handle stasis pickup, vortex core beam, atom-fractal cluster rocks, cluster distortion shells, engine plume cones, engine glow discs, gas clouds, tether trap halos, and more. Each was tranche-ported from the original SDK.

Audio

Procedural music engine (v15m upgrades) drives a four-voice synth stack: drum kit (kick body + click transient, snare body + noise, sweeping crash, pitched hat), fat bass with sub-osc and tanh saturation, four-oscillator pad with LFO filter modulation, lead with octave-layered detune and delayed vibrato. A WaveShaper soft-clip master limiter replaces the old DynamicsCompressor.

Chord variety supports maj7, maj9, min7, sus2, sus4, dim7, add9. Patterns have transition fills firing on bar boundaries. Special-moment cues exist for champion-field appearance (low rumble + ascending pad swell to signal "the field is open, last 10 seconds"). Lead has a reverb send through a predelay->convolver->wet-gain chain.

Sound effects are organized by ship in the v14g sound lab, with a default library covering laser, cores, mode switch, dash, afterburner, upgrade core, tether trap wall-bend, trip wire deploy, and per-weapon fire sounds. Shared sounds are marked with ships arrays so the dropdown shows count suffixes.

The TTS announcer ("ship-AI") uses speechSynthesis to speak round events, perk activations, and welcomes. Per-key cooldowns and a global anti-chain gap prevent overlap. Dynamic rate maps game state to announcer pace (menu = slower, playing = faster, roundEnd = dramatic). Voices are selectable in settings via the voiceschanged event. Skipped in VR (headset audio path differs).

Multiplayer

Trystero P2P with a lobby browser backed by a Cloudflare Worker (LSS_API_BASE). Solo vs Join Room chooser on cold boot. Lobby supports map carousel arrows; ship-select panel shows the local player's chosen ship plus a fleet strip with baked GLB thumbnails of teammates and enemies. READY pip per peer.

Discord integration via PKCE OAuth: the user signs in with their Discord, the app exchanges via a Worker proxy (which holds channel webhook URLs as encrypted secrets), and match results post to a channel. Identify scope only; tokens stored in localStorage; PKCE verifier in sessionStorage.

Peer-view shields use the same hull-hug clone approach as local; userData is filtered to avoid circular references that crashed the JSON clone path.

Input

Keyboard and mouse: WASD movement, SPACE/CTRL vertical, MOUSE aim, SHIFT dash, Q/E/F abilities, V core, ESC settings, P cycle wall pattern. Dead-state spectating: A/D or click to cycle teammate cam.

Gamepad: D-pad up/down cycles ships in ship-select, d-pad left/right cycles maps (or teammate cam when dead), LB/RB cycle perks (v16), START launches, BACK opens settings in-match or closes menu. Standard layout bindings are configurable in settings; menu nav reads buttons directly so it survives corrupted bindings. Left-stick horizontal acts as a fallback for d-pad left/right.

VR support presents flat-screen settings inside the headset; XR session ends via Enter VR button. TTS is skipped while presenting.

Settings + Persistence

Settings overlay supports d-pad nav (up/down moves focus, left/right adjusts the focused widget, A activates buttons or toggles checkboxes). Persisted to localStorage: perk selection (lss_perk_id), quality tier (lss_quality), and general settings (lss_settings). Quality system supports potato/low/mid/high/ultra tiers tuning particle counts, cloud density, shader complexity, and bloom RT size.

Cosmic Anomaly

A v11 special: when active, a 75 second cosmic event modifies the field. Self-destroys when its pass completes; reference cleared after destroy.

Killfeed, Medals, and Overlays

Killfeed slides in at the top-right with kill source. Medal popups appear for assist (green diamond), savior (blue circle), and execution (red dot). Round banner overlay handles round-start, champion-field events ("CHAMPION OBJECTIVE", "CHAMPION CHARGE", "CHAMPION RESUMED", "CLAIM BROKEN", "CHAMPION CLAIMED"), and match-end ("EXECUTION"). Damage vignette pulses red on hit. Respawn overlay persists until next round.

Ability flash overlay shows the activated ability name with its preset color (dash cyan, shield blue, overclock orange, cloak purple, emp red, heal green, stasis teal, missiles orange).

Performance Optimizations (v15a)

Five major performance improvements landed in v15a: composite shader cleanup, bloom render-target sizing fix, worldSDF spatial index, trail ring buffer (instead of array shift), and Vector3 scratch pools. Quality system gates expensive features per tier so the game runs on weak hardware (potato tier) up through high-end (ultra tier with full effects).

Special Mechanics Summary

Slayer Arc Wave projectiles stun enemy ships for 1.5 seconds on hit (electric proj effect).

Blaster Power Shot and Puncture Plasma Railgun pierce multiple targets.

Vortex/Gun/Thermal/Sword Block shields are fully damage-immune (the hit ripple shows the shield absorbing, but no HP leaks through).

Gun Shield drains its own HP while up. Thermal Shield emits fire particles in the same forward cone its burn damage uses.

Bot Slayer fires buckshot like the player and buckshot travels farther for bots.

Tracker Sonar Lock is a beacon that adds locks within its detection sphere; combined with main-gun shots stacking locks 1/3 -> 2/3 -> 3/3, the Tracker Rockets volley fires at every fully-locked ship (partial locks preserved on others).

The Pyro Thermal Shield is a power pool (2500 HP, regen to max over 10s); its fire emitter spawns flame particles in the exact damage cone (reach 2.6 hull lengths, base 0.75 hull, tip 1.7 hull).

VR: I haven't been working on the VR side much. I created a super ultra performance mode for Quest. It's still like 10fps in standalone, though. Maybe I'll see if I can super nerf all the graphics to make it even work on flat without a GPU. Idk... we'll see! Let me know if you have ideas!

reddit.com
u/MaximumContent9674 — 11 days ago