News for hackers. Stuff that matters.
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @03:21PM (#3741453)
Try to make the screen all one color while your opponents do the same.
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @03:23PM (#3741460)
Written in Node.js, hosted on Amazon EC2, uses Socket.IO.
Re:Show HN: Color War by tomg on Thursday March 22, 2012 @04:53PM (#3741932)
Is the code available somewhere? I'm working on a somewhat similar game concept on an identical stack.
Re:Show HN: Color War by xentac on Wednesday April 04, 2012 @01:31PM (#3798694)
I know it's a little belated, but here's the code. I haven't written the blog post yet.

https://github.com/xentac/colorwar

Re:Show HN: Color War by xentac on Thursday March 22, 2012 @04:57PM (#3741951)
Not yet, but I plan on doing a little blog post about it and posting the code.
Re:Show HN: Color War by msluyter on Thursday March 22, 2012 @03:35PM (#3741510)
Addictive for about 40 seconds. I was like "GO GREEN! GREEN! GREEN! GREEEEEEEEEEEEEEEEEN!!!!" and then realized it was futile. Neat though!
Re:Show HN: Color War by stock_toaster on Thursday March 22, 2012 @03:49PM (#3741579)
I was entertained through a boring meeting. :)
Re:Show HN: Color War by psadauskas on Thursday March 22, 2012 @06:30PM (#3742382)

    var x=0,y=0;
    
    function f() {
      if(y > 600) { y = 0; }
      if(x > 800) { x = 0; y += 10; }
    
      socket.emit('move', {x:x, y:y, id:myId});
    
      x += 10;
    
      setTimeout(f, 5);
    }
Re:Show HN: Color War by rubidium on Thursday March 22, 2012 @03:37PM (#3741522)
It was just a matter of time before someone stopped using a mouse and started some scripts.
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @03:49PM (#3741578)
Yeah, I limit the number of moves you can make per second, but mice/multi-touch move pretty fast...
Re:Show HN: Color War by DanBC on Thursday March 22, 2012 @06:38PM (#3742406)
Do you take into account mouse acceleration?
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @07:09PM (#3742531)
It just reads mouse move events, so there are only so many per second. If you send me more events than I allow, I drop the rest of them on the floor.
Re:Show HN: Color War by DanBC on Thursday March 22, 2012 @06:41PM (#3742421)
I'm red. I have no idea why I'm winning. Green has a really nice lissajous going on, but I don't think it's scoring them that much.
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @03:41PM (#3741540)
I did do some stuff to try and limit scripts. We'll see if they can figure it out.

Also, it's multi-touch enabled...

Re:Show HN: Color War by m104 on Thursday March 22, 2012 @03:38PM (#3741524)
Ha, some bots are being written as we speak! Or, someone out there has some killer hand-eye coordination.
Re:Show HN: Color War by abraham on Thursday March 22, 2012 @07:05PM (#3742513)
There is a bug. My dots would randomly change to a different color shortly after I placed them.
Re:Show HN: Color War by xentac on Thursday March 22, 2012 @07:08PM (#3742523)
That's actually not a bug, someone wrote a bot that plays in every position that someone else plays.
Re:Show HN: Color War by abraham on Thursday March 22, 2012 @07:13PM (#3742543)
Ha. That does not surprise me at all. At first I thought it was someone else but the dots matched exactly so I thought it was a bug instead.
Re:Show HN: Color War by bobidden on Thursday March 22, 2012 @03:50PM (#3741587)
for (var i = 0; i < 10000; i++) { socket.emit('move', {x:Math.floor(Math.random()* 750), y:Math.floor(Math.random()* 750), id:myId}); }