Project architecture

Explore how the games are built, from input and simulation to rendering and multiplayer.

Browse game breakdowns
Actual Cut It Up coastal highway scene and motorcycle cockpit, rendered from production game geometry.

Cut It Up

Motorcycle lane-splitting

Ride an endless procedural route through coast, city, desert and mountains. Seven detailed motorcycles, 28 finishes, rear action-camera recording and peer rides.

Project details for Cut It Up
First-person carbine and approaching infected on Saint Orin’s shop-lined street, rendered in Blackwater’s N64-inspired style.

The Last Dead · Blackwater

Open-world horror · 1–2 players

Explore The Last Dead’s Blackwater Island and Saint Orin. Scavenge homes, recover weapons and restore the signal alone or with a second survivor. Find a waiting expedition through Play together.

Project details for Blackwater
Native Godot review camera of the real Reedfall river and cascade in Adventures of J-Rod.

Adventures of J-Rod

Open-world crafting

Wake beside Lanternwake Road. Gather, craft and build a home, then explore the river valley, trade hamlets and Sunscar Mine.

Actual Alto Palo first-person gameplay in the Reading House: three connected gallery levels, linked return stairs, open glowing lanterns, framed trade prints and the live expedition HUD.

Alto Palo

Real streets. Three-level houses. Lost relays.

Follow Manhattan streets and explore eight three-level archive houses. Climb linked stairways, recover crew records and prepare your relic build through three guarded relays. Existing checkpoints retain the original sky-island journey.

Project details for Alto Palo
Actual live Duals menu, Dojr character and featured map rendered by the game.

Duals

Solo Test Range · Online rooms in development

The solo Test Range runs in your browser. Online rooms are in development.

Actual Classic Matcha gameplay after a successful merge, preserving the original unnumbered jelly pieces.

Matcha Drop

Physics puzzle

Drop squishy matcha balls into a satisfying stack.

Lobbers blue and red players facing across the throwing arena.

Lobbers

Local demolition game

Play the demolition courses solo or race side by side on one device. Online multiplayer is not available in this build.

Project details for Lobbers
Two stickfigure fighters facing each other in the game’s match-intro artwork.

Stickfigure Mayhem

Multiplayer platform fighter

Fight bots or invite a friend to a stickfigure brawl across rooftops, city streets, and backyards.

Industrial arena with raised walkways, ramps and sunlit concrete cover

Game architecture

Duals repository

Follow one player input from the browser to the authoritative room and back to the screen.

Arena concept art

The solo Test Range runs in your browser. Online rooms are in development.

How a multiplayer frame works
  1. BrowserPredict movementSample controls and apply local physics immediately.
  2. Colyseus roomAdvance the matchProcess sequenced inputs, step Rapier and publish state.
  3. BrowserPresent the frameReconcile local movement and interpolate remote players.

Shared maps and contracts supply collision topology and message definitions to both simulations.

Subsystems

Browser entry

Vite loads the React shell. App owns menus and mounts the game runtime as startup checks pass.

Room and readiness

Colyseus connects the browser to the room. Client readiness and server startup gates coordinate the transition to a match.

Local prediction

The browser samples controls and predicts the local player. When correction can replay, it starts from the server state and reapplies pending input.

Authoritative simulation

MyRoom advances the match in fixed steps. It processes queued inputs, runs movement and Rapier physics, then resolves gameplay and commits acknowledgements.

  • Roommy-server/src/rooms/MyRoom.ts
  • Tick ordermy-server/src/rooms/round/roomTickLoop.ts
  • Input queuemy-server/src/rooms/input/humanInputQueueRuntime.ts
Combat and confirmation

The client gives immediate firing feedback. The room resolves queued shots using authoritative gameplay state and returns the result.

Remote playback and rendering

Room snapshots feed buffered remote playback. React Three Fiber presents the local and remote players, map, camera and effects through the Three.js scene.

Forge and shared contracts

Forge authors playable maps. Shared map and collision code prepares topology for the browser and the room. Shared gameplay contracts define the messages they exchange.

Build and operations

The root package builds the browser client. The server has its own package, and repository scripts manage local instances and targeted checks.

Source snapshot 51a8c9c8 · Nov 18, 2026

