Execute
April 8, 2014 3:12 PM   Subscribe

Untrusted, a game you can't win unless you change it.
posted by kafziel (64 comments total) 55 users marked this as a favorite
 
Uh. I think I broke it.
posted by mr_roboto at 3:16 PM on April 8, 2014


Uh. I think I broke it.
It's javascript. It arrived broke.
posted by Thorzdad at 3:19 PM on April 8, 2014 [6 favorites]


Suppose I don't know any javascript at all- is this something I could work out if I tried? Or is this a game meant for coders only? I got past the first screen by fiddling around but after that I'm baffled.
posted by BuddhaInABucket at 3:19 PM on April 8, 2014


Well, It took me about two and a half hours, and I have only the memories of 101-level programming class ten years ago.
posted by kafziel at 3:24 PM on April 8, 2014


I got myself into an impossible situation in the first level and had to delete cookies to get the original configuration back. After that, it went smoothly....
posted by mr_roboto at 3:39 PM on April 8, 2014


stuck at the multiplication level... hm. this is rad, though.
posted by raihan_ at 3:56 PM on April 8, 2014


I'm no kind of coder, but I'm finding this really entertaining.

And frustrating.
posted by Pecinpah at 4:04 PM on April 8, 2014


raihan_, there are already multiple blocks, only one exit though...
posted by cosmac at 4:05 PM on April 8, 2014


Does the phone only work once, or am I missing something?
posted by Hactar at 4:13 PM on April 8, 2014


I found esc and ctrl and pgdn but I can't find the any key!
posted by chavenet at 4:16 PM on April 8, 2014


When it first showed up, you could go in and directly replace functions, and thereby beat almost all the levels.

So, for example, you'd alter the "put item here" function to always put an exit at the player. Game over.

The version without this requires some more fiddling...
posted by BungaDunga at 4:36 PM on April 8, 2014


Pretty neat that this sort of worked on my iPhone.
posted by oceanjesse at 4:50 PM on April 8, 2014 [1 favorite]


Yeah, another non-programmer here. Does this require knowledge of JavaScript or does it actually teach JavaScript?
posted by zardoz at 4:55 PM on April 8, 2014


Requires knowledge.
posted by Pope Guilty at 4:55 PM on April 8, 2014


i got to the 2nd level and have no real idea or any experience coding javascript - unfortunately, that's as far as i'm going to get without learning some
posted by pyramid termite at 4:59 PM on April 8, 2014


I wrote a lot of code for chapter 2 reassigning map and making a fake map object to handle the function calls. Then realized hover for spoilers. I'm glad both solutions worked though. Makes it more fun than just a "guess the clever trick" puzzle game.
posted by Gary at 5:13 PM on April 8, 2014 [1 favorite]


Check the dev console in chrome for a funny message. Yes, I was desperate on level 8 when I couldn't see thee tiny editable rectangle.
posted by jewzilla at 5:37 PM on April 8, 2014


I think my favorite solutions were level 14 and level 10. I spent too long on level 17, but I'm pleased with the completeness of the result.

The nice thing about Javascript puzzles like this is that I know they were engineered with a solution in mind. If only the ones I created for myself were so kind.
posted by lantius at 6:34 PM on April 8, 2014 [1 favorite]


I got really excited about this on the first level, and thought "Woah, what a great idea for a learning tool!" then I got to the second level, and was like, oh this is actually for programmers.

I think this is a great concept for a game, and I would love to see the difficulty curve toned for complete begginer level entry/learning focus. This is totally something I would spend a lot of time on as a kid, and learn a lot about coding in the process.

I will still do that now - but I'm also a lot smarter and resource savvy than when I was a kid - and I think the difficulty curve on this particular Execution would have turned me away. (But then again, kids are always a lot more savvy than I give them credit for.)
posted by mayonnaises at 6:35 PM on April 8, 2014 [3 favorites]


need a hint for lvl 8. randomly shuffling the forest over and over isn't the way, right?
posted by juv3nal at 6:52 PM on April 8, 2014


oh wait re:jewzilla is there a second edit box?
posted by juv3nal at 6:53 PM on April 8, 2014


lantius, level 14 has a more straightforward solution

juv3nal, that's what I did for 8

any hints for 15?
posted by sineater at 6:53 PM on April 8, 2014


Then realized hover for spoilers.

Omg, spent so long staring at it trying to think of a way to do it in four characters. I just ended up doing what you initially did and moved on.
posted by heathkit at 6:57 PM on April 8, 2014


If you like this, you might like CodeCombat - it's better suited to learning/beginners.
posted by tybeet at 7:00 PM on April 8, 2014 [1 favorite]


think i have a sneakier way to do 8 but haven't had a chance to try yet. close off that line of code with '"]);' within the edit box, then do arbitrary whatever, so long as it ends with something similar.
posted by juv3nal at 7:01 PM on April 8, 2014


