# Marble Machinations
A zach-like programming-adjacent puzzle game.
Still in development, but core features are mostly stable.

logic mostly like https://git.crispypin.cc/CrispyPin/marble

## todo
### meta
- engine tests
- blag post about marble movement logic?
- standardise terminology (cycle/step/tick)
### bugs

### features
#### 0.3.x
- more levels
  - packet routing?
  - game of life sim (width;height;steps;grid -> grid)
- shrink button
#### 0.4.x
- UI layout engine
  - global scale multiplier, affected by window size
  - background colour setting (requires color picker => after UI rework)
  - light theme
#### unspecified
- comments
  - editing
  - add to all intro levels
- highlight regions with background colours
- button + binding to flip selection that is being pasted
- hotkeys for everything (no mouse needed to play)
  - menu navigation (requires UI rework)
  - speed up/down
  - keybinds for specific tool variants
  - grid cursor movement and placement
  - grid zoom and pan
- config settings page categories (mostly for keybindings)
- UI: scroll output bytes
- timestamps in solutions and blueprints
- display tool variant more clearly (it's not obvious there are more states)
- better text rendering
  - font selection (probably a lot of work)
### online stuff
- store scores in server
- validate solutions in server (with compute limits)
- show histograms
- author name in solutions and blueprints
### undecided
- option to skip (fast-forward through with settable multiplier) first N stages or cycles, for when you are debugging something that happens in later stages
- hide some tile tools in early levels to make it less overwhelming
- footprint score (tiles that were non-empty at any point in the run)
- option to use 8-bit marbles?
- 32 bit input/output?
- settable marble start direction?
  - allows blueprint rotation

## playtesting observations
- 'loops' introduces too many things (powering, redirection, generating zeroes)
- players expect buttons to be triggered even when theres something blocking the marble on the other side
- math tile is not intuitive

## file hierarchy
```
- assets/
- levels/
  - chapter_01.json
  - chapter_02.json
  - sandbox.json
- user/
  - solutions/
    - output/
      - solution_0.json
      - solution_1.json
    - copy_input/
      - solution_0.json
      - solution_3.json
  - blueprints
    - blueprint_0.json
```


## levels
### intro, basic mechanics
- output a zero (marble, output)
- output multiple numbers in sequence (digits)
- output zeroes forever (looping/arrows, button, silo output)
- copy the input (input)
- increment every number (math tiles)
- copy only odd input numbers (comparator, flipper)
### 0-terminated list processing
- copy the second list
- calculate list length (math, silo input)
- count instances of 5 in a list
- reverse a list (bouncing)
### text
- convert text to lowercase
- convert a number to decimal ascii
- parse an ascii number
### advanced list processing
- index a list
- reverse and return the first n elements of a list, with n given first
- add two lists element-wise
- sort a list