Any tips for level 9? I can't seem to find a handle on the raft to be able to modify its behaviour directly.
Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
201–210 of 246 posts
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#202Stuck at level 13 :(
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#203Anybody think of another way to do the robot levels without adding any state? https://gist.github.com/db41e069df7bae142248
Variable to control the direction the robot moves, changed with the function phone.
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#204Earlier quoted context omitted.
For the truly lazy, this was my approach: map.overrideKey('up', function() { if (map.countObjects('boss') > 0) { for (var x = 0; x
Nice. Lacks drama though, where's the dash through the rain of bullets to recover the missile launcher? :D
:-)
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#205Earlier quoted context omitted.
Of course. I made them harmless and walked right through them.
Tried that, but for some reason I couldn't disable the onCollision by assigning it to some dummy function. Do you mind sharing your solution?
Okay, I think I've replicated it. I just overrode onCollision with empty braces, so the final definition looked like this:
map.defineObject('attackDrone', {
'type': 'dynamic',
'symbol': 'd',
'color': 'red',
'onCollision': function (player) {
player.killedBy('an attack drone');
},
'behavior': function (me) {
},
'onCollision': function (player) {
}
});
Note that you're closing the game's braces, inserting another definition, then re-opening braces to match the game's closing ones.Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#206Earlier quoted context omitted.
Ah, yes. That's very convenient. I don't see anywhere to edit on level 21, and level select says there's one more...
Hmm, do you notice anything different about the menu now that you're on level 21?
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#207I actually used a "private API" in level 14, crisps contest. https://gist.github.com/anonymous/dacd3f1de73a59b5983e Is this cheating?
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
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#208> "If you can read this, you are cheating! D:" Loaded the site, popped open the Chrome Dev Tools, and was thoroughly disappointed.
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#209> "If you can read this, you are cheating! D:" Loaded the site, popped open the Chrome Dev Tools, and was thoroughly disappointed.
Why were you disappointed?
Last weekend I hacked around in the source of various online games, I anticipated this to be a similar experience but was disappointed to find that we weren't supposed to actually change the game's source.
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#210Any tips on level 15? Once the player is killed what could I possibly do?
I actually figured something out with this which is weird, because I don't think it has to do with exceptions. I passed in a new object of an undeclared type and just walked across the water, which I can't explain. Can anyone help?
player.killedBy(function(){throw new Exception();});
...but then that just means I get killed by "function(){throw new Exception();}".Edit: never mind, got it. Overriding onCollision helps. :)