Hacker News new | past | comments | ask | show | jobs | submit login
Swarmation: like musical chairs for pixels (swarmation.com)
208 points by mcantelon on Aug 29, 2010 | hide | past | favorite | 73 comments



You really should make it clearer that this is against other humans. When I saw the page, I thought the other pixels were just automatons. Even when I saw some forming letters in the corner, I just thought “interesting, some of them are programmed to not participate”. And I thought moving around was pointless because I couldn’t predict where the computer would move its pixels, so I had no idea how to get into position but to just stand there. It was only by reading these comments that I realized that the other pixels were other players, which increased my enjoyment of the game immensely because of the feeling of cooperation with others, and the understanding of why the other pixels act the way they do.


I'm embarrassed by how proud this made me: http://i.imgur.com/QtIfy.png


I was about to give up and call it "boring" until I read this comment!


against or with?


Sabateours spring to mind. They stay in place right til the end and then move one pixel away. Aaaaaargh!


Those aren't saboteurs… I believe scoring is done on the client side so they got the point and are rushing to do the next shape.

They either need to do scoring server side, or there needs to be some sort of locking.


I’m actually quite proud of having implemented the scoring client-side. It helps keep the load on the server down. Looking up all possible formations is somewhat computationally intensive.

It does create some problems when some clients have high latency and don't detect the formation in time, but I think it's fixable. One way could be to make the computation redundant, e.g. get three pixels to do the detection instead of one, and consider the formation valid if 2 out of 3 of them report success.


Don't get me wrong. I totally agree that you made the right choice, especially for the node knockout.

This might be completely over the top but perhaps you should look into lag compensation technique that FPS games use. There is a global state on the server and the clients send their command with a timestamp. The server then looks at the global state XXXms ago.

You're going to need global state and scoring if you ever want a leaderboard (otherwise people will just game it).

You could also just make it so that it doesn't show the clock during the last three seconds or something. Show "calculating..." or something and give people whatever the greatest lag time is grace period.

Anyway, great game. You got my vote.


Verifying that a pixel is valid is much, much, much less intensive than searching for all possible valid pixels. You could do the scoring client-side, with the server verifying.


That wouldn't take care of a formation not being detected because the pixel responsible for it has very high latency or is disconnecting. I think this kind of false negative is a much bigger issue than the false positives.


Well, maybe. Part of the fun for me was the discovery that it was other people with whom I was playing.


I'm sorry, but really? It was obvious to me within 5 seconds that I was playing with humans.


it'd be super awesome if you could vote for us in the node knockout competition http://nodeknockout.com/teams/saber-tooth-moose-lion

thanks !


Thanks for all the feedback. This was my entry in the Node knockout competition, along with @ollerac and @steadicat. This app was built using the awesome sockets.io library which made it simple to send realtime messages without dealing with cross-browser compatibility issues. Really the server's only job is to pass messages back and forth between the clients, who do all the work of detecting the formations and updating the other players when they move.


Really happy to see socket.io working for you guys. As someone mentioned, not only should it enable WebSocket for Firefox, but also IE6-8, iPad, iPhone, Android, WebOS, Safari 3, and others (even if connected through cross-domain)

Some other projects from the knockout leveraging it:

http://swarmation.com

http://maprejuice.com/

http://demiox-boiko.no.de/

http://piston-hurricane.no.de/

http://nodelicious.no.de/

http://virtual-design.no.de/

http://inflatable-chum.no.de/

http://fragnut.me/

http://braintree.no.de/

http://nodty.no.de/

http://tweetquestgame.com

http://speedo.no.de/

http://piratetron.com/

http://error-500.no.de



What I find amazing is how much fun people are having with it despite the fact that we had no idea what the game mechanics would be until the last minute.

We basically started with a board of pixels, and everything else just evolved through testing and laziness ("what's the simplest thing we can do to make the game slightly less pointless?").


Congrats guys. I really enjoyed - the fact that it is playable (technically and interactively) and built in a weekend shows vision and focus.


Nice... I noticed that, unlike a number of other Node Knockout entries, it worked fine in Firefox. Will have to try that lib.


I love how reliable everyone is when Block comes up. WHERE WERE YOU WHEN I ALMOST HAD LOBSTER?!

addicting.

edit: hmm. I think the match-algorithm is a bit too forgiving. Several of the forms can be "solved" by just clumping together. Though, given how many are still missed, maybe that's not a bad thing.


Very cool.

Occasional bug: I found myself 'winning' even when I was clearly not part of a pattern (sometimes even totally separated). Running Vista Chrome.


ya, this is one of the top bugs we want to fix. thanks


Wow I can't believe how FUN this is.

Edit: I just realized no one is commenting because everyone is still busy playing it.


Yes, this game is absolute genius. Felt really sorry for the guy (X) who got stuck running around in the middle of the Fortress formation a minute ago. Like:

    #####
    #X  #
    # # #
    #   #
    #####
I'm the one in the blue, by the way.

Edit: This makes me think about mathematical morphology^, used in image processing. You win when you are inside the opening of the set of pixels by the given structuring element.

i.e. you win when you are in any place where the shape can fit.

^ http://homepages.inf.ed.ac.uk/rbf/HIPR2/open.htm


Yaay, Bob Fisher! I once dressed as him for a party, with a cardboard cutout of his face over my face.

I'm sorry, this comment isn't strictly relevant, but I don't get a chance to tell that story very often.


