# 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
### bugs
- modifier-less bindings trigger when typing in a text box, makes renaming existing blueprints basically impossible
### features
#### 0.3.x
- more levels
  - deadfish
  - brainfuck
  - packet routing?
  - game of life sim? (width;height;steps;grid -> grid)
#### 0.4.0
- UI layout engine
  - global scale setting
#### unspecified
- comments
  - editing
  - add to all intro levels
- highlight regions with background colours
- button + binding to flip selection that is being pasted
- accessibility
  - background colour setting (requires color picker => after UI rework)
  - hotkeys for everything (no mouse needed to play)
    - menu navigation (requires UI rework)
    - speed up/down
    - grid cursor movement and placement
    - grid zoom and pan
- 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 limits)
- show histograms
- author name in solutions and blueprints
### undecided
- 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