Lurker News

Comments (235) 72 threads

Earlier comments
christiangenco3 replies#
I love this game! Such a cool idea, and very well executed.

My biggest critique so far is that it's extremely hard for me to tell the difference between #311 and #000 for the `.disabled` lines (I'm mildly red-green colorblind). Changing it to #711 fixed it for me, but I can imagine it would be impossible to even see #F11 for certain colorblind individuals. Perhaps some other kind of indication that a line is editable, or a more drastic #FFF/#000 distinction?

resist_futility#
Highlighting the text was really the only way I found some of the edit boxes.
alnis#
This is definitely something we'll work on! I'm sorry that it was difficult to tell which lines were editable. Maybe we should add a contrast slider of some kind?
Natsu1 reply#
That can be solved without changing the colors of anything, BTW :)
Natsu#
I just realized that I misread you and it's too late to edit. You're talking about lines of source code (and I do agree, I was really confused on the level where you can only edit a tiny section of code I missed), whereas I thought you were referring to the lasers puzzle (I just moved the exit for that).
lawl3 replies#
This is fun. But I have one wish. Overwrite console.log() so it logs onto the website and I don't need to open firebug :)

Edit: I think I solved lvl two to four all the same way. Not sure if that's intended. But I also don't want to spoil it for others.
Edit 2: This worked again at lvl 6, so I'll assume that's a bug. Click this pastebin for spoilers: http://pastebin.com/yfhDhE7P

alnis3 replies#
Good catch! We haven't been checking yet for tampering with functions, but we probably should. Don't think of it as a bug so much as a cheatcode you discovered :-)
gizmo6864 replies#
Aww, I thought that was to easy. That trick works for basically any level.

Also, is there a good way to completly prevent tampering with functions, or is this just going to be an arms race?

lawl#
Don't use the functions from the map object, but keep a separate function reference for validation?

I mean if you want to cheat you always can. But that's not the point. Right now you can cheat using official apis.
Just use map._blah() for internal use
By the way: Same trick works for keys.

demallien1 reply#
Object.defineProperty with 'writable' = false?

Continue this thread — 1 reply

TeMPOraL1 reply#
> Also, is there a good way to completly prevent tampering with functions, or is this just going to be an arms race?

Let's hope for an arms race - it will be far more fun and educating at the same time.

Continue this thread — 1 reply

alnis#
I just added a feature to the game that watches certain functions and compares them to what they were at the start of the game (during the level validation phase). I'm sure this can still be gamed though.
zenojevski#
First of all, this is absolutely impressive in concept.

Yes, it's too easy that way:

    map.pO = map.placeObject;
    map.placeObject = function(x, y, w){
        return map.pO(x, y, w=='block'?'empty':w);
    }
Does not even need call. But while you cannot protect from `Function['p'+'rototype']['c'+'all']`, I think using `defineProperty` to stop mucking with the code would go a long way into preventing blatant cheating at little cost. That or enclosed reference funcs.

Btw, you trust the level increment counter before succeeding in loading the level. Right now calls are 503ing, so basically I'm [gisting bogus solutions](https://gist.github.com/anonymous/f1b06d63848d6d013e26) but it's also saving those bogus level ups in localstorage...

lccarrasco#
Does firebug override the ctrl+shift+K javascript console?, curious because I don't use it.
bodyloss#
Also, you can use String.fromCharCode(95) to write a '_' so that you can access the methods on map that start with an underscore
th0br02 replies#
You should reinit the map though, otherwise doing this on level 2 causes funny bugs (and makes the game rather easy ;)

    maze.create = function() {};
    var tmp = map.placeObject;
    map.placeObject = function(x, y, t) {
    	if(t == 'exit') tmp(x,y,t);
    };
untitaker_4 replies#
level 2 can be solved by using the two "unlocked" lines to comment out the whole maze.create call, too.
matsemann#
That's kinda the point, though. Read the comments for that file. ;)
mt3ck#
thanks for the help ;)
randunel#
you don't need 2 lines, you only need the one below to overwrite the map function, and leave an open dot :D

map.placeObject(7,4,'exit');var a = {map: {placeObject:function(){}}};a.

zenojevski#
Related: things like these do not work, because of implementation.

    if (false) // <- inserted by me
    for (var ...) { // <- existing code
        ...code...
    }
Too bad, because extra `for`s could be fun...
alnis#
If you reload the game, the map should now re-init on every level.

PS. I'm really enjoying all the creative solutions you guys are coming up with!

alnis1 reply#
Attention!

The main site is overloaded, but I've set up a mirror at: http://alexnisnevich.github.io/untrusted/
All level-loading issues should be resolved on it, since they were tied to AJAX failures. Let me know if you experience any problems on the mirror site.

someone131 reply#
Thanks for the game! Credits don't load on the mirror - I get a 404 on the AJAX call.
alnis#
Oops, it should work now.

Load more comments