I know all talks of improving the networking on BYOND have been shot down in the past, but with the ever growing community size on BYOND it can't be put it off forever. And improving networking capabilities would help bring in more players in the process.
I really don't know anything about how the internal networking is setup for BYOND, so if you (Lummox, Tom, or anyone else who has actual facts) could post some information about it here, maybe we could come up with viable solutions for improvements as a community.
I ran some simple tests today and also analyzed the data from my server in order to see what a BYOND server was capable of.
The server I use has a 100mbps connection meaning it can send and receive at a maximum of 10,000 kbps. My computer has a 10mbps connection meaning 1,000 kbps download speed. However, when downloading the resources from a game; the speed only averaged 133 kbps, is there some built-in restriction on byond? or just a general limit to how fast it can transfer data?
Again, when looking at the the total use of daily bandwidth on the server it only sends, on average, 231 kb per second of a maximum 10,000. I'm not sure if this means that BYOND just doesn't need to send 10,000 kbps of data per second or if it is reaching some sort of internal restriction. (20 GB per day bandwidth usage, my math might be wrong here =P)
From what I've seen on the server; the overall system usage (according to the task manager) never exceeds 25% and usually stays around 10-15%, while the networking (again according to task manager) only expends 3% of its maximum. The in-game world.cpu of HU at the time of this writing was reporting an average of 68 players with 11% cpu usage. So the lag seen in-game can't possibly be caused by system exhaustion or overuse; if anything it's capabilities are being under-used.
Also, I run multiple BYOND servers on my server. 5 or more of them at all times. Logging in to the main server while it has 90+ players will present laggy gameplay, however logging in to one of the smaller servers at the same time, which has say only 25 players, will be as lag free as a BYOND game can get. Meaning that each of the servers are reaching some sort of personal max without slowing down the others that are being hosted from the same machine.
Also, BYOND noticeably lags regardless of player count, or processor usage. Even the simplest demo, say a simple map, basic animated walking player sprite, and nothing else; when connected to a remote server will visibly lag. When I say "remote server" I mean if you host on one machine and play on a different one; hosting on daemon/seeker but connecting to it from the same computer will still present smooth gameplay.
This can make it hard to judge some aspects of gameplay when testing them; unless you go through the hassle of uploading the game files to a server and testing on the hosted game.
Recently I set up a fully functional pixel-based movement and collision system, which ran fine, and looked fine when played locally, but when connecting to a server there were horribly visible jumps between movement and missed animation frames that made the system practically useless.
Though this isn't as apparent in games that use the built-in systems, you can still see a noticeable difference in the gameplay between playing a game locally and playing on a server, even if you are the only person in that server.
It seems like the lag in BYOND games will pick up mildly around 30 players, then more-so at 50, and by 100 the lag becomes a major hindrance to gameplay. I'm sure this varies by computer specs and networking speed on the machine, this is just in my experience.
I only post that previous section because I recently messed around with hosting a private WoW server, which, though it never got over 7 players online at one time, it didn't display any more or less lag if it was hosted locally or if I was connecting to the remotely hosted server. And after contacting the hosts of 2 popular private WoW servers, I confirmed that they host them on a single machine, and yet they can get 6000 players in a single server with as much lag as a BYOND server would have with 60.
As I said above, I have no real insight into how BYOND manages its networking internally, so this suggestion might be a mute point. But if the server could do some pre-processing, determining which values have been modified since the last send, it could cut down on the amount of information that it had to send to each player in each transmission, which would in turn reduce the amount of information that each client would have to process and then update. Since the z and icon variables change a lot less often than say the x and y do, and in the case of many NPCs never change at all, running some per-player pre-processing on the server to determine whats new could cut down on what information needs to be sent. Though this would require some more processing on the server's side... but that's kind of the whole point of a server, to process the inner workings of the game so the players' computers don't have to.
As mentioned above, if you could at least post some details about how the current systems works; maybe members of the community could come up with viable suggestions for improvements? If servers could hold hundreds, or even thousands of players, we could fill them up; we just need the opportunity =)
I think before I get into the math, the 100 megabit connection rating you're citing is likely the Ethernet speed, which is (supposedly) how fast data flows in your network, such as between two PCs, or a router and a PC.
As far as your math -- connections are always rated in bits. When an ISP claims they can give you 512 kilobits, your physical download speed is 64 KB/s. Let's see what speed your connection is at:
1.) Megabit-rated connections have to be multiplied by 1024, since there are 1024 bytes in a kilobyte, and 1024 kilobytes in a megabyte, etc. -- 10 megabits*1024=10240 kilobits.
2.) Since there are eight bits in a byte, you divide the above figure by eight to get what would be reported by, say, an IE file download box -- 10240 kilobits/8=1280 kilobytes.
Now given that 1280 kilobytes per second is still an impressive download speed, that's what you're paying for with your "10 megabit connection". Sounds a lot more impressive as advertised, doesn't it?
With that out of the way, there's also something else to be known: your connection is simply *capable* of 1280 kilobytes per second download speed. Not only are you likely working against network congestion and line resistance, you can only download as quickly as the server can send it out. 133 KB/s is likely a 2 megabit connection, so that server can only send data around 128 KB/s, so that's how fast you download. There's precisely zero you can do about it. Similarly, if your PC was hosting and a 1 megabit-connected player dropped by, they could only download the resources from you at around 128 KB/s.
This is why I'm happy with my 512 kilobit DSL.
world.cpu is just a measure of how much of a tick the server requires to process the commands issued in the previous tick. 11% world.cpu means the server can process all of its' commands and still has the capacity to process around ten times as much in the same amount of time. Similarly, 120% world.cpu means it needs 1/5 more time (or 20% of a tick extra) per tick to process its command queue, which is obviously bad since it's unable to complete its workload before the tick has passed. Your 11% world.cpu is really a matter of workload shortage than network underutilization.
From what I understand, BYOND servers hold all of the cards and every client has to ask it what to do continuously, whereas with games like Warcraft you've downloaded a gigantic program with a ton of the instruction built into it already. I think the primary advantage is the use of client-side processing, since it isn't the Warcraft server PC that's making your health overlay.