Browse Source

Rearranged readme and improved it

master
Macoy Madson 3 years ago
parent
commit
380b8df2ba
  1. 79
      ReadMe.org

79
ReadMe.org

@ -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.
#+END_QUOTE
An example board:
#+BEGIN_SRC C
60 IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM 2332
* Setup
** Linux
Clone the repository and its dependencies:
#+BEGIN_SRC sh
git clone https://macoy.me/code/macoy/kitty-gridlock.git
git submodule update --init --recursive
#+END_SRC
* Target device
V has a OnePlus 6T Android phone with the following specifications (from [[https://www.gsmarena.com/oneplus_6t-9350.php][here]]):
| Thing | Value |
|--------------------+-----------------------------------------------------------------|
| Display Type | Optic AMOLED |
| Display Size | 6.41 inches, 100.9 cm2 |
| Display Resolution | 1080 x 2340 pixels, 19.5:9 ratio (~402 ppi density) |
| CPU Chipset | Qualcomm SDM845 Snapdragon 845 (10 nm) |
| CPU | Octa-core (4x2.8 GHz Kryo 385 Gold & 4x1.7 GHz Kryo 385 Silver) |
| GPU | Adreno 630 |
| RAM | 8GB |
| Android Version | 10 |
Build:
#+BEGIN_SRC sh
./Build.sh
#+END_SRC
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[])~
@ -87,3 +66,37 @@ LOCAL_SRC_FILES := Main.cake.cpp Math.cake.cpp SDL.cake.cpp
#+END_SRC
*** Fix Android Studio not knowing how to build/debug project
Click ~File -> Sync Project files with Gradle files~.
* Target device
V has a OnePlus 6T Android phone with the following specifications (from [[https://www.gsmarena.com/oneplus_6t-9350.php][here]]):
| Thing | Value |
|--------------------+-----------------------------------------------------------------|
| Display Type | Optic AMOLED |
| Display Size | 6.41 inches, 100.9 cm2 |
| Display Resolution | 1080 x 2340 pixels, 19.5:9 ratio (~402 ppi density) |
| CPU Chipset | Qualcomm SDM845 Snapdragon 845 (10 nm) |
| CPU | Octa-core (4x2.8 GHz Kryo 385 Gold & 4x1.7 GHz Kryo 385 Silver) |
| GPU | Adreno 630 |
| RAM | 8GB |
| Android Version | 10 |
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.
#+END_QUOTE
An example board:
#+BEGIN_SRC C
60 IBBxooIooLDDJAALooJoKEEMFFKooMGGHHHM 2332
#+END_SRC

Loading…
Cancel
Save