Skip to content
A game to teach functional programming concepts
JavaScript HTML Python Shell
Branch: master
Clone or download
yishuzhang0302 Merge pull request #277 from lidavidm/tutorial-popup
Add optional tutorial popup at start of level
Latest commit 97c91e2 Jul 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
chapterutil Update README about chapterutil Apr 25, 2018
design Design for type inference/checking Dec 24, 2017
docs Quickly document UI components May 22, 2018
resources Update arithmetic.json Jun 13, 2018
simplelog Log player actions as well Apr 4, 2018
src
.babelrc Build system woes May 6, 2018
.eslintrc.json Tweak ESLint quote-props Apr 1, 2018
.gitignore Reimplement dragging into holes Dec 10, 2017
DESIGN.md Add DESIGN file Dec 17, 2017
LICENSE Initial commit Dec 7, 2017
README.md Update README about chapterutil Apr 25, 2018
credits.html Update credits May 11, 2018
index.html Add optional tutorial popup at start of level Jun 15, 2018
package-lock.json Install babel-cli for testing Mar 13, 2018
package.json More build system crap May 6, 2018
yarn.lock More build system crap May 6, 2018

README.md

reduct-redux

Setup

Install the necessary packages and run the bundler.

Choose one of the two below:

Yarn:

yarn install
mkdir dist
# Symlink resources into the folder that our bundler serves
ln -s $(pwd)/resources/ dist/resources
yarn serve
open http://localhost:1234/index.html

NPM:

npm install
mkdir dist
# Symlink resources into the folder that our bundler serves
ln -s $(pwd)/resources/ dist/resources
npm run serve
open http://localhost:1234/index.html

Distribution

If you use Yarn: run yarn dist

If you use NPM: run npm run dist

The production version of Reduct will be in the dist/ folder, like so:

$ ls dist
7a8f62b47d6afa44523f2b4bfacf0304.png  index.html
7d4e14db6c871b054b74a4c5b2bc2367.js   reduct-redux.js
a18342a55b8501c4686ae638f58cd800.js   reduct-redux.map
d004428b9d33a5c3a235b1f80a1a6641.png  resources

(Remember, resources is a symlink that you created above.)

Now you can copy the contents of this directory to a web server.

Debugging

The password to skip levels in the production version is cornell. You can enable this during development by appending ?nodev to the URL. Conversely, in production, appending ?dev to the URL will enable development mode.

If the build system gets confused and doesn't seem to pick up changes to files, delete the .cache folder in the project directory and try again.

Importing Levels

  1. Go to the chapterutil directory. Make sure you have Python 3 and virtualenv installed.

    MacOS instructions: http://docs.python-guide.org/en/latest/starting/install3/osx/

    Then install virtualenv: pip install virtualenv

  2. Set up chapterutil:

    # All of these must be run IN THE SAME TERMINAL
    virtualenv -p python3 venv
    source venv/bin/activate
    pip install -r requirements.txt
    
  3. Download the sheet from Google Sheets as XSLX.

  4. Create any JSON files for chapters that did not previously exist. (Just copy an existing JSON file and edit its title/name. To preserve continuity of what aliens appear, try to copy the chapter immediately preceding the new chapter.)

  5. Run the following script: bash automate.sh PATH/TO/XLSX/FILE.xlsx. Again, this must be run from the same terminal as previously.

    If you're running this and have previously set it up, run source venv/bin/activate first.

    It might spit out warnings about not being able to import things - this is caused by the rows in the spreadsheet that just contain notes.

Generating Spritesheets

TODO:

You can’t perform that action at this time.