• Stars
    star
    4,571
  • Rank 9,301 (Top 0.2 %)
  • Language
    JavaScript
  • Created over 11 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A meta-JavaScript adventure game by Alex Nisnevich and Greg Shuflin.

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!

Overview

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.

Development

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

Contributing Levels

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.

The .jsx file format

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 objects
      • keyDelay: 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 displayed
      • showDummyDom: if true, a dummy DOM will be displayed instead of the regular map
    • music: 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 level
    • nextBonusLevel: 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, respectively

Adding music

To 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.

Acknowledgements

Untrusted is a game by Alex Nisnevich and Greg Shuflin.

We'd like to thank:

  • Dmitry Mazin for design assistance and for the implementation of multiline editing
  • Jordan Arnesen for playtesting and design of lvl17
  • Natasha Hull-Richter for extensive playtesting and assistance in level design
  • Alex Bolotov, Colin Curtin, Conrad Irwin, Devin C-R, Eugene Evans, Gilbert Hsyu, Jacob Nisnevich, James Silvey, Jason Jiang, Jimmy Hack, Philip Shao, Ryan Fitzgerald, Stephen Liu, Yayoi Ukai, and Yuval Gnessin for playtesting and feedback
  • Ondล™ej ลฝรกra for his rot.js library
  • Marijn Haverbeke for his CodeMirror library
  • Brian Harvey for allowing us to use his likeness in lvl19

Soundtrack

You can listen to the full soundtrack here.

The music that appears in Untrusted, in order, is:

License

This work is dual-licensed.

  • Untrusted and the Untrusted soundtrack are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License (CC-BY-NC-SA 3.0). In other words, you are free to use and modify Untrusted for non-commercial purposes, provided that you credit us and your work is also licensed under CC-BY-NC-SA.
  • Additionally, the Untrusted code without the soundtrack is licenced under a commercial license. This means that you are able to use Untrusted for commercial purposes under some conditions, provided that you do not use any of the music. Please contact us for details.

More Repositories

1

ECMAchine

Lisp-based in-browser toy operating system
JavaScript
189
star
2

synthi-js

A JavaScript emulator of the legendary EMS Synthi A synthesizer.
JavaScript
160
star
3

sentinel

USB rocket launcher + webcam + face tracking = sentinel.py
Python
55
star
4

melody.py

Brute-force generation of ten-note cantus firmus melodies and first species counterpoint
Python
31
star
5

kalevala

Multiplayer tile-laying board game in Elm
Elm
19
star
6

Portfolio

JSON-driven portfolio site with pretty circles
HTML
10
star
7

dcpu16-assembler

JavaScript assembler for the DCPU-16 assembly language in the 0x10c universe
JavaScript
6
star
8

rym-player

Plays top albums from rateyourmusic.com in the terminal using mps-youtube
Ruby
5
star
9

WeatherGrains

Uses granular synthesis to generate music based on weather at different points on the globe. A collaboration with Brien Southward.
JavaScript
5
star
10

glitch_mixer

Mixer and sequencer for minimalist algorithmic compositions
Python
5
star
11

splooshed

JavaScript
4
star
12

phon_rule

Simple LaTeX environment for typesetting phonological rules
TeX
4
star
13

kmeans

Graphical demonstration of k-means algorithm
JavaScript
4
star
14

spotify-genre-features

Scrape feature vectors for 50 songs within each genre on Spotify, output to CSV for analysis
Jupyter Notebook
3
star
15

ld30

Ludum Dare #30: Connected Worlds
JavaScript
3
star
16

diffnow-cli

Command-line interface for comparing files on www.diffnow.com
Shell
3
star
17

foosbot

Office foosball game recorder
Ruby
2
star
18

cosmopolitan

Ruby
2
star
19

music-graphs

Explorations of music influence graphs
Jupyter Notebook
2
star
20

ProblemSetMarmoset

A spin-off of Written Kitten for LaTeX assignments
JavaScript
2
star
21

jezzball3d

old CS 184 final project
C++
2
star
22

urm

Register Machine emulator, based on the four-instruction URM described by Cutland in "Computability"
JavaScript
2
star
23

latex

My LaTeX template for math, CS, and linguistics assignments
1
star
24

dotfiles

dotfiles, configuration files, &c.
Python
1
star
25

asa.li

HTML
1
star
26

dx-search

Diagnosis search.
JavaScript
1
star
27

blog

Jekyll-driven blog
Jupyter Notebook
1
star
28

hp7475a

Plotting utilities and experiments
Python
1
star
29

minecraft_experiments

Lua
1
star
30

FourKingsChess-Client

A multiplayer chaturaji variant with different armies.
JavaScript
1
star
31

calxkcd

XKCD hash algorithm brute-forcer for Berkeley
Python
1
star
32

ld27

10 Second Roguelike
JavaScript
1
star
33

pollex

Ruby wrapper for scraping pollex (the Polynesian Lexicon Project)
Ruby
1
star
34

NotASoul

My entry to Ludum Dare 22
JavaScript
1
star
35

bottles-and-kegs-solver

Prolog program for finding missing numbers in bottles-and-kegs (fizzbuzz) arrangements.
Prolog
1
star
36

gmm

Implementation of EM algorithm for Gaussian Mixture Models in Clojure
Clojure
1
star