Hacker News new | past | comments | ask | show | jobs | submit login
PixelPals – Collaborative pixel art canvas (eternalthinker.github.io)
13 points by eternalthinker on Dec 23, 2014 | hide | past | favorite | 14 comments



Ok that was fun.

   var socket = new Firebase("https://pixelpals-server.firebaseio.com/public");
   var w = 150;
   var h = 120;
   var randColor = function(){
   	return '#'+Math.floor(Math.random()*16777215).toString(16);
   };
   for(var i = 0 ; i < h; i++){
   	for(var j = 0 ; j < w ; j++){
   		socket.child(i*w + j).set(i%2 ? randColor() : '#000');		
   	}
   }
.. sorry


You can even draw the Mona Lisa on it : http://pastebin.com/TUsqeMWT

(You need to expose the pixelCanvas globally first using a break point or something)


The scripted experiments are fun indeed :] Also the firebase server usage is shooting up like anything :D


I think some people may be checking wether your script works or not


The demo page is quite anarchic but it's a fun concept. Given a goal there would probably be more incentive for random users to work together on something.


A metaphor of the tragedy of the commons. Try to draw something and it's quite quickly overwritten by some wild person just spinning the cursor.


Awesome! I already have a couple of ideas on how to use this as a teambuilding tool. Thanks for open-sourcing it!


Right now it says "Penis Bro," "Shitcock," and also has a picture of a penis.

I'm shocked!


Still penises four hours later. As soon as I saw the link, I just knew that's what I was going to see. Humans are very predictable.


Interesting, Chromium's network inspector does not show me how this transmits.


Yes, it does.

From the network inspector, click the one that says "web sockets"

Then select the entry from the list, looks something like ".ws?v=5&ns=pixelpals-server"

Then select frames from the 3 options "Headers Frames Cookies"

Should see the json data


Thanks! Even that does not update live though, I have to switch between the tabs to see the latest messages.


Yep, it's Firebase! Was a Node implementation originally, but Heroku's free tier for Node didn't offer much persistence.


It uses Firebase for networking.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: