Live data from Hacker News

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

alex.nisnevich.com

231–240 of 246 posts

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

#231

Any tips for level 17? I can't seem to figure out a solution for the teleporters using the getObjectCoords hint that was given

I did it by drawing on the canvas to mark the way. (I'm trying not to spoil it, apologies if this is too vague).

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

#233

Earlier quoted context omitted.

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.

Hmm. Damn.

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

#237

Here's an Iron Man inspired solution for the boss battle :) map.placeObject(map.getWidth()/2, 5, 'block'); //map.placeObject(map.getWidth()/2, 1, 'block'); var player = map.getPlayer(); map.defineObject('missile', { 'type': 'dynamic', 'symbol': '^', 'color': 'blue', 'interval': 100, 'projectile': true, 'behavior': function (me) { me.move('up'); } }); function jericho() { var i; for (i = 3; i

For the truly lazy, this was my approach: map.overrideKey('up', function() { if (map.countObjects('boss') > 0) { for (var x = 0; x

Interesting, probably much simpler than my approach:(I have added a few comments to give a brief explanation:

 	//Math.random = function(){ return false;};
        /* my first Idea was to try and redefine Math.random to always return 0;}
        
    });
    
    //place a row of MagicBlock's aboove the player's starting position
    for(var i =0; i 

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

#238
post #183

Very cool game, thanks :) One minor issue in the API docs: canvasContext.beginPath() Begins drawing a new shape. canvasContext.beginPath(x, y) Sets the end coordinates of a line. this second beginPath should be lineTo, took a minute to debug in level 16 :)

lineTo doesn't work anymore so level 16 is broken :'(

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

#239
I solved the jump/gravity level without having to edit any code, dunno if that's supposed to be possible, but: if you press+hold the UP key, keyboard repeat rate will be fast enough that you "fly", allowing you to cross the gap (and even save yourself if you happen to fall in it).

I also solved the DOM level without editing anything, I just pressed some keys and it transported me to the next level before I even had an idea what was going on.

(im playing on Firefox / Linux, in case that makes a difference)

Oh and thanks for this game, it's EXTREMELY COOL and I had a lot of fun playing it all the way to the credits screen (and I'm going to go back now to see if that's really the last level or not ...)

Post reply on HN