juv3nal: first thing I tried, but due to length limits on the editable box you're basically forced to just reshuffle.
posted by Ryvar at 7:10 PM on April 8, 2014


sineater: For 15, what arguments could make the method call fail?
(one solution)

Also, several of the later levels are much easier if you hover for spoiler. You think that's air you're breathing, Neo?
posted by lantius at 7:39 PM on April 8, 2014 [1 favorite]


Yeah, that spoiler puts things on super easy mode in a lot of levels.
posted by jason_steakums at 7:44 PM on April 8, 2014


need a hint for lvl 8. randomly shuffling the forest over and over isn't the way, right?

Well, hover for spoilers.
posted by kafziel at 7:49 PM on April 8, 2014


sineater: For 15, what arguments could make the method call fail?
(one solution)


That's one way. This is how I did it.
posted by kafziel at 7:56 PM on April 8, 2014


Bedtime arrived before I got too far into this, but I'm loving the first few levels.
posted by postcommunism at 7:56 PM on April 8, 2014


I found a simpler Level 10 solution... heehee.
posted by yaymukund at 8:04 PM on April 8, 2014


Can anyone please tell me why I can not call

var oy = object.getY();

in lvl 9? It'll return that objectgetY() is not a function, yet the API states that it is.
posted by nostrada at 8:44 PM on April 8, 2014


I could get by without really understanding JavaScript until level 10. Now I'm gonna need to learn something about JavaScript.
posted by mr_roboto at 8:48 PM on April 8, 2014




Can anyone please tell me why I can not call

var oy = object.getY();

in lvl 9? It'll return that objectgetY() is not a function, yet the API states that it is.


I don't think you really need it for that level, but if 'object.whatevs()' is in the API, it means it whatevs() is a function of objects generally but just typing 'object.whatevs()' isnt going to do anything unless you already somehow (exceedingly unlikely) have an object named 'object'

to use it normally, you might go 'var player = map.getPlayer();' (which retrieves the player object and stores it in the variable name 'player' ) then 'player.getY();' would stand a chance of doing something.
posted by juv3nal at 9:00 PM on April 8, 2014


Got it:, I have to do a

var object=map.getObjectTypeAt(x,y)

first . . . . Sigh
posted by nostrada at 9:01 PM on April 8, 2014


Oh this is hard. Thanks juv3nal. The old gears are turning in my head. It has been nearly 30 years since I learned and used COBOL and C.
posted by nostrada at 9:35 PM on April 8, 2014


So on the first level I could just edit in the box. On the second it was read only so despite several possibilities I was stuck. So clearly I am missing something (and give up easy but I had a baby on me making typing hard anyway ...)
posted by R343L at 9:53 PM on April 8, 2014


So on the first level I could just edit in the box. On the second it was read only so despite several possibilities I was stuck. So clearly I am missing something (and give up easy but I had a baby on me making typing hard anyway ...)

The second level is not read-only. Anything that's black, you can write in, even make new lines most of the time.
posted by kafziel at 10:50 PM on April 8, 2014


R343L: "So on the first level I could just edit in the box. On the second it was read only so despite several possibilities I was stuck. So clearly I am missing something (and give up easy but I had a baby on me making typing hard anyway ...)"

I believe the point of the second level is that you wrap the whole thing in an 'if false' statement, and none of the maze generates. It's a mindbending in that you're essentially introducing terrible programmer errors.
posted by pwnguin at 11:03 PM on April 8, 2014


There's code that checks if you've been modifying functions (at least, in the map object), but there's a simple way of overcoming the tamper checks.

It guess it says something about me that I find breaking the security checks more fun than solving the game the "right" way
posted by destrius at 11:09 PM on April 8, 2014 [1 favorite]



I believe the point of the second level is that you wrap the whole thing in an 'if false' statement, and none of the maze generates. It's a mindbending in that you're essentially introducing terrible programmer errors.


naw, you can just wrap it in comment marks: "four clever characters should be enough to erase all their tricks."
posted by juv3nal at 11:23 PM on April 8, 2014


I believe the point of the second level is that you wrap the whole thing in an 'if false' statement, and none of the maze generates. It's a mindbending in that you're essentially introducing terrible programmer errors.

Ohhhh. I just moved the exit.
posted by kafziel at 11:31 PM on April 8, 2014 [1 favorite]


Is level 19 functional? All I get is a blank map box and an uneditable program.
posted by fragmede at 11:31 PM on April 8, 2014


On level 19 I had something that had something with boxes that briefly appeared and then disappeared when I tried to move, and I haven't managed to get it back. I think that level might be genuinely buggy.
posted by RobotHero at 11:42 PM on April 8, 2014


@fragmede lvl19 uses some new web technologies that may not work in all browsers. If it doesn't render anything for you, just keep pressing the Up key, and you will soon be taken to the next level.
posted by AlexNisnevich at 12:03 AM on April 9, 2014 [2 favorites]


I believe the point of the second level is that you wrap the whole thing in an 'if false' statement, and none of the maze generates. It's a mindbending in that you're essentially introducing terrible programmer errors.

Ohhhh. I just moved the exit.


And I commented everything out.
posted by Ned G at 2:09 AM on April 9, 2014


This was really fun, thanks! I appreciate all the aesthetic touches and attention to detail in the game.

Also, Alex, welcome to Metafilter :)

By the way, levels 18 and 19 seemed broken for me too, in that I could beat both without editing the program at all... (using Chrome)
posted by caaaaaam at 3:16 AM on April 9, 2014


Love this. Thank you!
posted by ElDiabloConQueso at 10:52 AM on April 9, 2014


Alex, thanks for the tip, and thanks to you, Greg and everyone else involved for such an awesome game!
posted by fragmede at 11:08 AM on April 9, 2014


I seem have the habit of discovering simple solutions in the midst of writing elaborate hacks, and then ultimately being too lazy to change it. There will be a reckoning if anyone ever reads my solutions on that github repo.
posted by tybeet at 11:24 AM on April 9, 2014 [1 favorite]


This is a fun game, but I get out of my depth on level 12; I try to write a JavaScript loop and it doesn't behave as I'd expect. I likely doing something wrong but can't debug it well enough.
posted by caphector at 2:15 PM on April 9, 2014


How do I get started on this? I have no idea, and I'm not sure whether it's because I'm wrapped in anti-scripting charms or whether I'm supposed to do something like edit files on GitHub or whatever.
posted by Joe in Australia at 3:03 PM on April 9, 2014


This is a fun game, but I get out of my depth on level 12; I try to write a JavaScript loop and it doesn't behave as I'd expect. I likely doing something wrong but can't debug it well enough.

The robot can only do one thing per turn. Weirdly enough, that also seemed to include declaring variables, though I saw a solution pretty much identical to mine on github that presumably worked. I can't into javascript.
posted by Valued Customer at 4:40 PM on April 9, 2014


Joe in Australia: "How do I get started on this? I have no idea, and I'm not sure whether it's because I'm wrapped in anti-scripting charms or whether I'm supposed to do something like edit files on GitHub or whatever."

Click the ASCII box and move with WASD or arrow keys. Move the @ onto the other thing, and go from there.
posted by tybeet at 5:13 PM on April 9, 2014 [1 favorite]


This was an absolute hoot. I managed to do it all without going outside the general bounds of the thing. I did open the console a few times but only to see if there were any javascript errors in there... nope, just my crap code!

The maze where one row was always more than one character high (level 13) got me for the longest... you can't just use the old "turn right whenever you can" trick! My solution was pretty suboptimal but somehow I made it. If you have a really good one, can I see?

My big piece of advice is to use ad hoc properties on global objects for data storage (e.g. map.foo = 1). Otherwise you'll be scratching your head as things go out of scope.
posted by rouftop at 8:38 PM on April 9, 2014


For the second and third robots I used map.getPlayer() and player.getY() as a way to manually switch between two different modes for the robot.

I did a similar thing years ago playing Robot Odyssey. Fairly early in the game you got a crystal sensor and a crystal, so I would wire something up to the crystal sensor and then take the crystal out of the room when I wanted the robot to change behaviours.
posted by RobotHero at 9:22 PM on April 9, 2014


@rouftop: for some reason I didn't let myself use that trick. Instead, I kept state by changing the color of the player. Tedious, but, er, colorful, I guess.
posted by mikewebkist at 6:09 AM on April 10, 2014


rouftop, I just made it follow the walls (link to my solution). It's certainly not optimal, but given the characteristics of the generated mazes (no wall islands) I think it's complete.
posted by caaaaaam at 12:28 PM on April 10, 2014 [1 favorite]


That's probably better. I told it to move down when it could and right when it couldn't, and then kept hitting Execute until the randomly generated maze was one it could get through that way.
posted by kafziel at 1:00 PM on April 10, 2014


Perhaps there's a javascript issue with one of my browser plugins. Being a programmer the "four characters" bit was obvious but I couldn't type them in several "good" locations ...
posted by R343L at 6:50 PM on April 10, 2014


My solution was to change the barrier so I could walk through it, but that's cheating.
posted by destrius at 9:33 PM on April 10, 2014


Following the walls is great.

My favorite solution to any puzzle was on the HN thread. Somebody monkey-patched Math.random to fire missiles at the bosses. Much better than making a Rambo dash for the phone!
posted by rouftop at 11:13 PM on April 10, 2014 [1 favorite]


I'm just waiting for someone to patch an entire new game into the game, if it hasn't been done already.
posted by jason_steakums at 7:19 AM on April 11, 2014


« Older Screw weight loss. I want to be able to benchpress...   |   Acronymphomaniac, Banned Book Betty and the Thing... Newer »


This thread has been archived and is closed to new comments