Live data from Hacker News

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

alex.nisnevich.com

181–190 of 246 posts

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

#181
post #179

I actually used a "private API" in level 14, crisps contest. https://gist.github.com/anonymous/dacd3f1de73a59b5983e Is this cheating?

Ooh, good catch! player.pickUpItem should definitely be renamed to player._pickUpItem and not made available to the player.

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

#182
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.

It could be more discrete, eg. an apostrophe every 10 blocks.

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

#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 :)

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

#184
post #179

I 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

#187
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 

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

#188

Any way I can go to a level directly? I was on level 12 but my computer died, and it did not save any progress.

Did you check the menu at ^0?

Ah, they were saved there! Thanks!
Post reply on HN