Hacker News new | past | comments | ask | show | jobs | submit login
2048 – multiplayer (emils.github.io)
240 points by S4M on March 12, 2014 | hide | past | favorite | 113 comments



Dude, we need to work. Please stop making variations of a highly addictive game. You’ve already destroyed our lives. Show some mercy.


"I am sorry '2048' users, 22 hours from now, I will take '2048' down. I cannot take this anymore."


Fear not. I don't plan on pulling a flappy bird. Although I now kind-of understand what Dong Nguyen might have felt like, even if at a much smaller scale.


Your game is amazing! I really enjoy it. Ported it over to Firefox OS so that people in 16 countries can be introduced to it. https://marketplace.firefox.com/app/2048~/


Unlike him, I hope that you're smart enough to use your newfound power for evil.


Unfortunately, either it's broken or everyone stopped playing it. It hasn't found any competitor after about 5 minutes of searching.


I did not sleep last night. I did not work the whole of yesterday (well, I resigned from my job yesterday). Please keep the game up till I start my new job.


The Flappy Bird Effect: When a simple game rises in popularity leading other hackers to build an AI and multiplayer versions of it leading to its own demise.

We should expect Gabriele Cirulli to be in Rollingstone next. :p


I'm convinced that there's a whole new ecosystem of hackers that will exist solely to clone simple games which rise in popularity.


That actually sounds promising--like a book club for gameplay mechanics. We could start by working through http://www.squidi.net/three/ together.


Like Tetris, just add some demise?


… "I need time to prepare for the release of '4096'."



While driving home from work, I almost thought about speeding into the car in front of me because it would make big number.



When I was in college, me and my project team mates used to go to this fabrication workshop for project work once per week. I was kind of a counter strike addict in those days. The workshop was inside an old building and at one particular spot, I used to feel like hiding behind the wall!


how does one almost think?


I guess it was more like, an impulse, not a conscious thought. So I had an impulse to do it, but never actually thought about doing it, and didn't realize what I had almost done until I was at a complete stop.


I got yelled at by my boss yesterday. :(


Why? Did you only get up to the 512 tile or something?


I am worried about that right now ... more precisely the Boss' Executive Assistant


Someone please make multiplayer version where second player can be chosen by sharing link.


This was the original plan, but I expanded it. I should be able to add it in the near future.


use webrtc, easy. then you wont even need your own backend.


webrtc is so unreliable (working on a project right now). For quick backend, use Firebase!


The other day I saw two identical items next to each other and thought "right-arrow".


Do we need an Indiegogo project to raise funds to pay them to shut it down and stop making variations?

:)


Agreed! This game is too addictive!


I wonder what is it about the game that makes it so addictive.


Well first of all it seems easy enough to do. The concept sure is easy. Then you find that it's actually quite interesting and new to you. Then, perhaps most importantly for the addictive effect, is that making the moves and going from dieing to restarting the game is so fluent/quick that it's just long enough for you to think "ah, I'll do one more, this wont won't take long". That plus the fact that it's really not that easy to win made it highly addictive for me.


I second this.


+1


Seems rather buggy to me I'm afraid. I've observed:

* Timer runs out, game proclaims both players winner

* One opponent makes no moves for the entire game, proclaimed winner when timer runs out

* One player proclaimed loser at arbitrary point with timer still running and legal moves left in play


Everyone I played seems to be a bot - or they have super-human finger speed!


I "seed" my game by mashing < ^ > keys for a few seconds, then play normally.

I might revert to mashing if I free up some space.

edit Though the game also appears to be broken. This is my single player strategy too :)


You can semi-mash all the way up to 512 safely if you watch out for block buildup.


up-left over and over. when the top row is full, and your high block can't move right, you can move right. other than that, you up-left until you jam.


You can get pretty fast fairly easily. Just got the first 256 tile in 35 sec, first 512 tile in 1:12.


I will add to those: * sometimes system gets stuck and no competitor is found (well - maybe there really is no one else) * once board was loaded, for competitor blocks were moving so fast as if computer would play or some sort of bot



he was too quick to release...


2048 is HN's Flappy Bird


LOL. Have you tried randomly hitting all the keys until you are around 128? :-)


Is there any other way to play?


Nice idea, but I don't believe there are no opponents available with this #1 on HN ...


I think we broke it.


It doesn't work very well. Why does this happen? http://cl.ly/UOfb


This happens to me all the time - the game somehow ends whenever ... in the middle...



Yeah, it is broken. I had a higher score and got to a high number and it said I lost.


This: http://i.imgur.com/E6QtRYn.png

Can be easily fixed by setting float:right on #player-online

Have a nice day.


I'm having some difficulty getting competitors, with no indication of how long it will take to find one, and when I did find one, about 3 seconds into the game I was told I lost with my opponent having performed no moves. I feel like this needs some work.


I got a competitor pretty easily, but we won in few seconds (both of us)... something is wrong.


Hey author here! Sorry for the buggyness, this is my first stab at realtime. I can confirm that everybody you're playing is a real person. I wasn't sure how to simulate latency for testing so that could be the source of the issues. I also have a mix of server/client msgs being sent, but plan on moving it all to the server except for moves.

You can find the repo at https://github.com/EmilS/2048-multiplayer, PR's are welcome! :)


Next up: Twitch Plays 2048


Someone tried it, but when I found the stream it was inactive.


Ah, you beat me to this!, haha :D