Everyone's own square appears blue.


Thank you, panda. That was the joke.


It's really made me realize how irritated i can get by gray blocks moving out of formation.


have you managed to complete the lobster formation yet? i'm starting to think it might be impossible


After playing for a while, I think the best strategy is to simply not move.


That's quite a WOPR of a discovery..


Here's a fun idea: split players up into multiple teams i.e. only pixels of the same team can make formations, and points are awarded to each team as a whole


it might even be nice if the teams were forced to cooperate sometimes. if each team was a different color we could have color coded formations.

any more ideas?


Penalize pixels which touch a correct position but are not part of it


You should have your colour change when you reach certain point thresholds - when you "level up" I guess.

Also, maybe then you can push lower-level pixels around?

-- Ayjay on Fedang


Probably the first collaborative multiplayer game without any element of communication.


There is a little bit of communication. For instance, if you want to lead someone somewhere, you can try running circles around them and then running in a direction, and then running back to them. I don’t know if they would understand, but you could try.


is this a good thing? we were considering adding the ability to chat as a special power, but i kind of like the simplicity/anonymity of the current setup


I think a chat would just add frustration and abuse.


Yeah, no chat. Simplicity is good here.


I love how I have no idea what is going on or what to do, yet it still keeps telling me I win.


Yeah found myself in the same situation. Or sometimes I was part of the pattern that matched, and I didn't win. I think this is just a bug and they'll probably fix it soon.


After a few games (1 to 5), new formations stop showing up and other players stop moving.

Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100724 Firefox/3.6.8


This is SWEEET. My requests 1) Leaderboard: show the top 10 players plus my rank. Much more incentive to keep playing. 2) Tag the leader with some kind of color. 3) Bring a little more structure. No idea how to do this.

If people call it Web 3.0 I'll shoot myself in the face, but I think there's really something about this whole realtime web.


Fascinating.

What has been most interesting to me is to watch the game as more and more people join. When I first started watching, there were about 30 or so pixels was swarming around the middle of the board - now, there are three distinct swarms in different areas of the board, each comprised of about 20-30 pixels.


Many thanks for this. It's a joy to play. I'm surprised by how good the vibe is in the game. I think there's a bug with the Y pattern - it never gets recognised in the games I participate in.

It would be nice if you could get a reward at a thousand points - for example - being able to write a message.


It took me a few minutes to realize I was playing this game with other people, nice work.


Uh. Awesome. Best thing on the net in ages.

Feature request:

  1) Leaderboard (all scores periodically reset? countdown to reset?)
  2) Top scorers colour-coded.
  3) Ability for my fellow pixels to hear me swearing at the top of my lungs at them.


You should add a leaderboard.


we plan to after node.js ko is over


This is alarmingly addictive. Only problem was it took me about a minute to figure out my browser window was too small to see the target shape, so I had almost no idea what was going on. Still, incredibly cool.


Well, it's easy to get almost every formation, just open 30 tabs or so and move them all into a square. Unfortunately this game eats CPU like mad.


I can't play this, I've tried both Chrome and Explorer, both come up with a blank grid and the word 'wait' in the top right.


How do you play this game? Nothing works for me. I press left/right/up/down but nothing happens.


Try Chrome. Firefox 4 doesn't work for me.


For some reason when I start the game I lose connection with everyone after 5 or so seconds (all pixels are at a stand-still after they had been moving). The counter continues to count down as well.

Despite the problems it is pretty slick.

Win 7, Firefox 3.6.8.


i think firefox 4.0 will have support for websockets but until then we have to rely on fall-backs provided by the socket.io library.

although i successfully tested this game in firefox 3.6, i suggest you try chrome or safari for a better experience.


wow, and there's a group making swastikas in the corner. classy.


Achiever, Explorer, Socializer, Griefer.


Maybe they're Buddhists.


This had me smiling in seconds, love it so much!


I don't remember ever playing a game this simple that made me start giggling.


This looks very cool! Can someone point me to a place which lists a collection of useful HTML5 tools/libraries to build stuff like these?

Thanks!


A good place to start is http://html5boilerplate.com/. This provides a good starting point and includes the modernizr library by default, which makes it very easy to check for compatibility with HTML5 features like canvas, video/audio tags and websockets.

Dive into HTML5 by Mark Pilgrim has also been a helpful reference for me.


This is fantastic. What a great demonstration of the limits of self-organization!


Indeed it is fantastic, But I was more surprised about the powers of self-organization than the limits of it!


You haven't tried to make the hat!


is there anything wrong? I tried it with firefox, chrome, safari - i can move my pixel, but I always stay alone, seeing only a "wait" in the top right and no shape to create.


the blue pixel doesn't show up for me on firefox after the first time i go to the page (aka cant play anymore)


where did you host this?


This is on one of the SmartMachines that Joyent donated to the Node Knockout competition. We’ve been very impressed with it. Very easy deployment, and the server's been chugging along smoothly since launch (save the occasional restart due to invalid HTTP requests crashing some of our Node.js libs).

The Joyent guys have also been tweeting network graphs for our app, which makes us comfortable that they're keeping a watchful eye on our instance for us: http://skitch.com/jimpick/dwjfw/flow-saber-tooth-moose-lion0... :)


Uh, block fits all patterns.


It's a tough one though. They need to ignore some random pixels but then again making a giant block shape is a loophole. Maybe calculate match as a percentage of the pixels that would be blank? Dunno. Tricky but doable :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: