@ -4,42 +4,20 @@ This is a project for V. She loves [[https://en.wikipedia.org/wiki/Rush_Hour_(bo
I am using [[https://www.michaelfogleman.com/rush/][Michael Fogleman's Rush Hour database]] ([[https://web.archive.org/web/20201101044241/https://www.michaelfogleman.com/rush/][archive.org]]) in order to provide her tons of puzzles.
* Database format
/(The following text is copied from [[https://www.michaelfogleman.com/rush/][Michael Fogleman's Rush Hour database]] ([[https://web.archive.org/web/20201101044241/https://www.michaelfogleman.com/rush/][archive.org]]), for easier reference)/
#+BEGIN_QUOTE
The database is a simple text file with just a few columns. There is one row for every valid (solvable, minimal) cluster. The columns are: number of moves, board description, and cluster size (number of reachable states).
The board description is a 36-character string representing the state of the unsolved board. It is a 6x6 2D array in row-major order. The characters in the description follow these simple rules:
- o empty cell
- x wall (fixed obstacle)
- A primary piece (red car)
- B - Z all other pieces
I used lowercase ~o~ instead of periods ~.~ for the empty cells in the database so that the entire board description can be selected with a double-click.
The two main specs I need to care about are Android Version and Display Resolution. Additionally, AMOLED hints that pure black is going to look nice.
* Setup
Note that the build currently builds Ogre, which is completely unnecessary. Removing Ogre from the build script in ~Dependencies/gamelib~ is a quick fix for avoiding that.
** Android
See [[file:Dependencies/gamelib/Dependencies/SDL/docs/README-android.md][SDL's README-android.md]] for instructions I followed for setting up Android. You need to download Android Studio. (You could get away with only the SDK and build tools, but you'll probably want the debugger when things don't work out of the box anyways.)
*** Known working version(s)
@ -51,6 +29,7 @@ My local build was tested the following software versions:
| SDK Build-Tools | 29.03, 28.03¹ |
| NDK | 21.4.7075529² |
¹= I'm not actually sure which SDK version is being used, because I didn't explicitly specify one.
²= I had to downgrade from version 22 due to ~platforms~ folder missing. See below section.
*** Fix ~SDL_main()~ not found in ~libmain.so~ error
- Ensure you have ~main()~ defined *with* its full signature: ~int main(int numArgs, char* args[])~
The two main specs I need to care about are Android Version and Display Resolution. Additionally, AMOLED hints that pure black is going to look nice.
* Database format
/(The following text is copied from [[https://www.michaelfogleman.com/rush/][Michael Fogleman's Rush Hour database]] ([[https://web.archive.org/web/20201101044241/https://www.michaelfogleman.com/rush/][archive.org]]), for easier reference)/
#+BEGIN_QUOTE
The database is a simple text file with just a few columns. There is one row for every valid (solvable, minimal) cluster. The columns are: number of moves, board description, and cluster size (number of reachable states).
The board description is a 36-character string representing the state of the unsolved board. It is a 6x6 2D array in row-major order. The characters in the description follow these simple rules:
- o empty cell
- x wall (fixed obstacle)
- A primary piece (red car)
- B - Z all other pieces
I used lowercase ~o~ instead of periods ~.~ for the empty cells in the database so that the entire board description can be selected with a double-click.