Duals · From source to screen

Authoring syntax, UI libraries and graphics each have a different job

JSX is a JavaScript syntax extension; TSX combines TypeScript with JSX. A build pipeline transforms this authoring syntax into JavaScript for the browser. JSX and TSX do not, by themselves, require React.

  1. Author the experience

    Components can be written in JSX or TSX. TypeScript types are removed during compilation; JSX expressions are transformed according to the chosen tooling.

  2. Run the interface

    A library such as React provides the component runtime for UI state and updates. Syntax and runtime are separate choices.

  3. Build the 3D scene

    React Three Fiber connects React components to Three.js scene objects. Three.js supplies graphics abstractions such as geometry, materials and cameras.

  4. Render in the browser

    Rendering submits work through a browser graphics API to the GPU. This is a distinct stage from authoring syntax, component updates and game simulation.

Duals declares React, React Three Fiber and Three.js in its package configuration, and uses the React plugin in its Vite configuration. Those declarations alone do not identify the graphics backend selected in a running build.

Game architecture

Open a game to trace its main runtime and rendering stages.

Duals
  1. SourceJavaScript + JSXbuilds with esbuild
  2. UI / sceneReact + React Three Fiberupdates scene objects
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

The JavaScript/JSX frontend is bundled before execution; React Three Fiber reconciles React scene descriptions into Three.js objects, which submit WebGL graphics work to the GPU. Rapier movement physics and Colyseus authoritative rooms are parallel systems, with client prediction and reconciliation feeding the displayed state rather than acting as rendering stages.

Paper BMX
  1. Source / buildJavaScript · Vite / esbuildloads browser runtime
  2. SimulationBike logic + Rapier WASMupdates bike / park state
  3. RenderingThree.js scenesubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

The recorded browser build uses JavaScript with Rapier/WASM for physics and Three.js/WebGL for the visible bike and park, while Web Audio supplies ride sound. Godot and reference work exist separately in the checkout, so the legacy steve-hazel-bike folder name must not be confused with the separate Steve-Hazel-Original project or treated as proof of the active engine.

Cut It Up
  1. SourceJavaScript modules + HTML / CSSloads game and UI
  2. SimulationInput + custom vehicle simulationupdates vehicle state
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

JavaScript modules run the driving systems and browser interface; custom vehicle simulation, including documented worker-based work, supplies state to Three.js rather than passing through React. Web Audio handles engine and impact sound, while WebRTC rides and optional TURN relay are distinct from local split-screen and do not sit between Three.js and the GPU.

RINGSIDE
  1. SourceJavaScript modules + HTMLloads controls and HUD
  2. GameplayInput + fighter / bout stateupdates the recorded 3D scene
  3. Rendering libraryThree.js (documented)submits WebGL work
  4. Graphics APIWebGL (documented)executes graphics
  5. HardwareGPU

Local JavaScript modules establish the input, first-person view and HUD boundaries, while the dashboard describes Three.js rendering and Rapier physics. PeerJS/WebRTC matches and the exact simulation behavior remain documented architecture rather than a fresh runtime verification, so they should not be mistaken for a proven live multiplayer path.

The Last Dead: Blackwater
  1. SourceJavaScript browser gameloads browser modules
  2. GameplayInput + host-owned co-op stateupdates visible game state
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

This is the standalone Three.js browser edition, not the preserved legacy dungeon entry or the separate Unity/C# port; Node serves local development rather than rendering frames. The co-op host owns shared simulation, WebRTC carries direct play, and HTTPS room endpoints handle discovery, signaling and relay fallback alongside the graphics pipeline.

PickleDash
  1. Source / buildTypeScript + TSX · Vitetransforms to browser JavaScript
  2. Scene descriptionReact + React Three Fiberupdates scene objects
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

Recorded TypeScript/TSX source builds through Vite into browser JavaScript; React Three Fiber describes the Three.js scene, while a separate TypeScript ball simulation supplies bounce, drag and spin state. Documented WebRTC multiplayer and local split-screen are separate play paths, and a successful frontend build is not proof that online play works end to end.

The Butcher’s Table
  1. SourceTypeScript + TSX + CSSbuilds with Vite Hub entry
  2. Browser codeEmitted JavaScriptmounts React UI
  3. InterfaceReact componentsupdates DOM presentation
  4. Rendering boundaryBrowser layout / paintcomposes the screen
  5. DisplayBrowser compositor / GPU

The inspected Hub TSX entry mounts React UI and Vite transforms the frontend source into browser code; React updates are not themselves GPU draw calls. Three.js, PeerJS and Next.js appear in the manifest, but their declaration alone does not establish the active 3D, multiplayer or hosting path, so this diagram does not invent those runtime edges.

Adventures of J-Rod
  1. Gameplay sourceGDScript + Godot scenesexports through Godot
  2. Build outputGodot web export + assetsloads engine runtime
  3. Browser runtimeGodot engine in WebAssemblyruns scene / gameplay systems
  4. RenderingGodot web rendering backendsubmits browser graphics work
  5. HardwareGPU

Godot scenes and GDScript define gameplay and the build HUD, while a Godot web export packages the engine runtime and assets for execution in the browser. JavaScript export scripts and Python asset-fetch tools help produce that build, but they are not the gameplay language and should not be confused with React or a Three.js renderer.

Alto Palo
  1. SourceJavaScript + CSSbuilds with Vite
  2. GameplayExploration / camera stateupdates city objects
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

Vite builds the JavaScript exploration and interface code, and Three.js submits the city scene to WebGL for GPU rendering. The recorded Worker directory represents a separate server-side concern, not another render stage or proof of active D1 use, and the legacy vesper-starfall slug does not establish identity with the separate VESPER original.

Findle
  1. Documented sourceTypeScript + Reactbuild step not established here
  2. Documented clientBrowser JavaScript + React UIupdates the recorded graphics scene
  3. Documented graphicsThree.jsgraphics backend not independently checked
  4. Rendering boundaryBrowser graphics backendpresents the screen
  5. DisplayBrowser / GPU

The existing architecture record lists React, TypeScript, Three.js and Tailwind, with browser storage for streaks and local state. This is a documented stack rather than a fresh source-to-live audit, so the exact build tool, renderer configuration and latest-cloud parity remain qualified instead of being filled in by assumption.

JRod's Digital Venue
  1. SourceJavaScript modules + HTML / CSSloads venue and controls
  2. Venue statePlayers / timeline / presentationupdates scene objects
  3. Rendering libraryThree.jssubmits graphics commands
  4. Graphics APIWebGLexecutes shaders
  5. HardwareGPU

JavaScript runs the venue modules, Three.js/WebGL draws the scene, and Web Audio processes listening and spatial sound on a separate audio path. Implementation documentation identifies D1 timeline and membership authority separately from PeerJS/WebRTC peer transport, so neither the database nor audio processing should be drawn as an intermediate GPU stage.

Lobbers
  1. Source / buildTypeScript + CSS · Viteemits browser JavaScript
  2. Game frameworkPhaser scenes / inputadvances game state
  3. SimulationMatter.js collisions / bouncefeeds object positions
  4. RenderingPhaser rendererbackend configuration not checked here
  5. DisplayBrowser graphics / screen

TypeScript implements the client and Vite builds it, while the recorded Phaser/Matter.js stack separates the 2D game framework from rigid-body collisions and bounce. Phaser can target different renderer backends, so this diagram does not claim an inspected WebGL-versus-Canvas configuration or infer a configured live multiplayer server from the frontend.

Matcha Drop
  1. SourceJavaScript + HTML / CSSloads browser game
  2. Game logicInput + grid / match stateissues drawing commands
  3. Drawing APICanvas 2Drasterizes / composites output
  4. BrowserCanvas and page presentationpresents frame
  5. DisplayScreen

JavaScript updates the puzzle grid and issues Canvas 2D drawing commands, while HTML/CSS supply the page shell and Web Audio handles chimes. Matching rules are game logic rather than a separate rigid-body engine, and Canvas 2D does not establish the same explicit WebGL shader pipeline as the 3D games.

Sidequest
  1. SourceJavaScript + HTML / CSSships static browser build
  2. Puzzle stateDaily seeds / moves / undoupdates page presentation
  3. InterfaceBrowser DOM and stylesruns layout / paint
  4. BrowserPage compositingpresents frame
  5. DisplayScreen

The recorded static browser build uses JavaScript for daily puzzle logic and HTML/CSS for presentation, with localStorage for browser-local progress. Individual puzzles can have their own rendering details, so this overview does not claim every puzzle uses Canvas or that the presence of server files means saves are synchronized to an account.

Nadiyah-Fights
  1. Documented source / buildTypeScript · Viteemits browser JavaScript
  2. Game frameworkPhaserprocesses combat state
  3. GameplayHitboxes / hurtboxes / combosupdates presentation
  4. RenderingPhaser rendererbackend configuration unverified
  5. DisplayBrowser graphics / screen

The project record describes TypeScript, Phaser and Vite, with combat defined through hitboxes, hurtboxes and combo state. The concrete renderer mode and any standalone physics engine were not verified in the source notes, so those edges stay explicit unknowns rather than borrowing assumptions from Lobbers.

Stickfigure Mayhem Explore the multiplayer architecture
GAME ARCHITECTURE · STICKFIGURE MAYHEM

From invite to fight

Follow the room, the connection, and the game running in each player’s browser.

Play the game ↗
  1. 01 · CLIENTOpen the gameNext.js exports the browser game, controls and arenas.
  2. 02 · ROOMInvite a friendThe Hub Worker and D1 room service manage membership and signaling.
  3. 03 · CONNECTIONConnect playersWebRTC negotiates a direct data channel between browsers.
  4. 04 · MATCHPlay togetherGameplay travels over the direct channel when connected.
↔
PRIMARY PATH

Browser to browser

WebRTC DataChannels carry gameplay messages once peers connect. A public STUN service helps peers discover addresses.

⤴
FALLBACK PATH

Through the Hub

While peers connect, or if a direct connection is blocked, the same room endpoint relays gameplay. No provider key or TURN service is required for this path.

◉
SOLO PLAY

Local bot fights

The game and its bot matches run in the browser. Voice uses a separate WebRTC stream and can be unavailable on restrictive networks.

What the Hub serves: the exported game at /stickfigure/, plus the room endpoint backed by D1. Rooms expire after the host disconnects.

Stickfigure Arena
  1. Documented appReact + Next.jssource language split unverified
  2. Browser runtimeJavaScript + React UIruns game state
  3. Documented drawingCanvas 2Drasterizes game visuals
  4. BrowserCanvas and page presentationpresents frame
  5. DisplayScreen

The dashboard describes React/Next.js around a Canvas 2D game, but the exact JavaScript-versus-TypeScript source split and current build configuration were not verified here. Ably and WebRTC are documented multiplayer concerns alongside the browser drawing path, not proof of a working hosted session or direct React-to-GPU execution.

Concept deep dives

JavaScript: input to a frame

  1. RuntimeInput eventinvokes handler
  2. CPUJavaScript game logicupdates state
  3. FrameAnimation callbackupdates scene or UI
  4. GraphicsRenderer / browserpresents result
  5. OutputVisible frame

JavaScript executes the game’s input, rules and coordination code in a browser runtime. It does not directly color every screen pixel: it asks browser APIs or a renderer to do that work.

  • ExecutionA long synchronous task blocks other work on its thread; promises do not automatically move heavy calculations to another CPU core.
  • TimingrequestAnimationFrame follows display opportunities; physics can use a separate fixed-step clock.
  • ExampleCut It Up runs JavaScript modules for driving and presentation. Duals also has JSX source transformed before browser execution.
  • OwnershipRemove obsolete listeners and timers, and track repeated load/unload behavior before calling memory growth a leak.

React: state to an interface

  1. SourceComponent + propsdescribes elements
  2. StateState / event updateschedules render
  3. ReactReconcile element treeupdates renderer
  4. TargetReact DOM or R3Fchanges UI or scene
  5. OutputBrowser display

React organizes interfaces as components and reconciles their descriptions when inputs change. React DOM updates browser UI, while React Three Fiber is a different renderer that creates and updates Three.js objects.

  • BoundaryA React render is not a GPU draw call, and React does not turn into JavaScript at runtime; it is a JavaScript library.
  • StateProps carry inputs and state holds changeable values. Keep authoritative simulation state in the system that actually owns it.
  • Frame loopMoving a mesh every frame does not require setState every frame; use the rendering system’s frame facilities.

React Three Fiber: components to a 3D scene

  1. SourceReact / JSX scenereconciles description
  2. R3FThree.js objectsupdates transforms
  3. FrameuseFrame callbackshands scene to renderer
  4. RendererThree.jssubmits graphics commands
  5. GraphicsWebGL → GPU

React Three Fiber connects React components to real Three.js objects. React updates the scene structure when necessary, while the animation loop updates motion and renders frames independently.

  • ExampleDuals and PickleDash describe 3D scenes with React Three Fiber; plain Three.js games do not use R3F hooks.
  • Frame pathA ref points at a mesh, useFrame changes rotation using delta time, and Three.js renders the updated scene.
  • Demand renderingStatic views may render only after invalidation; continuously animated games need an appropriate loop.
  • CleanupReuse vectors and materials, and dispose only resources whose ownership has ended.

Three.js: scene objects to drawing

  1. SceneMeshes, materials, lightsdefines visible world
  2. CPUCamera + scene traversalselects and sorts objects
  3. RendererDraw and shader setupsubmits commands
  4. APIWebGL backendruns graphics work
  5. GPUFrame buffers

Three.js gives JavaScript a scene-oriented way to describe 3D worlds. Its WebGL renderer prepares drawing work; the GPU executes shader programs and produces the image.

  • ObjectsGeometry supplies shape, materials describe appearance, and cameras define the view. A scene graph alone does not simulate physics.
  • CostMany separate meshes can increase traversal and draw submission costs; instancing can help repeated objects.
  • PassesShadows and postprocessing may render additional passes, not just one image per frame.
  • ScopeThis flow describes the WebGL renderer used in the documented games, not every possible Three.js backend.

WebGL: graphics API, not a game engine

  1. CPURenderer prepares resourcescalls browser API
  2. APIWebGL contextvalidates graphics commands
  3. DriverBuffers, textures, programsschedules GPU work
  4. GPURasterization + shaderswrites render targets
  5. BrowserCanvas presentation

WebGL is the browser graphics interface used by many of these games. Three.js can call it on the game’s behalf, while WebGL programs define how geometry and fragments are processed.

  • ResourcesVertex buffers, index buffers, textures and framebuffers hold graphics data; JavaScript heap size is not the same as GPU memory usage.
  • ContextA WebGL context can be unavailable or lost, so a source build succeeding does not prove 3D works in a particular browser.
  • ShadersGLSL programs execute graphics stages; they are distinct from the JavaScript application logic.

GLSL: geometry and fragment programs

  1. SetupShader source + uniformscompiles and links program
  2. VerticesVertex shaderproduces clip-space positions
  3. RasterizerPrimitive rasterizationgenerates fragments
  4. FragmentsFragment shaderoutputs values
  5. FramebufferDepth / blend operations

GLSL is the shader language used with WebGL. Vertex and fragment programs run at different points in the drawing pipeline, so they should not be confused with a game’s CPU simulation.

  • Vertex stageTransforms vertex positions and produces values that can be interpolated across a primitive.
  • Fragment stageComputes output values such as color; depth tests and blending still affect what reaches the framebuffer.
  • Fractal exampleA raymarching fragment shader repeatedly evaluates a distance function to discover a surface rather than drawing all of its detail as meshes.
  • Data flowUniforms carry shared parameters such as time or camera information; textures can supply sampled data.

CPU, GPU and the frame budget

  1. InputCPU: events and simulationprepares updated state
  2. SceneCPU: traversal and submissionqueues rendering
  3. GraphicsGPU: vertices and fragmentsfinishes render target
  4. DisplayBrowser compositor / displaypresents at refresh
  5. MeasureFrame time + stutters

The CPU coordinates logic and scene preparation; the GPU performs parallel graphics work. They can overlap, so their timings are not simply added together, and improving one side may leave the real bottleneck untouched.

  • Budget60 fps allows about 16.7 ms between displayed frames; consistent delivery matters more than an average that hides stalls.
  • ExperimentLowering resolution can reveal pixel or bandwidth cost, while pausing simulation can reveal CPU logic cost. Neither test is proof on its own.
  • PassesShadows, transparency and postprocessing can multiply work even when the object count barely changes.
  • MemoryRepeated growth after load/unload can signal retained resources; intentional caching is not automatically a leak.

TypeScript: checked source to JavaScript

  1. SourceTypeScript / TSXchecks declared contracts
  2. CheckType checkerreports incompatibilities
  3. BuildTransform / bundleerases most types
  4. RuntimeJavaScript engineexecutes output
  5. BoundaryExternal data validation

TypeScript adds a static type system to JavaScript development. Its annotations are normally erased before execution, so runtime data still needs validation where it crosses an untrusted boundary.

  • Separate stepsA fast bundler may strip types without checking them. Run the project’s checking command as well as its build.
  • LimitA type assertion does not transform or validate an API response; schemas and explicit checks handle runtime validation.
  • ExampleLobbers records TypeScript gameplay code, while PickleDash and Butcher’s Table include TSX UI files.

JSX and TSX: related, but distinct source forms

  1. AuthorJSX or TSX element syntaxdescribes element tree
  2. BuildJSX transformcreates JavaScript calls
  3. RuntimeReact elementsreconciles with target
  4. RendererDOM or R3F objectsupdates target
  5. DisplayBrowser rendering

JSX is syntax for element trees commonly used in JavaScript, while TSX is TypeScript source containing JSX. Neither is HTML sent directly to a browser, and the chosen renderer determines whether elements represent UI or 3D objects.

  • JSXDuals records JavaScript JSX presentation files such as KillcamPlayback.jsx.
  • TSXButcher’s Table has a hub.entry.tsx React entry; PickleDash records src/main.tsx.
  • Type checkingTSX can check component props, but only when the project actually runs the type checker.

Physics: simulation state to a rendered pose

  1. InputPlayer intent / controlssets forces or targets
  2. SimulationFixed-step updateadvances bodies
  3. CollisionContacts + constraintsresolves interactions
  4. StatePosition and velocityupdates visual pose
  5. RenderingMesh interpolation

Physics advances a model of movement and collisions; rendering shows that model at display cadence. A renderer such as Three.js does not become a physics engine just because it moves meshes.

  • EnginesRapier appears in the documented BMX and Duals stacks; Matter.js is documented for Lobbers. Custom ball or vehicle simulation is a separate approach.
  • TimingFixed steps keep simulation intervals controlled; bounded catch-up avoids spending an entire frame processing a backlog.
  • InterpolationRendering between snapshots can smooth motion without changing the authoritative physics state.
  • AuthorityIn multiplayer, identify which server or host accepts inputs and owns the simulated result.

Multiplayer: transport versus authority

  1. ClientInput intentsends command
  2. TransportWebSocket / WebRTC / HTTPdelivers message
  3. AuthorityServer room or host peeraccepts and simulates
  4. SnapshotState updatereturns accepted result
  5. ClientReconcile and interpolate

Transport moves messages; authority decides what state is accepted. Duals documents Colyseus-room authority, while Blackwater co-op documents host-peer authority with a separate room-discovery and signaling service.

  • ConnectionWebRTC still needs discovery and signaling; a relay can help when direct connectivity fails.
  • CorrectionA predicting client may later reconcile with an authoritative snapshot; remote entities can be interpolated between received updates.
  • DatabasePersistent membership or room records do not automatically make the database the real-time physics authority.
  • DeploymentA playable frontend does not prove its multiplayer server, secrets, room routes or relay are configured.

Godot and WebAssembly: engine export to browser

  1. SourceGodot scenes + GDScriptexports selected target
  2. BuildWeb export packageproduces engine and data
  3. BrowserJavaScript loaderinstantiates WASM
  4. EngineGodot runtime + assetsruns game loop
  5. OutputBrowser graphics and audio

Godot exports a browser-compatible engine and game package rather than converting every scene into React. WebAssembly is an execution format for compiled modules; it does not grant native desktop access or imply that the game’s authored language is C++.

  • Project identityAdventures of J-Rod documents GDScript and Godot; Paper BMX also has separate Godot/reference work that must not be confused with its documented JavaScript browser runtime.
  • PackagingKeep export settings, assets and URLs together; a source checkout is not the same as a runnable export.
  • HostingThreaded/shared-memory builds may require particular isolation headers. Verify the exact export and host.
  • LimitsBrowser permissions and sandbox constraints still apply; WASM does not provide arbitrary native plugin loading.

Web Audio: a signal graph to speakers

  1. TriggerGame event / transportschedules sound
  2. SourceBuffer or oscillatorproduces samples
  3. GraphGain, filters, effectsprocesses signal
  4. OutputAudio destinationsends audio
  5. DeviceSpeakers / headphones

Web Audio processes sound through connected nodes, separate from the graphics frame loop. Game events can schedule sound, while timely audio processing prevents glitches even when the interface is busy.

  • SchedulingAudio timing should use the audio clock where appropriate, not depend solely on visual animation frames.
  • WorkletsAudioWorklet can run custom processing in the audio rendering environment; it is not a native VST plugin host.
  • TransportWebRTC can carry live audio, but it is not the same thing as the local Web Audio signal graph.
  • ExamplesDigital Venue documents listening and spatial sound; Matcha Drop documents chimes and BMX ride sounds.

Canvas 2D: drawing a board or sprite scene

  1. StateGame logicupdates positions and values
  2. DrawJavaScript drawing callstargets 2D context
  3. CanvasShapes, images, textcomposes bitmap
  4. BrowserCanvas presentationshows output
  5. FrameNext update

Canvas 2D is a browser drawing API distinct from WebGL. A game such as Matcha Drop can draw a board with it without requiring React, Three.js or a separate rigid-body physics engine.

  • BoundaryCanvas is the output surface, while rules, saves and input remain application systems.
  • PerformanceRedraw only what the design requires and measure expensive text, image scaling or large surfaces.
  • UIDOM controls can coexist with a canvas; drawing a button does not automatically provide keyboard or accessibility behavior.

Source, build and deployment: three checkpoints

  1. SourceGit commit + assetschecks out inputs
  2. ToolchainType check / testsvalidates source
  3. BuildVite / esbuild / exportproduces runnable files
  4. DeployHosting destinationserves selected build
  5. VerifyLive URL and behavior

A GitHub commit identifies source, a build packages it, and a deployment makes a selected build available. These are separate checkpoints: pushing code does not update a Site unless a working deployment integration does so.

  • InputsPreserve lockfiles, instructions and required assets so another person can reproduce the build.
  • ToolsVite and esbuild prepare browser code; Godot has its own export pipeline. Do not assume one command serves every project.
  • EvidenceBuild success does not prove graphics availability, gameplay correctness or online multiplayer readiness.
  • VerificationCompare the intended revision with what the live URL actually serves, then test the affected behavior.

Coding lessons

Explore a game loop, validate events and update a HUD in three interactive browser labs.

01
JavaScript · input → update → draw

Same second. Different frame count.

Both players receive the same direction. Blue moves in pixels per second; amber moves two pixels per frame. Change the simulated frame rate, then compare one second.

Two movement lanes; blue uses delta time, amber uses distance per frameBLUE · speed × dtAMBER · 2 px / frame
Simulated time0.000 s
Blue displacement0 px
Amber displacement0 px
Paused. Choose a direction, then step. Lanes wrap; displacement keeps counting.
1 · Inputdirection = +1
2 · Updatedt = 0.0167 s
3 · Drawx = 0.00 px
Movement logic · values follow your controls

This lab paces simulated frames with requestAnimationFrame. In a real browser loop, compute dt from callback timestamps; FPS varies. Clamp a long dt or use bounded fixed substeps for physics. Reset the previous timestamp after a pause. Drawing does not advance simulation state.

let previous;
function frame(now) {
  const dt = previous == null ? 0
    : Math.min((now - previous) / 1000, 0.05);
  previous = now;
  update(dt); draw();
  requestAnimationFrame(frame);
}
Try it: compare 30 and 120 FPS at 120 px/s. Blue travels 120 px in both runs; amber travels 60 then 240 px. Can you make them match?
Reveal the reason

At 60 FPS, two pixels per frame happens to equal 120 pixels per second. That coincidence breaks when the frame rate changes.

Read further: MDN · requestAnimationFrame. Keyboard: Tab to Left/Right, then use arrow keys to choose direction; Enter/Space activates buttons. Nothing starts automatically.