Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / scripts / unblockjam / level_tools / README.md

README.md922 BRenderedCodeRaw
1## Puzzle converter
2Converts puzzles from [Michael Fogleman's format](https://www.michaelfogleman.com/rush/#DatabaseFormat) to unblockjam's JSON format.
3
4> [!IMPORTANT]
5> The output level pack will have a default pack name and all colors set to `0`. You will need to manually set these in the resulting file.
6
7## Usage
8`Stdin`: Puzzles in [this format](https://www.michaelfogleman.com/rush/#DatabaseFormat).
9`Stdout`: Converted level pack.
10
11## Example
12You can find a large set of puzzles [here](https://www.michaelfogleman.com/rush/#DatabaseDownload).
13
14```sh
15cd src
16cat example_levels.txt | go run ./cmd/convert_set > example_pack.json
17```
18
19## Level IDs
20Level IDs are automatically generated. They are a 96-bit slice of the board's sha256 representation encoded in URL-safe base64. I'm pretty sure this should suffice for avoiding collisions. There's also a version number (`n-`) prefixed onto each ID for future-proofing.