25 comments

[ 4.3 ms ] story [ 228 ms ] thread
I wrote up a post on the whole architecture here: http://konklone.com/post/the-making-of-isitchristmas-dot-com...
Cool stuff. Cool technology. All kinds of possibilities.
This is a really great writeup, thanks for taking the time.
Very nice writeup. For the GeoIP part, there are actually libraries that will load up the entire Maxmind database into memory. Though it bloats your node app's memory usage as you would expect, it's extremely fast and almost always worth it. We use this library:

https://github.com/kuno/GeoIP

Yeah, I'll definitely be doing that next time. Thanks for the tip.
PSA: check out the js console on the main site to send messages to other visitors.
while (true) { say("foobar"); }
me.country = "HELL";
Please don't do that. Seeing "HELL.png failed to load" every 5 seconds isn't fun.
If you read the page source, you can see how easy it is to write your own chat bot for this app. Just paste the code back in to your JS console (which may not like newlines, FYI).

I won't tell you which chat bot was mine :)

   x = setInterval(function() {rawSend(JSON.stringify({ _event: "chat", country: "KP", name: "Kim Jong-Un", message: "Die US imperialist scum!" }));}, 250);
I love these kind of limited interaction situations, and what behaviour you see coming out of it. I moved around for a minute in a slow deliberate path, and others started following me; then I stopped completely still, and others lined their flags up next to mine in a square. Amusing, and all with no communication.
When I was there, all the American flags were just chasing Canada.
isitdown.com ?
(comment deleted)
Just spent 2 minutes on that site with 6 other people. We're all idiots.
haha. ikr, about a dozen of us went over each other and were clicking for abt a min
(comment deleted)
Newline characters make for some interesting spoofing here.
You can forge messages from others:

rawSend(JSON.stringify({ _event: "chat", country: "US", name: "Any Guy", message: "expletive deleted" }));

It's even easier. You can set your name arbitrarily using the public API, e.g. rename('whatever');. Names don't have to be unique.
True. Currently occupying myself by hooking on('chat')
(comment deleted)
Is it possible to move other flags server side by using the following?

rawSend(JSON.stringify({ _event: "motion", c: "xx", id: "xxxx", x: 0, y: 0}));