Lurker News

Comments (235) 72 threads

alnis4 replies#
Hey guys, one of the developers here.

Thank you all so much for all of your feedback! I never thought this game would become so popular.
It seems that our server is more or less overloaded right now, so AJAX requests for new levels are sometimes failing. This appears to be the cause of the bugs that some of you have experienced where levels load incorrectly or are overwritten by previous levels. Sorry about that. :-/ We will work on making the game more robust in the case of failures like this.
If you want to run the game locally, you can clone it from https://github.com/AlexNisnevich/untrusted and follow the instructions there.

GhotiFish#
welp. it's 100% dead now.

Sorry about that. That's what you get for making something really interesting and posting about it on hacker news.

ihaveqvestion2 replies#
I installed the latest version of this, and of Node, on my Windows computer, and I had to change "~/node_modules" to "./node_modules" in the final line of Makefile (in the "runlocal" target) - the http-server module was installed in the current directory. Otherwise it's working great; thanks!
carver#
Confirmed the same issue on Linux
alnis#
Good catch -- I fixed the Makefile to actually go along with how http-server is installed in the README.
na85#
When I exit level 1 it just re-loads level 1... is this the bug you're referring to?
ajanuary1 reply#
The level files are 503ing, but it looks like the level counter is still incrementing if I go out of the exit and back in again. You might want to add some response code validation in.

    GET http://alex.nisnevich.com/untrusted/levels/10_ambush.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/11_robot.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/12_robotNav.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/13_robotMaze.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/14_crispsContest.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/15_exceptionalCrossing.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/16_lasers.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/17_pointers.jsx 503 (Service Unavailable) jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/19_documentObjectMadness.jsx net::ERR_CONNECTION_REFUSED jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/20_bossFight.jsx net::ERR_CONNECTION_REFUSED jquery.min.js:6
    GET http://alex.nisnevich.com/untrusted/levels/21_endOfTheLine.jsx net::ERR_CONNECTION_REFUSED
alnis1 reply#
Sadly, our server couldn't handle the load.

I've set up a mirror at: http://alexnisnevich.github.io/untrusted/
We're currently working on handling the AJAX responses more robustly. The level counter should no longer increment on a failed request.

Natsu1 reply#
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.

alnis2 replies#
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.

Continue this thread — 2 replies

antimagic2 replies#
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 < map.getWidth() - 3; i++)
        {
        	map.placeObject(i, map.getHeight() - 1, 'missile');
        }
    }
    player.setPhoneCallback(function()
    {
    	jericho();
    });
ryanjshaw2 replies#
For the truly lazy, this was my approach:

    map.overrideKey('up', function() {
        if (map.countObjects('boss') > 0) {
            for (var x = 0; x < map.getWidth(); x++) {
                map.placeObject(x, map.getHeight()-5, 'missile');
            }
        } else {
            map.overrideKey('up', null);
        }
    });
antimagic1 reply#
Nice. Lacks drama though, where's the dash through the rain of bullets to recover the missile launcher? :D
pygy_#
I monkey-patched Math.random() to launch horizontal missiles at the top of the screen and always return 1.

:-)

TheSoftwareGuy#
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.3, but for some reason even though this did effect the dropping of bullets, it didn't stop them completely (if someone could explain this I would really appreciate it*/

    map.defineObject('MagicBlock', {

        'type'         : 'static',
        'symbol'       : '$',
        'color'        : 'magenta',
        'impassable'   : function() { return map.countObjects('boss') >0;}

    });

    //place a row of MagicBlock's aboove the player's starting position
    for(var i =0; i < map.getWidth(); i++)
    	map.placeObject(i, map.getHeight()-5, 'MagicBlock');

    map.defineObject('missile', {
    	'type' 		: 'dynamic',
        'symbol' 	: '^',
        'interval'  : 100,
        'projectile': true,
        'behavior'  : function(me) { me.move('up');},
        'color'		: 'lime'
    	});


    player = map.getPlayer();

    function volley(){
    	for(var i = 0; i < map.getWidth(); i++)
        	map.placeObject(i, map.getHeight()-6, 'missile');
           	map.placeObject(i, map.getHeight()-7, 'missile');
    }


	map.getPlayer().setPhoneCallback(function(){
    	volley();
    });
mgorecki#
I've used their own weapon! :)

for(ii=0;ii<23;ii++){ map.getDynamicObjects()[ii].direction='down'; }
f=function(){ map.placeObject(10, 18, 'bullet'); } map.getPlayer().setPhoneCallback(f);

jpolitz1 reply#
This worked for the whole first chapter for me (and has some obvious further applications):

    startLevel["constructor"]("m",
    "console.log(m);" +
    "var old = m.placeObject;\n" +
    "m.placeObject = function(x,y,t) { \n" +
    "console.log(t);\n" +
    "if (t === 'exit' || t === 'computer') {\n" +
    "console.log('adding' + t);\n" +
    "return old['ca' + 'll'](m, x,y,t) }};")(map);
EDIT: I wonder if you could wrap the user's code in, e.g. https://code.google.com/p/es-lab/wiki/SecureEcmaScript, and use this to gamify finding bugs in that sandbox :-)
jacktoole11 reply#
nice!

similarly,

    var oldPlaceObject = map.placeObject;
    var newPlaceObject = function(x, y, type) {
    	if (type !== 'block') {
        	map.placeObject = oldPlaceObject;
        	map.placeObject(x, y, type);
            map.placeObject = newPlaceObject;
        }
    };
    map.placeObject = newPlaceObject;
was my solution to multiple levels ;).
kybernetikos#
I also had to overwrite the map.verifyXitems (or whatever it was) to return true regardless.

Load more comments