explaingit

alexnisnevich/untrusted

4,652JavaScriptAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A browser puzzle game where you write real JavaScript code to modify the game's own source and help the character escape each level, no installation needed.

Mindmap

mindmap
  root((untrusted))
    What it does
      Puzzle game in browser
      Edit live game code
      Learn JavaScript
    Gameplay
      Grid-based map
      Locked and open code
      API reference panel
    Learning curve
      Starts simple
      Introduces JS concepts
      Progressive difficulty
    Custom content
      Custom levels
      Mods
      Local server
    Tech
      JavaScript
      Browser-based
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Learn JavaScript concepts by solving puzzles where your code changes the game world in real time

USE CASE 2

Play progressively harder levels that introduce new API functions and programming patterns

USE CASE 3

Create and share custom levels using the documented level file format

USE CASE 4

Run the game locally for offline play or to experiment with the source code

Tech stack

JavaScript

Getting it running

Difficulty · easy Time to first run · 5min
Free for non-commercial use with attribution, you can share and adapt it as long as you do not use it commercially and keep the same license.

In plain English

Untrusted is a browser-based puzzle game where the challenge is to write actual JavaScript code to progress through levels. The story follows a character called Dr. Eval who is trapped in a computer world and can only escape by modifying the program that generates his reality. Each level presents you with two things side by side: a grid-based map you navigate as a player character, and the actual JavaScript source code that created that level. Most of the code is locked from editing, but small sections are deliberately left open. Your job is to figure out which parts you can change and what to write there to open a path to the exit. You are not just playing the game, you are editing the game code while it is running. The levels start simple and get progressively more complex, introducing new programming concepts and API functions along the way. You can only use the functions and variables that the game exposes, so part of the challenge is understanding what tools are available to you and what they do. There is a reference panel in the game that lists the available commands. The game runs in a web browser and requires no installation. Developers who want to run it locally can use the included build setup, which merges the source files and optionally starts a local server. There is also support for creating custom levels and mods, documented in the README with details about the level file format. Untrusted was made by Alex Nisnevich and Greg Shuflin. The game and its soundtrack are licensed under Creative Commons Attribution-NonCommercial-ShareAlike, allowing non-commercial use with attribution.

Copy-paste prompts

Prompt 1
I am stuck on an Untrusted level where the exit is blocked. What JavaScript functions does the game expose that can remove obstacles or move the exit, based on the in-game API reference?
Prompt 2
I want to create a custom Untrusted level. Explain the level file format and write me a minimal example where the player must spawn a ladder to reach the exit.
Prompt 3
Walk me through running Untrusted locally by cloning the repo and starting a local server using the included build setup.
Prompt 4
I want to understand which API functions are most useful for solving early Untrusted levels. List the key commands and what each one does.
Open on GitHub → Explain another repo

← alexnisnevich on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.