From b09ad943c3addc638b8edaaf9ed8b372ca256e86 Mon Sep 17 00:00:00 2001 From: Macoy Madson Date: Sat, 20 Mar 2021 17:06:19 -0700 Subject: [PATCH] Detail puzzles binning --- ReadMe.org | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ReadMe.org b/ReadMe.org index 1656321..1783dc4 100644 --- a/ReadMe.org +++ b/ReadMe.org @@ -112,6 +112,12 @@ An example board: #+BEGIN_SRC C 60 IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM 2332 #+END_SRC + +** Data binning +The entire Rush Hour database decompressed is >100Mb, which is a waste of space on an Android phone. I do some additional processing to make the puzzles suitable for Kitty Gridlock: +- ~src/Decompression.cake~ has a constant ~g-num-puzzles-to-read~ which is used to throw out most of the puzzles. It outputs ~data/puzzles.txt~, which is this subset +- ~src/PuzzleIO.cake~ reads the puzzles subset in text, then writes it to a binary format ~data/puzzles.bin~ which makes the puzzles trivial to load at runtime +- ~src/Main.cake~ calls functions in ~PuzzleIO~ to load the binary puzzles at runtime * Licensing and 3rd party Kitty Gridlock is copyright (C) 2021 Macoy Madson. Licensed under ~GPL-3.0-or-later~. Art made by Macoy and V.