Earlier quoted context omitted.
Is there anything else you could modify to change what the raft does?
Yes...but I can't do it at an intelligent time.
Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
91–100 of 246 posts
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#92Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#93I reach level 60, says the counter(just because the game buged after i try to clear level 6): http://imgur.com/ty9JlXz .
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#94 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_REFUSEDRe: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#95This 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
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 :-)
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...
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#96Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#97This 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.…
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 ;).
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#98Thank 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.
Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#99Re: Show HN: Untrusted, a JavaScript adventure game you play by modifying its source
#100Earlier quoted context omitted.
I made a wall to circle around the drone. Pretty fun.
I found it easier to make myself invincible. map.getPlayer().killedBy = function() {}; Drone just follows you around like harmless puppy. https://gist.github.com/anonymous/dfb6822e683ea7418ea8