A note: this repository is an old Quanutm Game (2014-2016), no longer maintained. The new one (2019-) is at quantumgame.io.
Quantum Game - play with photons, superposition and entanglement. In your browser! With true quantum mechanics underneath!
It's JavaScript, ES6. To build it you need Node.JS and jspm.io package manager.
It's open for collaboration - from level creation, through interface (re)design and adding additional effects (two-photon interference, interactions with an electron). Interested? Mail pmigdal@gmail.com.
After installing Node.js and jspm.io, and cloning this repository:
Then install local packages.
npm install
jspm install
Additionally, for development we use eslint
with eslint-plugin-lodash
.
A note: jspm is seriously outdated and the build may not work.
Start local HTTP server in the quantum game directory (e.g. by http-server). Does not need an install, as there are pre-built files.
./node_modules/.bin/karma start
Bundle it (and minify, if you want):
jspm bundle-sfx --minify app
It creates a build.js
file. To run it we need a modified index.html
(it is a manually-modified file, stored in bundled/index.html
).
On the server, the structure of files should look as follows:
css\
favicon.ico
build.js
index.html
Alternatively, you can install dependencies using Docker.
docker build .
docker build --build-arg JSPM_GITHUB_AUTH_TOKEN="a_jspm_encrypted_github_token" .
docker run -d -p 80:8080 ${IMAGE_ID_FROM_BUILD}
docker run -d -p 80:8080 spkane/quantum-game:latest
and then open up a web browser and point it to port 80 on your Docker host.