A html point and click classic inspired by Thimbleweed Park and the development blog of that game. A playable version can be found here.
Some magic with promises is used to be able to create intuitive, synchronous-like scripts. This means that - if desired - you can let the script wait until an action of an object is completed before starting the next.
For example, a script to let an Actor move perpetually pace back and forth you would write:
while (true) {
await actor.moveRelative({ x: 50, y: 0});
await actor.moveRelative({ x: -50, y: 0});
}
With this method, the second call to moveRelative()
will occur after the first move has been completely executed.
You will need a local webserver as the code will fetch json files from its own directories. This is not possible without a webserver as you will run into a "Not allowed to load local resources error"
on modern browsers.
First, clone the repo. It's all plain vanilla javascript.
If you have python installed, navigate to the /src/public directory and run:
$ python -m http.server 8000
Then you can access the game at http://0.0.0.0:8000
Navigate to the root of the repo and install the dependencies:
$ npm install
Run the server:
$ node src/static-server-app.js
You can access the game at http://127.0.0.1:3000
At the moment only Safari and Chrome on desktop have been tested.