Untrusted —or— the Continuing Adventures of Dr. Eval is an exciting Meta-JavaScript Adventure Game wherein you guide the dashing, steadfast Dr. Eval through a mysterious MACHINE CONTINUUM, wherein, using only his trusty computer and the TURING-COMPLETE power of JavaScript, he must literally ALTER HIS REALITY in order to find his freedom! You must literally edit and re-execute the very JavaScript running the game in your browser to save Dr. Eval from this dark and confusing reality!
The game presents you with a roguelike-like playing environment and a console window with the JavaScript code generating each level. As loaded, each level is unbeatable, and most of the JavaScript is blocked from editing. The challenge is to open a path to the next level using only the limited tools left open to you.
Run
make
to merge the JavaScript files into scripts/build/untrusted.js
(and enables debug features).
make release
merges and minifies the JavaScript files into scripts/build/untrusted.min.js
(and disables debug features).
To run the game locally, you need to set up a local server to serve index.html
(this step is necessary due to Access-Control-Allow-Origin restrictions).
First install http-server if you haven't already:
npm install http-server
Then run:
make runlocal
Build your own mod in the mods
directory:
make mod=example_mod
To add a new level, create a jsx file in /levels/bonus and add the level filename to the bonusLevels
array in game.js.
If you are adding any new commands that the player can use, make sure to add them to reference.js
.
jsx files are like regular JavaScript files, but have some additional syntax:
#BEGIN_EDITABLE#
and #END_EDITABLE#
surround editable lines#{#
and #}#
wrap editable sections (parts of lines)#BEGIN_PROPERTIES#
and #END_PROPERTIES#
surround the properties object at the start of the file. Available properties include:
commandsIntroduced
: array of new commands introduced in the level (see reference.js
)mapProperties
: optionally contains any of the following:
allowOverwrite
: if true, placed static objects can be overwritten by other objectskeyDelay
: specifies the lag, in milliseconds, between player keystrokes (default: 0)refreshRate
: the refresh rate of the level, in milliseconds (required for dynamic objects with interval
properties to work correctly)showDrawingCanvas
: if true, the drawing canvas overlay is displayedshowDummyDom
: if true, a dummy DOM will be displayed instead of the regular mapmusic
: name of the background track for the level (see sound.js
)startingMessage
: message displayed at the bottom of the screen when the level starts (if any)version
: increase the level version whenever you update a levelnextBonusLevel
: load another level automatically when this one is solved#START_OF_START_LEVEL#
and #END_OF_START_LEVEL#
should be the first and last line of the startLevel
method, respectivelyTo add a new background music track, add an MP3 file (that you have permission to use) to the /music and add a new entry to the tracks
array in sound.js.
Untrusted is a game by Alex Nisnevich and Greg Shuflin.
We'd like to thank:
You can listen to the full soundtrack here.
The music that appears in Untrusted, in order, is:
This work is dual-licensed.