Giter Site home page Giter Site logo

kaichronicles's Introduction

Kai Chronicles

Kai Chronicles is a game player for Lone Wolf game books. Only books 1 - 12 are playable. The game player can run 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 (API 19). The web is tested with the latest version of Chrome and Firefox. Other browsers or/and older versions may don't work.

Setup

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, SVN client, wget and patch on your path

Setup web site

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)

Setup Android app

Install Cordova 6.4 (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

Setup a Docker image

Optional method for running a local website only to play the game

  • Download and install Docker and make sure it's is in your PATH environment variable
  • Using a terminal (Linux or iOS) or PowerShell (Windows 10) navigate to the project's directory
  • Type docker build -t kai:1.0 .
  • Type docker run -p 8080:8080 kai:1.0
  • Open http://localhost:8080

More information about this method here

Developing

IMPORTANT: Official Lone Wolf mobile products are currently in development. At some point this year all fanmade unofficial apps will be discontinued. Please, keep in mind this if you have plans to add a Pull Request, because Kai Chronicles will be removed at some point of this year (2019).

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 -- [--debug] [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 reviewchanges BOOKNUMBER LANGUAGE # Compare the currently publised app book version with the latest version on the PAON SVN

"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. Option "--debug" will generate a debuggable version

"npm run reviewchanges" is useful to check book changes from the last app publised version. It requires commands iconv, dwdiff, and less on your path.

A "guide" to develop new books can be found at doc/README-developing.md

License

MIT. This application uses the following third-party code / resources:

Thanks to LSI for letting us use its Google Play account for this app.

kaichronicles's People

Contributors

tonib avatar mikix avatar rendall avatar perkyguy avatar jegelstaff avatar timendum avatar jakl avatar jfsp avatar

Watchers

James Cloos avatar Tomáš Oplatek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.