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.
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!
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
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.
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();
});
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?
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?
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).
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 :-)
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...
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.
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.
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 ...)
This must be resulting in a lot of new gists on GitHub... is it odd that I wish I could sign in with my GitHub account so that the level saves showed up as gists under my name?
This is fun! But I've run into a problem. Advancement past level 14 seems to be bugged; upon completion, the keys in my inventory were replaced with a capital A which I assume to represent the algorithm, but then level 14 reloaded with a message at the bottom saying "You have lost the Algorithm!" Re-completing the level works, but the same thing happens, as many times as I like; the last time, I saw "run 17_pointers.jsx" scroll past, but still got the map and code for level 14.
My solution to level 14 [1] involved a state variable on the me object; could that have broken something?
It does! Thanks, and thanks for a fun, engrossing diversion on a rainy Monday afternoon.
(Update: Each time I enter a level, it loads as level 13, and I have to reset it to get the correct map and code -- just a heads-up in case it helps with debugging. Chrome 33.something, Windows 7 x64.)
Very cool! I'm stuck on level 7 because it seems that the script isn't editable anywhere. Related note, the color scheme for highlighting editable lines might want to change, because "black on dark maroone" doesn't exactly jump out.
Love that you're auto-gisting solutions. That was clever - I presume you are browsing through searching for the common description tag? I also like the API popup, although I didn't see it until I got stuck on the (uneditable) level 7. I verified this because $('.editableLines') ==
[] in console! Perhaps this is a very fancy meta-game that you can only win with a pull request? :)
This took me a bit as well but there is a small bit that is editable, but I agree that it isn't clearly defined, especially when it's only a few characters and not an entire line.
The robot follows my player, unless it's green, in which case it goes 'down' (cause it wont pick up the key under remote control for some reason). I'm saving state in the color of the player.
I broke level 4. Is there an obvious way that I am missing to reset at the level you're on when the reset functionality provided under the text editor is insufficient?
Btw, I should have said first that I love this game idea and myself and my coworkers have been playing it a bit for the last 20 minutes or so.
I broke my game by reassigning the getWidth method to return an invalid value:
map.getWidth = function() { return 1; }
The approach worked with a valid value: ( map.getWidth = function() { return 6; } ) and I beat the level, but I had to replay the previous 3 levels.
Some suggestions (Again, we loved the game!)
- Provide some interface to conveniently index all the solution Gists.
- Provide some way to quickly skip to last level played.
Other thoughts:
- Enjoyed the look, feel, and user interaction.
- The music was great.
- I will keep playing this game. :)
Ah - I see what menu does now. I love this game and have uncovered a few broken game states. This mainly happens when I reassign one of the API methods. Are you interested in user-submitted issues? Let me know; I could email them to you or log them on your GH; whatever is convenient.
I'm not sure what happened with level 4 multiplicity, but I placed a 2nd exit inside the box. Then when I go through it says it completed the level but I'm still on the multiplicity level. Reseting does not fix. https://gist.github.com/anonymous/0dafb64fad2ddd6fd451
A few people have reported a similar bug. I don't think that it's level specific but has something to do with the next level not leading correctly upon completing a level.
We're still not sure why it happens or when (it seems to only affect a few people), but we'll try to figure it out.
There aren't any errors you can see in the JavaScript console, are there?
On level 15, my deaths keep changing the editable window. I'll die and then the last several characters (4 I believe) of my code get swapped to uneditable until I reset.
I'm also encountering a bunch of exceptions during game execution instead of at build, which are making things rather hard to beat. I'd list them but they vanish faster than I can read them.
Does anyone know of a nice way to unlock levels for the mirror?
I'm on the first jQuery one but all I see is black text on a white screen. No players and nothing changes when I use the arrow keys. I can't find anything in the code I can edit either.
I'd like to try the mirror but I don't want to have to play though the whole game again?
Not sure if you noticed this yet or not, but it is possible to comment all code following an allowed block by leaving an open "/*". This allows the player to write their own code to overwrite what should be uneditable.
not sure if you would want to disallow this or not, but i find it allows for some interesting hacky solutions.
One thing it drives home for me is just how distracting music is when I'm trying to code. It pulled up that first listing and I literally could not parse it until I muted the audio. Then it immediately turned back into code.
It's like music just turns off the switch that connects the eyeballs to the brain. Amazing.
Very fun, however once I reached the level with the DOM, I catched the opponent but the game went crazy and submitted a lot of queries to Gist (when I closed the tab, the counter was at 64, and Github was serving 403).
In order to fix that short delay before movement when you hold down a movement direction you should make pressing the arrow keys set a corresponding movement boolean to true. Then just move whenever the boolean is true.
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
Alnis, love the game! But I also ran into unexpected behavior after clearing level 7 (change your color). It kept reloading the same level, but opening up new levels in Level select. Even so, clicking on higher levels keeps reloading the same colors.js screen.
Another weird thing I noticed was that next to the computer and telephone in the inventory, two letters "k" appeared. I'm using Firefox 28 on Windows 7.
You can re-target the teleporters. And several teleporters can target one teleporter. And you can iterate over all teleporters and check where they are. I've said too much.
This level is hard. It took me a while until I found the coords for the transporters I was looking for but in the end I done it :).
tip: find the transporter from the spawn point and the one where the exits is and link them together
Well, the title says you play the game by modifying the game's source. Turns out you don't modify the game's source, you modify specific snippets of code that are provided on the page.
Last weekend I hacked around in the source of various online games, I anticipated this to be a similar experience but was disappointed to find that we weren't supposed to actually change the game's source.
Oh, only level 19 is DOM-based - level 20 and 21 are different. You may have been unable to load correctly them due to the stress on the server, but you should check them out at some point :-)
Yeah, it seems odd that the setPhoneCallback is forbidden in this level, because that solution would fit the sequence of levels very well. Luckily, there are other ways to cross the water, and some other commenters in the thread already hinted at them ;)
Seems this was a combination of my mistake and a bug that you might have fixed in the meantime. I intended to assign the player object to a variable player but made a mistake. The resulting error message was "player.setPhoneCallback not allowed" or something like that, but that was yesterday and with a different browser version (Firefox). Now when I tried to reproduce it, I get "player is not defined", which is much more helpful :)
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.
I actually figured something out with this which is weird, because I don't think it has to do with exceptions. I passed in a new object of an undeclared type and just walked across the water, which I can't explain.
This level was driving me crazy (mostly because of the character limit). The solution that I found is kind of silly: it turns out the removeItem function is dumber than you probably think it is.
A good solution would be to remove an invalid item, and the function should silently try to remove the invalid item, but still allow passage. For some reason, even when you have the green key, but try to remove an invalid item, it still doesn't let you through, despite apparently returning false (passable).
Additionally it doesn't support injection there, so while "player.removeItem('greenKey'); player.additem('greenKey');" should work, it says "TypeError: undefined is not a function".
Basically, this let's you delete the green item once. After that, it makes sure that return true is never reached (because of the 1==1), so next passages through green are allowed. Kinda liked the sneaky (''); myself :P
wow that level took me forever. Ended up using things along the lines of if( me.getX() < 15) {move down then right} elst if me.getX()>15 and < 30 {move up then right} etc.
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.