Log inGet started
World

Marble Machine — The Marbleworks

Branchmain
Branchesmain
Commitfdafc3f4d4

README.md

MarbleMachine

The game brain for The Marbleworks — a cozy first-person marble-machine workshop. One instance lives on the MarbleworksGame entity in scenes/main and owns the whole game:

  • Menus and HUD (zui screens): main menu, level select, settings, extras, pause, win/lose panels, hotbar, counters, timer, crosshair.
  • Placement: crosshair-aimed ghost preview with grid snap, R = rotate 90, mouse wheel = fine yaw, LMB = place, X = delete. Budget and occupancy validation tint the ghost green/red.
  • Marble simulation: hopper release timers, CCD physics spheres, speed cap, drain/stuck detection, per-cell part interactions, goal counting.
  • Modes: 8 puzzle levels (win/lose, 1-3 stars) and a shared co-build sandbox persisted through runtime_data.world.
  • Persistence: per-player stars, settings, and marble skin in runtime_data.player(localId).
  • Audio: routes every cue through the mmaudio bank.

Controls: WASD walk, mouse look, LMB place, X delete, R rotate, wheel fine-turn, 1-0 hotbar, F start/stop the machine, Esc pause.

The test* methods (testEnterLevel, testPlace, testRun, testState, testMarble, testProbe, ...) drive the same code paths as player input and exist for validation and admin tooling.