Giter VIP home page Giter VIP logo

untrusted's Introduction

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)
      • quickValidateCallback: speeds up validation of callback methods at the cost of some security (useful for levels with very many dynamic objects)
      • 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 music.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
  • #START_OF_START_LEVEL# and #END_OF_START_LEVEL# should be the first and last line of the startLevel method, respectively

Adding music

[Coming soon]

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.

untrusted's People

Contributors

agamemnus avatar aharmsen avatar alexnisnevich avatar alexnsolo avatar alexsclim avatar amahdy avatar caitsith2 avatar camel-lot avatar dmazin avatar extrajordanary avatar g1-dt avatar giacgbj avatar ishanv avatar justblackbird avatar lakitas avatar luka-zitnik avatar mdunisch avatar mike-perdide avatar mikespook avatar mingp avatar mrtank avatar pavel-kolesnikov avatar pcat0 avatar phelanharris avatar phoeagon avatar reneeslamka avatar shmulim avatar swphantom avatar urandon avatar xadillax avatar

Watchers

 avatar  avatar

Forkers

kogames

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.