Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin
ColorRun – Simple browser game about colors (colorrun.pl)
56 points by lukaszmtw on Aug 16, 2014 | hide | past | favorite | 33 comments


Fun stuff.

  function action(){
    var opacity1 = $('#color-1')[0].getContext('2d').getImageData(0,0,1,1).data[3];
    var opacity2 = $('#color-2')[0].getContext('2d').getImageData(0,0,1,1).data[3];
    if(opacity1 > opacity2){
      $('#color-1').trigger('click');
    }else{
      $('#color-2').trigger('click');
    } 
  };

  setInterval('action()', 100);


I think the game has been updated, now the opacity of both colors are the same (255) but you can sum R, G and B parts. The highest will be the brightest.


function c(i,j){return $("#color-"+i)[0].getContext('2d').getImageData(0,0,1,1).data[j]} setInterval(function(){$("#color-"+(1+(c(1,0)+c(1,1)+c(1,2)<c(2,0)+c(2,1)+c(2,2)))).click()},1)


  function action(){
    if($('#color-1').css('opacity') > $('#color-2').css('opacity')){
      $('#color-1').trigger('click');
    }else{
      $('#color-2').trigger('click');
    } 
  };

  setInterval('action()',0);


Hey, why are you cheating? That's so rude for people playing normal.


Because this is "hacker"news and people here like to reverse engineer things! Also, great work with the game. It's really fun and quite an interesting mind game once it starts getting faster and faster. I agree with the mobile app sentiment... it would be a fun game to play on a commute. Great job!


Thanks! :)


You could create a backend service that generates 1px swatches of a color; of course, this will only make it one step more difficult to cheat.


Blast! I came to the comments to post nearly the same code. Thanks though, yours is slightly better. I didn't know about .css(). It would be interesting to see a pure javascript implementation.


I get a dialog that says "Don't hack" -- must have been fun to watch while it lasted.


Just increase the timeout to 250.


That was fantastic, thanks for sharing. Those susceptible to siezures should not try this.


Surprisingly fun. Suggestion: Take a big chunk out of the timer when the wrong choice is clicked, so a sense of urgency is created instead of immediately ending the game.


Got to 938 points on my first go. Discovered you can also use left and right arrow keys, which is much more efficient and got me to 1566 on my second go. Thanks for the game


Hah. I got to 896 using a broken laptop trackpad. When I discovered left and right arrow keys, I started averaging 30 because I kept on tapping the wrong direction.


Surprisingly fun game - good work! Made it to 204 points on my first play. No idea if that's any good. It would be nice to have some sort of indicator so I know how good it is (if you don't want to do a leaderboard maybe calculate an average score?).


We will definitely do this. As I mentioned here it was made in 4 hours. ;)


Really good job for 4 hours.


Hi! Probably you don't know, but we are only 15 and 16 years old. If you enjoyed this game you can make donation to our bitcoin address so we can make another fun projects: 1EgxGUYrvrkHRYMJFaxrReVsGSukJfT3Yb Thank you guys for all help! :)


So simple and yet fun to play. I was pleasantly surprised that arrow keys can be used instead of clicking.


I thought midway through playing this that it would be another CSS history hack, so I started answering incorrectly to make sure my score went down (which it did).

Is there a better way to figure out if a game is trying to hijack my history?


In this case, unless you have visited more than 50% of the internet, you would eventually get two panels with the same brightness.


Why is that? If you assume each side is pointing to the same link, but with different styles for visited and unvisited, the colours will always be different.


Fun, but I'm disappointed that I'm limited to touch instead of clicking on my touchscreen laptop (Lenovo Yoga 13). This only seems to be an issue when I use Chrome/Opera.


Strangely addicting. I managed to get up to 410 after a few attempts. I think this would work really well as a mobile app, keep up the good work!


Thanks! I really appreciate this.


I swear i thought this was just a smart way to train a learner, get a large group of people to identify colors but this is just too fun!


Fun game, i like it!

Minor: In the gameover pop-up the social buttons only show the facebook logo, though the links point to fb/twitter/plus


Would you mind if I made an Android version?


We are planning to do this. You are not allowed to do this.


You won't be able to avoid clones which is probably why you're being down voted, but fwiw it works really well with a touch screen and would make a great app.


Cool game, although I feel like it goes from really easy to really hard really quickly. 1710's my best so far ;)


Well, it was made in nearly 4 hours. ;) We will work on it.




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

Search: