Files
feuerwerk/README.md
T
adminandClaude Opus 5.5 25084f8576
game-maker / gate (push) Successful in 4m3s
game-maker / suite (push) Successful in 14m52s
Refactoring round 10: split SoundLibrary, fold sound duplicates (#85)
Refactoring round 10 covers everything since round 9 (808e1ee): 110
commits with about 47 000 new lines, nearly all of them sound, sound
FX, instruments, patterns and songs. Behaviour is unchanged.

Duplicate code (jscpd over src, 50 tokens, TypeScript only, measured
on 808e1ee and here alike: 47 clones / 426 lines before, 33 / 245
after; round 9 itself ended at 22 / 160 by this count):

- PreviewParams (new, editor/soundfx) is the header's parameter bar
  of the Sound FX and the Instrument tab: values, defaults, fields
  and the voices a moved field reaches. Both tabs had it line for
  line.
- fxWorklet: an Effect base runs the bit crusher, phaser, flanger,
  limiter, LFO and bus shifter, a Source base the pitch player and
  the Chip. Start is the one wait for a voice's first sample, which
  four processors wrote out each.
- nodes/shared has checkPort, detachedPort, fxParamsPort and
  letRingPort. The Play and Stop nodes of sounds, notes, patterns and
  songs spelled each port out, up to five times.
- parameterValues builds both Sound FX parameters and Instrument
  parameters, which differed in name and text only.
- SetLoopCommand sets the ruler loop of a pattern or a song. It
  replaces SetPatternLoopCommand and SetSongLoopCommand.
- addLink in music/routing is the one rule for a link that both the
  song routing and the Master routing keep.
- eqCurves works out each band and their sum for the EQ tab, which
  did that in its drawing code. It replaces eqCurveDb, which only a
  test called.
- Smaller ones: the eight neighbour directions of a tile cell, and
  drawFloatingBox for the shadowed box of Popup and FloatWindow.
- Left on purpose: Play pattern and Play song stay two parallel node
  definitions, and the smaller clones under ten lines stay.

Architecture:

- SoundLibrary.ts goes from 2897 to 2188 lines. What a stage of a
  sound FX becomes as Web Audio nodes, and how the knobs of a playing
  voice move, is now viewport/fxNodes.ts. None of it keeps state of
  the library.

Dead code (TS language service, references per export and member):

- soundRefIds, LFO_SHAPE_INDEX, TREMOLO_ROWS, VIBRATO_ROWS and
  REVERB_ROWS had no reader. The four routing node defs are
  registered without an unused exported name.
- soundFileOf and portTypeOf were called by tests only. The tests
  now ask findSound and portOf, which the editor uses. DRY moves
  from src into the one test that uses it.
- 51 values used only in their own file lose their `export`. Types
  and the node catalogues stay exported.
- Kept on purpose: neighboursOf is the cell by cell reading the
  indexed neighboursIn is checked against, and PitchShifter.latency
  is the test's one view of how late the shifter is.

Comments and docs:

- Seven comments told history ("no longer", "any more", "as
  before", "of before #354"). Nine comment blocks ran far past the
  line width. Proof that this changed no code: the bundle was md5
  identical, and the touched tests and e2e modules were identical
  after esbuild.
- README: sound FX, instrument, pattern, song and bus in the asset
  list, the pages Instruments, Patterns and Songs, 1919 checks.
- Wiki: see its own commit.

Tests:

  Gate (melektaus-atx)    274 files, 4236 tests, CHECK EXIT 0
  e2e 34, 64, 65          ALL PASSED, 180 checks
  Unit, touched areas     16 files, 804 tests

No check was added, the e2e sum stays at 1919. Counter-checks, each
put back by copy and compared with cmp:

- addLink without the loop rule: 2 tests fail, one per routing.
- eqCurves with the sum of the last band only: 1 test fails.
- Start in the worklet never waiting: e2e 34 fails in exactly the
  four checks that hang on a voice's first sample (Flanger, Tremolo,
  Chip, a pitched note planned ahead).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:31:33 +02:00

7.6 KiB
Raw Blame History

Game Maker

game-maker

A browser-based tool "one step before a game engine": create assets (scenes, cameras, sprites), place them into scenes, tweak their properties in an inspector and press Play – all in one program, all drawn inside a single WebGL canvas.

Live: https://nockal.com/game-maker/ · Widget playground: https://nockal.com/game-maker/?playground

The documentation is the wiki: https://git.nockal.com/meleki/game-maker/wiki – every concept, node, tab and shortcut, plus the architecture and the development workflow. This file is the short way in.

In one screen

  • An asset is a named, typed thing (scene, camera, sprite, text, behavior, variables, struct, collider, rigidbody, joint, container, clip area, texture, vector art, pixel art, palette, animation, curve, tile, tilemap, state machine, shader, shader function, font, sound, sound FX, instrument, pattern, song, bus, particles) with properties and no position.
  • A scene object places an asset: position, sparse overrides of its properties, an optional parent. Only what differs from the asset is stored; the inspector paints it gold and offers ↺ / ↑.
  • A container is a reusable group edited once and placed many times; its content is resolved from the template on every read. A screen is a container switched on and off.
  • A behavior is logic as a node graph, placed like anything else and parented to the object it acts on. Play has no built-in behaviour – everything that happens is a graph.
  • An account owns projects: the editor asks for a user name and a password first, and each account sees only its own projects. The Account menu at the far right of the toolbar changes the password and signs out.
  • Play runs a throwaway copy of the project; every panel stays usable and Stop brings back exactly what was saved. Release… shares a link that plays the saved game on its own, without the editor and without signing in.

Quick start

Node 22 is required.

npm install
npm run dev          # http://localhost:5175/game-maker/dist/ – API calls are proxied to production
npm run check        # typecheck + lint + format:check + unit tests – the gate CI runs too
npm run build        # writes dist/ and regenerates index.html; the folder is what nginx serves

The browser suite and the three example games need a machine with a GPU:

node tools/seed-e2e.mjs && node tools/e2e.mjs      # the editor, 1919 checks (GM_STEPS=20 for one step)
                                                   #   every tool signs in first – see the Accounts page
node tools/seed-jumprun.mjs && node tools/smoke-jumprun.mjs
node tools/seed-tetris.mjs && node tools/smoke-tetris.mjs
node tools/seed-actor.mjs && node tools/smoke-actor.mjs

Every push runs all of it on the Gitea runners – the gate as one job, build and suite as another beside it – so locally take the gate plus the step your change touches and leave the full run to CI. Details, the GPU requirement and the detached runner are in Development.

Documentation

Page What it covers
Concepts Assets, scene objects, overrides, play mode, the camera, the console
Accounts Signing in and out, the accounts, who a project belongs to, what the check tools need
Scenes The edited scene, the start scene, and switching scenes from a graph
Scene editing Placing, z-order, hierarchy, the editor offset
Behaviors Node graphs: variables, the node set, structs and lists, loops, nesting, editing
Structs Struct assets: a named shape that struct variables, fields and Pack/Expand follow
Colliders Shapes (box, circle, capsule, polygon), collision events, blocking movement, one-way colliders and raycasts
Physics Rigidbodies, the collider material, gravity, the fixed step, joints
Textures Images, frames, nine-slice, the filter, upload limits
Vector art Pictures drawn from shapes: the pen, curves, gradients and texture fills, combining shapes
Pixel art Pictures painted pixel by pixel: the palette, the tools, layers and frames
Fonts Font assets, the picker, what a text falls back to
Sounds Sound assets and clips, Play sound, buses and the Master routing, sound FX
Instruments Instruments as node graphs, Chips and presets, the keys of the Instrument tab, Play note
Patterns Patterns and the piano roll, playing one in a loop or from a game
Songs Songs, their tracks and items, routing, recording, playing one from a game
Animations Animation assets and the Animation tab
Curves Easings drawn by hand, the Curve tab, using one on a key or a Lerp
Shaders Shader graphs that sprites, texts, particle fields and cameras wear, their node set, passes, shader functions
Particles Particle graphs: a particle as a function of its age
State machines The asset, named transitions, State branch, Set state and State transition
Containers Templates, instances, screens
Tiles The tile asset, plain tiles and the two autotile kinds, the pictures as animation steps, the Tile tab
Tilemaps The tilemap asset, painting in the scene view, layers, what it looks like in the game
Plugins Extending the editor: the plugin file, how it is loaded, switching one on and off, API v1
Keyboard Every shortcut
Architecture Stack, source layout, the rules that keep it organised
Development Commands, the e2e suite, the example games, CI
API The PHP JSON API and the project document

Ideas, gaps and bugs

They live in the issue tracker: https://git.nockal.com/meleki/game-maker/issues. What is not there yet is listed on the wiki's Home page.