This is probably a secret Russian plot to destroy the US economy.


I've played four games, and each time it declares the player with the lower score the winner after a seemingly arbitrary amount of time.


In the game I played, the winner did in fact have more points, but their tiles were a strict subset of the other player's (64,4,2,2 vs 64,32,16,8,4,4,2,2), so its not really clear what the scoring mechanism is.


As if single-player hadn't ruined my life already -.-


Yeah. I just need to get a game in before I start my work day


All the players I played against play blazingly fast, seems almost just mindless bashing. Is it just me who actually takes their sweet time thinking about every move?


I bash at the beginning because it's timed. Then, once I have a larger number on the board I begin playing normally.


"Use your arrow keys to move the tiles" ? How about a few more words about rules.

How do you pick which tile you want to move?

And btw, when I tried, two tiles with same numbers were NOT merging most of the time. Other times it seemed that the entire row was moving. Then again, I could not figure out how to select a tile to move. Mouse seemed to work but only sometimes. Perhaps accidentally... Too buggy or just big time lag.., or just big time lag..


Nobody knows?!


So when there was only 15 secs left, I got 4xxx points and my opponents only got xxx points. Then I was told I was lost (because I got no possible move I assume) and he was won, but that is really a bad game-winning condition because there was no way my opponent would got 4000 points in 15 secs.

So why not let the game clock finish before the game tells who is the winner?


Apparently you lose by getting the higher score.


There's some bug ending games early, so this is pretty much a button mashing contest. Also, when games end early, it doesn't properly declare the winner. I assume something's broken in detecting if the board has no moves: http://i.imgur.com/4XBGCzI.png


I got hooked up with someone who scored 500+ points in the first 10 seconds. Is someone playing this with bots?


Maybe, but you're probably just experiencing someone who starts the game by mashing the buttons. It works for a surprisingly long time.




I've found a couple of issues:

- With a clear point advantage still both players get declared winner

- After one move I was declared loser, while actually I made the only move and it was a valid one as well, with loads of options left (as it was the first move)

- It thinks the game is finished on random occasions.


I'm getting:

"Failed to load resource: net::ERR_CONNECTION_TIMED_OUT http://2048.stolarsky.com:3000/game/new"

in the console.


I played through, it doesn't seem to be judging winner & loser correctly http://imgur.com/NXDykaP


There's a Cheat mode for this as well :D Check out >> http://adisrikanth.com/2048/


The game is broken: http://i.imgur.com/RCUBkuF.png

I made a single move and it said the game was over???


Firefox - searching for opponent for over 30 minutes.

Chrome - finds opponent in seconds. Loses connection after 30 seconds - 1 minute. Buggy as all hell.

Your multiplayer code needs work.


How does the scoring work? I don't get why I lost: http://imgur.com/9yFrKvH


I fail to see how I am the loser (I am on the left) http://imgur.com/0S10kF1


function arrows(key) { var eventObj = document.createEvent("Events"); eventObj.initEvent("keydown", true, true); eventObj.which = key; document.dispatchEvent(eventObj); } for (y=0; y<=1000; y++) { arrows(39); arrows(40); arrows(37); arrows(40); }

It works nicely in multiplayer as well. My opponents are probably often surprised. (js credits: varyform)


Pretty decent. I love how you made the loading animation for the loading dots at the end of "Searching for competitor..."!


Yes, that part looks pretty neat. Have you been able to get it to do anything else?


I was playing someone and when the game ended I had a higher score than them but its said I was the loser. I don't get it



There's a bug in which it looks like I'm playing about 5 people at once, all moving very fast.


Now, does anyone have made the desktop version of this game? in java, perhaps?


Someone plz come online, i couldn't find any competitors.!


Works "fine" in chrome, not firefox (perhaps due to some add-ons)


no, it doesn't work "fine" in chrome either. it's just very buggy


That's why I've put the fine in quotation marks. I just wanted to say that I could get an opponent in chrome (but now also in ff).


Hmm, I won despite my opponent having a higher score.


Welp, there goes my productivity for the next week.


What's next? Multiplayer 2048 AI vs AI…


Why not? That would be awsome. There's already a python repository for interfacing with bots, and it works using unix socket. It's here: https://github.com/matslindh/4096

I'm not sure 1vs1 battle matches is the best idea (it's not chess), but it shouldn't be too much hassle to make it into a platform that tracks the highest scores, best averages etc. It could be divided into different time controls (1 sec per move, 3 minutes per game etc.). The point would be to see who could make the best AI.

It could have a simple flask app, or similar, that just shows the high scores and makes it possible to reserve bot names (so other people can't play as you.)

I'm just putting ideas into someones (noones) head. But if people who's currently/who wants to play with 2048 AI responds to this, I might make an effort to get it starting.


Next is the MMO.


I just entered here to say that. Let's just wait to see how much time it takes.


I would bet on 2048 Co-op. Like Twitch and crowd sourced Pokemon :)


2048 AI Battle Tournament


What about a 4096 ? :)


sadly its not working, can't find another player even when my friend and I are both waiting at the same time.


very very buggy


Now... who can add the AI on to this!?


"Twitch plays 2048" anyone?


Make the autorun a screen saver next.


Searching for competitor... always


How do I play this with a friend?


Just been won over by a bot.


keep getting connection lost, maybe du to server load?


Unplayably buggy.


plz enable github issues


buggy :(




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

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

Search: