144 comments

[ 3.2 ms ] story [ 276 ms ] thread
Still trying to figure out what exactly this is, but it's totally addictive. Which is odd.
It's a skinner box disguised as a game.
If you remove the skinner box from almost any game, you have very little left.
Sorry, but you are playing some really shitty games, then.
You have a movie, perhaps.
Play automatically:

  setInterval(function(){ $("a").click() }, 100)
(Edit: Yes, this leads you through a very fast, very bad life. Play manually and have a better life.)
I think you missed the point here, but nice trick :-)
I got the point, curiosity just got the better of me
I don't know, if you use this hack to get through life, you end up dying after a bitter, troubled life, having never created anything - you are always hitting 'buy more stuff' instead.

Hmm...

(comment deleted)
Drowning in problems? Automation is the solution ;)
Hilariously, this gets stuck buying "Stuff" over and over and doesn't seem to ever complete the game
For me it ended in my death, with no hope left. It might be a slight timing problem (e.g. play around with the interval and see what happens)
I died with hope!!

Also, I noticed that something compounded to solve if you had more of them, notably stress. When you only had 1, it was instantaneous to solve. If you had more than one, the percent counter took time

Noticed that too - thought it was pretty significant.
It is appropriate that relying on a static heuristic to point one's path leaves you unfulfilled, bitter, and dead.
I wasn't aware that clicking different things in different orders affected the outcome. I have just been clicking solve every time it comes up and not reading the captions.
So now stop a bit. Reread what you wrote, think about what you did and the outcome. Harrowing isn't it?
I interpret that as Stuff gets in the way of life. Interesting, i wounder if he designed it that way or it just kind of happened.
Seriously?

  window.setInterval(function(){ Array.prototype.forEach.call(document.querySelectorAll('a'),function(i) {i.dispatchEvent(event)})},1000);
I was going for quick and dirty. $(foo).click() was available so why not use it?
It was a joke...
Kinda. I use jQuery when it makes sense, and when I'm working on someone else's dime and time. Use vanilla JS for stuff like this, because why lose an opportunity to learn?
(comment deleted)
nope, that wont work at all. Even if you add jquery manually, this won't work at all. The correct one should be

  fireEvent = function(element){
   var event; // The custom event that will be created

    if (document.createEvent) {
    event = document.createEvent("HTMLEvents");
    event.initEvent("click", true, true);
    } else {
    event = document.createEventObject();
    event.eventType = "click";
    }

    event.eventName = "name-of-custom-event";

    if (document.createEvent) {
    element.dispatchEvent(event);
    } else {
    element.fireEvent("on" + event.eventType, event);
    }
  }

  setInterval(function(){
     Array.prototype.forEach.call(document.querySelectorAll('a'),function(d){
      fireEvent(d);
     })
  }, 1000);
(comment deleted)
Quick to call someone stupid, aren't we? Did you even try his code? Go try it. Just because a site doesn't have jQuery, doesn't mean $ isn't assigned to anything.
Pretty sure cturhan did try jffry's code and that's why he wrote this code. The $ var on the page only returns the first instance that it matches so his code doesn't work.

A less efficient but shorter way is:

    var interval = setInterval(function(){
    	var links = document.querySelectorAll('#problems a');
    	for(var z =0; z< links.length; z++) {
    		$('#'+links[z].id).click();
    	}
    }, 1000);

Also he never called him stupid he simply informed him that it didn't work.
You're right, sorry - it was the supercilious tone I objected to. In fact $() returns the first element and clicks it. Because it's in a setInterval, it continues to click the first <a> it finds every 100ms. Did you try it?
Actually the oneliner does work. (Although it throws error when a is not found.)

A quick fix would be setInterval(function(){ $("a") && $("a").click() }, 100)

The first thing I did after figuring out how the game works was typing this:

setInterval(function({[].slice.call(document.querySelectorAll("a")).forEach(function(a){a.click()})},100)

It feels great to know there are some more people who think of automating first, a better life second =)

this version of the script gets you through the game: https://github.com/jaeh/willyoudrown/blob/master/willyoudrow...

i am also thinking about writing some ifs into it that allow you to focus on "friends", "happy buddha", "people person", "wisdom", "early death" and maybe some other criteria, but that needs user interface and more time, which i dont have today ;)

This code:

  setInterval(function(){ $("a").click() }, 1000)
leads to a very long life.

Since "You need to learn." is at the bottom of task list, with 1s delay it never gets attention, so you don't learn, so you don't age.

Here's what I've got:

  You have:
  Hope
  Body
  Life
  Love
  309 Memory
  Integrity
  Job
  180 Experience
  53 Friend
  4 Respect
  216 Stuff
  102 Broken Heart
  6 Stress
  Knowledge
  Lover

  You are troubled. [Can't afford] -Integrity -Lost Ambition
At some point this became depressant for me, but interesting concept.
hmm. I think I'm gonna go look at kittens
There definitely needs to be a "You need to look at kittens" action there, which randomly gives you one of -Stress or +Memory
I would like to see a cat version of the game. There could be specific outcomes, e.g. if you don't want to end up de-balled/hysterectomied then you can be an alley cat and live a shorter life that may be harsher. Alternatively you could go for the cosy life by purring lots.
Depressing, but interesting. I find it interesting that even before you have a life, you start out with hope. What does that mean, I wonder? Hope of your parents? Society (for that "someone" who will make a difference)?
I spent a while looking, but I'm pretty sure there's no actual game there.
My favorite twist in there is how little "creating" you are pushed to do...
Written in Dart.

Can anyone familiar with Dart to JS explain what is going on with:

  var B=new dart
  delete B.x
  var C=new dart
  delete C.x
  ...
(comment deleted)
In JavaScript every object is basically a hashtable. In order to get acceptable performance JS engines build type descriptions ("hidden classes" or sometimes just "maps") behind your back. That is, if you create a JS object (hashtable) with fields `x` and `y` it will create a hidden class with those two fields. This way it can access the fields efficiently. See http://mrale.ph for much more information on JS engines.

These hidden classes are built on the fly: say you add `x` to a instance to get an object with a configuration that was never seen before. In that case, the engine creates a new description with that new field and remembers the transition (so that further objects with similar configurations can reuse the same hidden class).

Keeping track of these hidden classes takes time and space. If you actually use the JS object as a hashtable, then there will be lots of unnecessary hidden classes, that will never be used again. However, there is a trick to tell the engine that an object is actually a hashtable (and shouldn't be optimized as if it was an instance of a class): when deleting a field from an object v8 (and probably all other engines) assume that the object is used as a hashtable and don't create these hidden classes anymore.

Dart2js uses this trick to avoid this cost some important big hashtables (`B`, `C`, ...).

I thought it was stupid. Turned out to be slightly profound. I enjoyed that.
What a simple and profound game....

I hope Notch is feeling ok.

Given the fairly nihilistic ending ( You are dead, you are forgotten, there is nothing. ), I sure hope he's OK.
That's the ending everyone gets, eventually.
I didn't, I quit, I play life by my own rules.
:) Indeed, until you eventually arrive at the same end we all do.
The only winning move is not to play
Don't waste the journey.
(shit, sorry for the accidental downvote, was meant to be an upvote ..)
There is nothing to do on an iPhone it seems.
End up going in circles at one point because I didn't realize I had any integrity. Similar to life indeed.
Same here. I just replayed it and realized I didn't notice when exactly I got it. I had to play it for a third time to see the exact point. It made me go: "oh".

Brilliant.

can you explain? i can't understand what 'integrity' means for a toddler to get, and why would it cost knowledge.
I think it's more the fact that this one is "hidden" in the beginning than anything else, but there are possible rationalizations one might conjecture as to why at that age.
You just keep clicking on whatever links show up? I'm not catching the spark.

But it reminds me of A Dark Room, which was excellent. http://adarkroom.doublespeakgames.com/

It has potential, but I had a hard time relating to my character. I need a lover as a teenager? And 2 broken hearts to stop being a teenager? And the only way to get experience is by losing friends.
At the point where I was farming friends solely so I could convert them into experience, I started questioning myself.
ages may differ but our stories are all so similar maybe the age isn't what matters.

"And 2 broken hearts to stop being a teenager? And the only way to get experience is by losing friends."

i'm not sure i directly relate to this either, but it really doesn't sound too crazy or unfamiliar.

I guess it means that moving on usually requires leaving friends behind, and not that experience requires some kind of drama or even explicit un-friending. But the presentation makes it seem like losing friends causes gaining experience instead of the other way around.
Is the game deeper as it seems on the first playthrough?

Are there any harder to reach options, like having children or reaching old age?

edit: I looked in source, there are no hidden options, you will get everything on the first playthrough.

From a personal revelation about his late father:

http://notch.tumblr.com/post/37823268132/i-love-you-dad

I remember that story and it kind of remained with me. As soon as I saw the title of the "game" I recalled this part of this story:

> ... turn around, see my dad being really close to the dog when all of the sudden a big chunk of ice around him breaks loose, tips over, and my dad falls in. I freak out. Then he stands up, the water only reaching about hip height.

I urge you to read the whole story.

Wow. This really struck me - what an incredible piece of art. Thank you notch, for helping me to spend some time this morning reflecting on how I want to live my life.
After about 5 minutes, this just reminded me too much of real life and I couldn't take it anymore. As in no matter what you do, it doesn't work out... very profound.
Does this http://game.notch.net/drowning/packages/browser/dart.js actually run Dart? The home page looks like it has Dart scripts on a web page, but actually it does not?
No, that script looks for scripts of type "application/dart" in the page and then tries to find a compiled-to-JavaScript version of any scripts it finds by appending ".js" to them.

It looks like the actual Dart file hasn't been uploaded - which is sensible, in a way, since browsers don't natively supports Dart right now, with the exception of Dartium (?).

As long as you relax, make love and create, you will live forever.

Thats the message I got from it. Beautiful.

I loved that this required no instructions. Really beautiful.
Cute presentation of his thoughts. Not a very fun game though.
What if you're Plato or Aristotle? Presumably then you never get forgotten.
Given that 'You are forgotten.' takes a long time to 'solve,' it could be a reflection that even the greatest will eventually be forgotten. (Say, if the human race manages to survive millions of years, and colonizes different planets light-years away.)