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.
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.
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.
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.
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?").
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:
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.
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.
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
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.
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
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.
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.
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 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.
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.
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.
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).
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 :)
76 comments
[ 4.3 ms ] story [ 126 ms ] threadEdit: I just realized no one is commenting because everyone is still busy playing it.
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
I'm sorry, this comment isn't strictly relevant, but I don't get a chance to tell that story very often.
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.
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?").
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 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.
Thanks!
Dive into HTML5 by Mark Pilgrim has also been a helpful reference for me.
any more ideas?
Despite the problems it is pretty slick.
Win 7, Firefox 3.6.8.
although i successfully tested this game in firefox 3.6, i suggest you try chrome or safari for a better experience.
Occasional bug: I found myself 'winning' even when I was clearly not part of a pattern (sometimes even totally separated). Running Vista Chrome.
Also, maybe then you can push lower-level pixels around?
-- Ayjay on Fedang
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.
They either need to do scoring server side, or there needs to be some sort of locking.
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.
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.
thanks !
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... :)
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100724 Firefox/3.6.8