Kai Chronicles is a game player for Lone Wolf game books. Only books 1 - 7 are curently playable. The game playe can runs as a website or Android app. You can play it at https://www.projectaon.org/staff/toni or download the app from Google Play.
This repository does not contain game books data. Data must be downloaded from the Project Aon web site. REMEMBER that game books data is under the Project Aon license, so:
- You cannot put this application on a public web server (only on your local machine, for your own use). The only place where this game can be published is on the Project Aon web site
- You cannot redistribute the game books data in any way
The Android older version supported is the 4.4.2 (API 19). The web is tested with the latest version of Chrome and Firefox. Other browsers or/and older versions may don't work.
Compile Typescript
npm install
npm run ts
Download the Project Aon game data:
npm run downloaddata
This will require Node.js (any recent version), zip command and the SVN client on your path
- Put the folder src/www on your private web server
- Open http://localhost/[dir-for-src-www]/index.html
You are now done. If you have Firefox, you dont need a web server. You can open directly the file src/www/index.html. This will not work with Chrome (see http://stackoverflow.com/questions/10752055/cross-origin-requests-are-only-supported-for-http-error-when-loading-a-local)
Install Cordova (https://cordova.apache.org/) and the Android requeriments (https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html). Then:
cd src
cordova platform add android
cordova build android
This will generate a file src/platforms/android/build/outputs/apk/android-debug.apk with the Android app.
You can test the app with the emulator:
cd src
cordova emulate android
There is a bug with Android on Cordova 6.4 with the app icons. If the app icon don't appear, read this: http://stackoverflow.com/questions/40351434/cordova-android-6-4-0-creates-res-folder-top-level-not-inside-platforms-android
Game rules for each book are located at src/www/data. "mechanics-X" are the game rules for the book X. "objects.xml" are the game objects
There is (unfished) documentation for rules and object formats.
The game rules implementation are at src/ts/controller/mechanics and src/www/controller/mechanics/.
If you add "?debug=true" to the game URL, some debug tools will appear. You also can use the browser Developer Tools to prepare the Action Chart to test individual sections. For example, in the console you can execute things like:
actionChartController.pick('axe')
actionChartController.increaseMoney(-10)
There are some scripts for development:
npm run downloaddata [booknumber] # Download books data from the Project Aon. Specify "booknumber" to download a single book
npm run lint # Runs jshint over the javascript code
npm run prepareversion [-- KEYSTOREPASSWORD] # Prepare a version to upload on "dist" dir.
npm run cleandist # Delete the "dist" dir
npm run ts # Compile Typescript code
npm run cleants # Remove code generated by the Typescript compiler
"npm run prepareversion" will generate a version to upload to the Google Play and the Project Aon website on the "dist" directory. If you are me (probably not), you will have the keystore to sign the apk to upload to the Google Play. Then "KEYSTOREPASSWORD" is the password for the keystore. If it's not specified, an unsigned .apk will be generated. I suspect it's not a good idea to publish keystores on github.
A "guide" to develop new books can be found at doc/README-developing.md
MIT. This application uses the following third-party code:
- The HTML rendering, books XML processing and Project Aon license HTML contains code taken from Lone Wolf Adventures, by Liquid State Limited
- The Lone Wolf logo and splashes are taken directly, or adapted, from the Spanish Project Aon
- Button icons are create by Delapouite, Lorc and Willdabeast, and distributed from http://game-icons.net/ (CC License)
- Bootstrap (MIT)
- Toastr (MIT)
- FileSaver.js (MIT)
- jQuery (jQuery license)
- Apache Cordova (Apache license)
- xml.js, code taken from http://syssgx.github.io/xml.js/ (CC License)
Thanks to LSI fo letting us use its Google Play account for this app.