I think there ought to be a mechanism to make it hard to stay huge. I've been in a couple of realms where there are 2 or 3 behemoths just kind of floating around that are impossible to get rid of. I see that you drop off the leaderboard if you don't stay active but there should be a physical mechanism as well IMO - like maybe you gradually shrink over time.
There are green spiky cells that split you into about 10 cells if you are large and touch them. I've seen players fall off of the leaderboard due to accidentally touching them.
Just like the time for the cells to merge increases with your size, the cells also lose mass at a given rate depending on their size. The only way I have found to circumvent this is to stay divided at super sizes so I'm not losing 1k mass because I can't catch anyone. For those cells not moving, just let them starve until they return to normal sizes.
I think cells losing mass is a new feature, or at least I definitely didn't notice that when I posted my comment a few weeks ago - maybe they took my suggestion :)
At the moment you can use a trick to play with your friends (that's what I'm doing): For each player, redirect m.agar.io to your own server (/etc/hosts), which serves a static file with the gameserver location (which you get from the original m.agar.io). Then reload the game until you're in the same realm.
Don't forget to set the Access-Control-Allow-Origin header.
Could you go into more depth on how to do this? How would one force redirect m.agar.io to the server of your choice? Also, what is "Access-Control-Allow-Origin header"?
Just wanted to commend you on game design. It feels really balanced, and somehow it keeps the game interesting even after a _long_ time playing.
What I didn't understand is why it would disconnect me sometimes out of nowhere and reconnect me into another realm. It happened twice or thrice when I was on the leaderboard.
What dev stack did you use? Do you have a blog post with your math models for growing, speed, zoom, etc?
There are 12 "servers" at the moment (divided among some regions, I think 6 for europe). But each server can host several realms, so I'm not quite sure how many realms are there, but at the very least 12 (probably 30 or more, though). A server can handle up to around 200 players (I don't know the exact number, the CPU is the limit).
I only notice about 50 people at once in most servers. When there is one big behemoth at least twice the size of the one in 2nd in the leaderboard, most people simply RQ.
Think that part of it is that only one process or thread can run at any given time in node. So, if you have a complicated multiplayer server, subroutines will start getting blocked.
Can you add a chat? Something like http://tagpro.gg 's chat (doesn't get in the way and disappears after a minute). I really love the game, though! :-)
I played for several hours this morning. It seems playing cautiously and defensively is the best strategy. But splitting frequently and being aggressive is a lot more fun. Maybe adjust the balance to reward aggression more?
I'd like to let a 7 year old I know play, but then she might learn how to spell swear words. Is that the worst that can happen? Haven't seen any porn blobs yet.
Have you tried taking their names? They are not actual bots. They are images provided by the game when you take them, even from popular references like 9gag or Steam.
What's up with the statement about ad-blocking? Are ads part of the game or are you just trying to convince users to expose their browser to global malware and exploit delivery?
While looking at the js source code and modifying it a bit I was able to program keys W A S D to move my cell around. But it doesn't work after a bit. The protocol is send the position of the mouse (which corresponds to the cell) to the server and then it calculates change over time to get a velocity. So if I move too much it starts going forever in one direction. Although this is using a quad tree implementation for collision detection the actual detection seems to be done on the server side and not the client. There is no websocket message to tell the server if you collided with another cell or if you "ate" some of the material that makes the cell grow. This is actually my goal in "hacking" the game was to pop to different locations to get as big as possible.
Also like everyone else I get connection errors. It's actually quite interesting. It appears this game is load balanced between three or four servers. The script makes a request to http://m.agar.io/?_=<timestamp> which returns the IP of a server used to initiate a websocket. It changes each time you refresh it.
Yeah I know right. No wonder this game crashes. When you press the space bar it sends a message, when you move your mouse it sends a message. The message is in function U() (its the Y position, X position and some other value I've confirmed its not magnitude don't really know what it does). As soon as the connection is established it starts sending, although if you don't move the mouse it doesn't send a message. Then there is a message to update the players view of the game.
Client-side computing exists, but only to present a fake state which doesn't affect the game mechanics but only servers a cosmetic function to bridge the time until the server updates the client with the actual data (on which any essential game mechanics are based).
Games typically just send keyboard input to the server, simulate the game as best they can, and receive the state of the game as it 'really' is. Just like you can't change your money on your bank account, but you can send instructions to send money (keyboard input), and your client-side app will likely immediately update your balance even if it's not fully processed yet by the server.
Beyond that, computing vectors of a few players isn't really a big deal for a server, with 20 players you're really running a relatively simple simulation without any rendering.
Data on the network is the bottleneck. And it's far more efficient to send e.g. a 'player pressed Forward' on second 0, and 'player released Forward' on second 8. That's two messages, as opposed to a 30-60 frames per second update on the player's position.
So for security and performance, it's usually not that great of an idea for clients to do all that much computing. One day we might even see rendering happen serverside, too, OnLive got it to work pretty well at low-res but it was far from optimal. (they shut down btw)
There are at least 12 servers at the moment, but they're divided between several regions so you're probably only seeing the IPs of the servers in your region. Each server also has several instances of the game, it creates more as demand rises. The most used resource on the servers is CPU.
I wonder if modeling this as a complex system with self interested agents and randomly appearing nodes could show some interesting emergent properties. At least it would be a worthwhile simulation. Does anyone know who is the creator of this game and whether the code is open source?
The "MMO" features were fake. All the other ships flying around were bots; the game ran locally on your computer. Disconnecting from the network broke the illusion, as the game continued to run normally.
Quad trees are popular because they're fairly easy to understand and implement, but they don't actually perform that well in practice for broadphase. (Its really more for LOD)
If you want a tree that does perform well and is similarly easy to understand, a dynamic AABB tree is much better.
Good find. Another nifty JS implementation of collision detection is https://jriecken.github.io/sat-js/ - I have used that one for tricky gaming and drag&drop behaviours.
I have Vimperator for Firefox, and I had to ignore those keys (Shift + Esc) while playing in order to use the keyboard. Just FYI in case anyone else ran into the same thing.
I'm pretty sure it's a timer. Cells cannot merge for X seconds after splitting, but after that any two cells that have passed the threshold can be merged.
So I've played this game a few hours yesterday, and more on the day it came out here.
I logged in this morning again for a quick game, and it appears you've considerably shrank the "worlds" into smaller spaces. The game has changed completely for me, as it's about 50/50 that I will survive the first 20 seconds. It's gotten extremely tight in there and there's no more room to maneuver. If you're a big cell, it's almost impossible to die, as there is now always a stream of little guys that get trapped, then sucked in.
I really had a lot of fun "exploring" the worlds and occasionally bumping into another cell, or just crossing paths yesterday. I could go on long chases that would last a few minutes, which was a lot of fun. As of now (I tried the 4 regions), it's basically a reflex game. Splitting in half to "attack" I think is the cornerstone of this game (if you want to get big, you have to risk a bit), but it's so crowded now that it's prohibitively expensive/risky to do so, which sucks.
A small thing to consider for user retention: if I've carefully built up my cell to a respectable size, I will try to play smart and not leave my computer, grab water, go to the washroom, because I'm invested. If I die every 3 minutes, it's easy for me to drop it, forget about it and move on. I spent 60-90 minutes in a single game yesterday, and didn't want to "lose my work", if you see what I mean.
Awesome work (I think the small upgrades on the theme, names, etc. is awesome), keep iterating - but I think I'm going to get back to productive stuff now, because the game has lost most of its appeal to me.
I was trying to think of an analogy between the game and how startups/big-companies work in real life.
Start-ups are small in size, more agile and can navigate/pivot more easily. Big companies generally take time to pivot and ignore smaller opportunities to grow unlike the small companies. They also have the potential to gobble down small companies.
I wonder what's the most appropriate analog for the spiky cells.
Dev here. Client side is javascript, no frameworks or anything. Server side is C++ with libuv for abstracting networking (I test it on windows but the actual servers are linux).
I really admired the selflessness of "dick feed" and "A Helper Cell". In a game where it seems that only being the biggest counts, these guys were helping the biggest get bigger at their detriment. Kudos.
I'd be nice to be a parasite if you've been eaten up a lot... right about now, this game is getting just so one sided. Even with the stationary parasite you can feed to make a new one, which rarely happens... all there is just every cell is focused on eating each other.
Why can't there be more types of dangers? Like, being big or ginormous for too long would attract viruses, it could be a spawned player who will become one, and you have to divide yourself to smaller cells, so that the infection wouldn't be too quick.
There were some really fun competitive plays I saw. This is a lot of fun. In the end it was lag that killed me - high levels of interactions lead to screen freezing and then being dead after.
OT but how can I see what's sent in the Binary Frame when inspecting the socket in Chrome DevTools? Normally with WebSockets you see the data in clear text.
I would really like to see something like 'round time' and global leaderboard.
Round time would explain blob resets for everyone, like: this round duration is 2 hours.
After the round ends, player's score is then added to the global leaderboard.
Right now, I cant play because on Europe theres a HUGE russian blob that even freezes my i7 16GB RAM for being so big.
Will you be able to pay for your server costs with those tiny ads? I guess if you need to run 12 servers, you're probably seeing a huge number of ad impressions.
Either way, I think it would be cool to let people donate something like $2 to remove ads and make your cell move a bit faster.
Also, please get in touch if you want some help porting this to iOS.
Quick question I can not get the web browser to load. After I click what server i wan it sits at a flashing screen and does not do anything else. Any solutions?
I agree with op on this one, what would we do without superior members like this which are dedicated to devoting there time to posting great content and keeping our website up to date with all the goody goods :^) due to all your efforts, dedicated attitude and peace of mind we will be rewarding you with 100 points behalf of the staff here at ycombinatar, peace fam :)
Okay ahha, great comment here, really defines what kind of community we have here on ycombinator. This really symbolizes us a group, I can tell that this individual respects the community and that he/she aaaaaaaaaaaaa
wow, i have not seen a post like this in ages, amazing that you still see people like this today, absolute hero. Mami is what symbolizes us as a website, this is more than just a comment it is a glue, binding us together as a family. I really appreciate this comment, thankyou so much for your kind words xoxo -A.E.
XMLHttpRequest cannot load http://m.agar.io/?_=1430388662333. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://agar.io' is therefore not allowed access. The response had HTTP status code 520.
This is a nasty thing that's mostly the applications fault but I feel the browser could be a little more smart about it too. The issue is that CORS headers are usually set at the application level, and applications often forget to set them when catching an error.
So if for instance your page makes a CORS request and the MySql server is away. Your app framework catches the error and renders the 500 message, but it doesn't automatically set the CORS.
Now your page receives a response that just gets flat out rejected, you can't even inspect it in the network tab.
The easiest solution is probably to set the CORS headers in NGINX.
Unfortunately, nginx doesn't allow you to set custom headers for error responses by default. You need to add something like the ngx_headers_more[1] plugin for that.
Not sure I agree with your characterisation of women as grave and prudish. Surely human beings of all creeds can see the funny side of being absorbed by a giant circle labeled "COCK".
There is a settings option to choose no names. That should allow you to spare your child the vulgarities of words, He or She will still have to deal with being eaten however.