Untrusted – a user JavaScript adventure game
alexnisnevich.github.io
alexnisnevich.github.io
It's really exciting to see that there's still interest in this little game Greg and I made all those years ago!
I wrote up a postmortem on Untrusted back in 2014 that may be of interest if you'd like to learn more about how the game was created: http://alex.nisnevich.com/blog/2014/10/17/some_words_on_untr...
I'm happy to answer questions and help anyone's who's stuck and needs a hint, but it seems like the HN community has already been doing a good job of the latter :-)
I'm still experimenting with the fascinating intersection of code, games, and language. Here's the latest thing I'm working on in the area (albeit in a very different vein, and still very much a work-in-progress): http://app.wordbots.io/
Alex
P.S. I though I'd end with a shout-out to some super-cool games by other people that have been inspired by Untrusted: - INJECTION by TOASTEngineer: https://schilcote.itch.io/injection - Programmer Adventure (interface in Russian): https://programmeradventure.github.io/
For example, this was my Level 12 solution:
https://gist.github.com/Untrusted-Game/d0f0e7493b39d109a5fe9...
You are supposed to program a robot to traverse a maze, but instead I just ended the robot's function so I could get access to the main scope and do whatever I want:
}
});
map.placeObject(map.getWidth() - 2, 20, 'greenKey');
map.placeObject(map.getWidth() - 1, map.getHeight() - 1, 'exit');
var tmp = map._endOfStartLevelReached
//Needed so the rest of the function is ignored
map = {
"defineObject": () => {},
"getWidth": () => {},
"getHeight": () => {},
"placeObject": () => {},
"_endOfStartLevelReached": tmp
};
map.defineObject('robot2', {
'behavior': function (me) {
}
});
I hope they don't fix this though, it was exhilarating (and rewarding) trying to outsmart the game map._endOfStartLevelReached();
return;Also nifty idea to post the solutions as public gists: https://gist.github.com/Untrusted-Game
[1] https://gist.github.com/Untrusted-Game/70038d1464d11ac270466...
Reminds me of the good days of "find the next level" games where the clue could be in an image metadata or just about anything (modern CTF are on a whole other level).
Fun fact - in Chip's Challenge, the green key could be reused forever while the other keys were one time use
[1] https://store.steampowered.com/app/348300/Chips_Challenge_2/
I wonder if playing this kind of game could be used in an interview setting.
Also, I like the cheating message that you get in the Chromium console (unfortunately it doesn't seem to work in Firefox). :-)
Good diversion, I'm on level 14.
Mine was to bypass the maze solving completely by instead breaking out of the function scope to declare a global direction variable that lets the phone toggle the direction of the robot, then just press R to take a step in the chosen direction ;) Stupid? Elegant? Rule-breaking? You decide...
https://gist.github.com/Untrusted-Game/ba346481d41ce8576d21e...
There is a local variable for the player, so getting the robot to move towards your x-position solves most of the mazes.
I would be grateful for suggestions, ty.
It's been discussed on HN twice:
PS. No you don't, it seems to have lost the original gist but I recreated my solution here: https://gist.github.com/Untrusted-Game/6971dbb8ac6d311989edf...
And, yes, I know I said < 10 == 0... that was a typo originally and it turned out not to matter.