Live data from Hacker News

Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

alex.nisnevich.com

211–220 of 246 posts

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#211

Any tips on level 15? Once the player is killed what could I possibly do?

I can't figure it out either; i know that if you raise an exception in the area you can edit, it gets caught a few levels up where the toString representation of whatever you threw is parsed into status update info, with newlines interpreted correctly. But after that, even if you input chars that could build a bridge, it's not persisted to the next attempt :/

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#213

Earlier quoted context omitted.

I completely cheated (added an extra key by setting a trace in the console) because I looked for an editable line for about 10 minutes and couldn't find it. Solved it now by changing greenKey to theAlgorithm

Could you explain how you would do this? There doesn't seem to be an editable line, what's the trick?

Yep the line itself is not editable but the string argument to player.removeItem is editable.

The code as given:

    player.removeItem('greenKey');
My "solution": Append the following text at the end of greenKey:

    ');player.pickUpItem('greenKey','
Final code:

    player.removeItem('greenKey');player.pickUpItem('greenKey','');
But currently this hack no longer works.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#214

Any tips on level 15? Once the player is killed what could I possibly do?

I can't figure it out either; i know that if you raise an exception in the area you can edit, it gets caught a few levels up where the toString representation of whatever you threw is parsed into status update info, with newlines interpreted correctly. But after that, even if you input chars that could build a bridge, it's not persisted to the next attempt :/

After a lot of trial, error, and attempted code injection, I found that it was much easier than I had expected. It can in fact be solved with a single character.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#215

Anybody think of another way to do the robot levels without adding any state? https://gist.github.com/db41e069df7bae142248

This was mine:

    var r = Math.random();
    me.move(
      r 
Works eventually :)

For level 13 I just used:

    me.move(Math.random() > 0.5 ? 'right' : 'down');
And regenerated the map until I got to one that could be solved by moving only right and down.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#216
On level 15, my deaths keep changing the editable window. I'll die and then the last several characters (4 I believe) of my code get swapped to uneditable until I reset.

I'm also encountering a bunch of exceptions during game execution instead of at build, which are making things rather hard to beat. I'd list them but they vanish faster than I can read them.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#217
post #164
post #162

Earlier quoted context omitted.

Thanks for the fun game! Could you possibly help us by putting in a ruler that marks the map coordinates? Yes, I can read the code to find where things are (or count), but there were a few times where it was somewhat inconvenient.

Thanks for the feedback! We've been thinking about doing that, but the challenge is making it inconspicuous enough to not clash with our minimalist aesthetic.

You could just display the coordinates that are currently under the mouse. Adding two changing numbers to the statusbar is fairly minimalist.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#218
post #38

I'm not sure what happened with level 4 multiplicity, but I placed a 2nd exit inside the box. Then when I go through it says it completed the level but I'm still on the multiplicity level. Reseting does not fix. https://gist.github.com/anonymous/0dafb64fad2ddd6fd451

valgaze: your comment is not visible unless a user has showdead turned on.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#219

Level 5 should have more mines. With only 75, the level is easily solved via https://en.wikipedia.org/wiki/Big_sky_theory

Why, it's not about the number of mines, so long as there's a path, it's very easy to solve. The number of mines is irrelevant.

Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source

#220
post #150

Earlier quoted context omitted.

This level was driving me crazy (mostly because of the character limit). The solution that I found is kind of silly: it turns out the removeItem function is dumber than you probably think it is.

A good solution would be to remove an invalid item, and the function should silently try to remove the invalid item, but still allow passage. For some reason, even when you have the green key, but try to remove an invalid item, it still doesn't let you through, despite apparently returning false (passable). Additionally it doesn't support injection there, so while "player.removeItem('greenKey'); player.additem('green…

I thought https://gist.github.com/anonymous/cfe03f2ddb0052b38081 was kind of neat, as you still have to solve the puzzle a bit after using it.
Post reply on HN