"Untrusted" Browser Meta-javascript game, edit as you play!

Discussion in 'Off Topic' started by NolanSyKinsley, Apr 18, 2014.

  1. NolanSyKinsley

    NolanSyKinsley IRC lurker

    Joined:
    Nov 2, 2012
    Messages:
    497
    Likes Received:
    179
    This is a cool/interesting/challenging browser game I came across, thought some people here would get a kick out of it. I don't really know how to explain it, so I will add the blurb from their gitub:

    http://alexnisnevich.github.io/untrusted/

    Untrusted —or— the Continuing Adventures of Dr. Eval is a Meta-Javascript Adventure Game wherein you guide the dashing, steadfast Dr. Eval through a mysterious MACHINE CONTINUUM, wherein, using only his trusty computer and the TURING-COMPLETE power of Javascript, he must literally ALTER HIS REALITY in order to find his freedom! You must literally edit and re-execute the very Javascript running the game in your browser to save Dr. Eval from this dark and confusing reality!
    Overview

    The game presents you with a roguelike-like playing environment and a console window with the JavaScript code generating each level. As loaded, each level is unbeatable, and most of the JavaScript is blocked from editing. The challenge is to open a path to the next level using only the limited tools left open to you.

    **end**

    Basically the level starts unbeatable, and you have to edit the javascript where allowed to change the level and make it beatable. I don't know much javascript so this is also an interesting learning experience. I have been having a bit of fun with it, would like to see how others handle some of the levels.
     
    Siioh likes this.
  2. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
  3. NolanSyKinsley

    NolanSyKinsley IRC lurker

    Joined:
    Nov 2, 2012
    Messages:
    497
    Likes Received:
    179
    lol, probably, you are thinking a few levels ahead though. It has not added the level checker yet.

    You missed the part at the top that said "four clever characters should be enough to erase all their tricks"

    Here was my solution:
    Code:
    /********************
    * theLongWayOut.js *
    ********************
    *
    * Well, it looks like they're on to us. The path isn't as
    * clear as I thought it'd be. But no matter - four clever
    * characters should be enough to erase all their tricks.
    */
    function startLevel(map) {
    map.placePlayer(7, 5);
    var maze = new ROT.Map.DividedMaze(map.getWidth(), map.getHeight());
    /*
    maze.create( function (x, y, mapValue) {
    // don't write maze over player
    if (map.getPlayer().atLocation(x,y)) {
    return 0;
    }
    else if (mapValue === 1) { //0 is empty space 1 is wall
    map.placeObject(x,y, 'block');
    }
    else {
    map.placeObject(x,y,'empty');
    }
    });
    map.placeObject(map.getWidth()-4, map.getHeight()-4, 'block');
    map.placeObject(map.getWidth()-6, map.getHeight()-4, 'block');
    map.placeObject(map.getWidth()-5, map.getHeight()-5, 'block');
    map.placeObject(map.getWidth()-5, map.getHeight()-3, 'block');
    */
     
     
    map.placeObject(map.getWidth()-5, map.getHeight()-4, 'exit');
    }
    
     
  4. Talons1337

    Talons1337 I am a build team

    Joined:
    Dec 21, 2011
    Messages:
    491
    Likes Received:
    129
    Comments op pls nerf
     
  5. LordXyroz

    LordXyroz *insert ridiculously long title here*

    Joined:
    Feb 25, 2014
    Messages:
    213
    Likes Received:
    30
    lvl 7, lol. And I can't even java!
     
  6. Talons1337

    Talons1337 I am a build team

    Joined:
    Dec 21, 2011
    Messages:
    491
    Likes Received:
    129
    Java != JavaScript and I am offended that you would imply otherwise!
     
  7. LordXyroz

    LordXyroz *insert ridiculously long title here*

    Joined:
    Feb 25, 2014
    Messages:
    213
    Likes Received:
    30
    I don't even understand what != means...
     
  8. Talons1337

    Talons1337 I am a build team

    Joined:
    Dec 21, 2011
    Messages:
    491
    Likes Received:
    129
    Not equal to. =/=, ≠, !=, ~=.
     
  9. Penagwin

    Penagwin Linux Servers are better then windows!

    Joined:
    Feb 10, 2013
    Messages:
    114
    Likes Received:
    45
    ~= is about equal , Same as
     
  10. edabonacci

    edabonacci New Member

    Joined:
    Mar 9, 2014
    Messages:
    21
    Likes Received:
    2
    Those robot levels are a lot like programming turtles...
     
  11. LeiserGeist

    LeiserGeist Gamer, Software Developer

    Joined:
    Oct 26, 2012
    Messages:
    479
    Likes Received:
    116
    This is actually pretty cool. Nice find.
     
  12. NolanSyKinsley

    NolanSyKinsley IRC lurker

    Joined:
    Nov 2, 2012
    Messages:
    497
    Likes Received:
    179

    Yea, I am kinda stuck on the level where you have to pass 12 of them....
     
  13. edabonacci

    edabonacci New Member

    Joined:
    Mar 9, 2014
    Messages:
    21
    Likes Received:
    2
    I just changed the programming so that they follow you until they're just about to get you. It's kinda funny to watch the drones just let you past by.
     
  14. NolanSyKinsley

    NolanSyKinsley IRC lurker

    Joined:
    Nov 2, 2012
    Messages:
    497
    Likes Received:
    179

    I don't know if we are talking about the same level, there are 12 of them in a 3 wide hallway, I have to figure out how to get them all to move to the top and bottom of the hallway so I can pass through the center.
     
  15. edabonacci

    edabonacci New Member

    Joined:
    Mar 9, 2014
    Messages:
    21
    Likes Received:
    2
    Yea, that's the level I'm talking about, I took the moveTowards code and copied it back into the thing with some adjustments. https://gist.github.com/anonymous/11061548
     
  16. Talons1337

    Talons1337 I am a build team

    Joined:
    Dec 21, 2011
    Messages:
    491
    Likes Received:
    129
    Not in lua it's not!
     
  17. LeiserGeist

    LeiserGeist Gamer, Software Developer

    Joined:
    Oct 26, 2012
    Messages:
    479
    Likes Received:
    116
    Well, after forgetting about the game for like a week and then going back to it, managed to beat it. The last level had me stumped quite a bit until I
    looked around in some menus..

    Clever game.