Isitchristmas.com uses WebSocket and node.JS to allow user interaction(github.com)
github.com
Isitchristmas.com uses WebSocket and node.JS to allow user interaction
https://github.com/isitchristmas
9 comments
I wrote up a post on the whole architecture here:
http://konklone.com/post/the-making-of-isitchristmas-dot-com...
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
https://github.com/kuno/GeoIP
Yeah, I'll definitely be doing that next time. Thanks for the tip.
This is a really great writeup, thanks for taking the time.
Cool stuff. Cool technology. All kinds of possibilities.
PSA: check out the js console on the main site to send messages to other visitors.
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 :)
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);yeah....thanks for that.
while (true) { say("foobar"); }
me.country = "HELL";
Please don't do that. Seeing "HELL.png failed to load" every 5 seconds isn't fun.
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.
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
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}));
rawSend(JSON.stringify({ _event: "motion", c: "xx", id: "xxxx", x: 0, y: 0}));
You can forge messages from others:
rawSend(JSON.stringify({ _event: "chat", country: "US", name: "Any Guy", message: "expletive deleted" }));
rawSend(JSON.stringify({ _event: "chat", country: "US", name: "Any Guy", message: "expletive deleted" }));
Newline characters make for some interesting spoofing here.
[deleted]