Live data from Hacker News

The One Man MMO Project

onemanmmo.com

21–30 of 119 posts

Re: The One Man MMO Project

#21
post #10
post #2

How do MMOs maintain and update state for tens of thousands of players and then push those updates from the server back to clients efficiently?

In memory. MMO servers store all world state in memory, and each server has a capacity usually in the 10,000 player range. You'd be impressed how fast computers actually are -- 10,000 objects isn't actually that many. Since the server knows where all clients know, the server knows what the client can see, and the server only has to update the client with relevant information, like the 100 closest players to it.

> 10,000 objects isn't actually that many

Yeah but these 10k objects are containing themselves many more objects (item inventory, proximity mobs etc).

Re: The One Man MMO Project

#22
post #9
post #2

How do MMOs maintain and update state for tens of thousands of players and then push those updates from the server back to clients efficiently?

You can do a lot with the right, simple architecture and a programming language at the right level of abstraction.

I bet you could answer 99% of Stackoverflow questions with this generic answer ;-)

Re: The One Man MMO Project

#23

love it! i spent YEARS playing and coding for MUDs and ran a few games as a solo admin/coder. imo it is so very satisfying to watch the global chat channels after a new feature/area/weapon/mob gets rolled out...and what the community thinks of it. i can recall more than one occasion where a well planned quest resulted in interesting dynamics after players started interacting with it. an example; one quest would add a…

Any suggestions on protecting credential transfer in a MUD? I have been wanting to build one but honestly I'm used to the convenience of HTTPS and the passing of credentials over a socket is preventing me from starting.

Re: The One Man MMO Project

#24
Looks awesome! I actually created a MMO prototype before, just by myself. A lot of people told me not it's impossible to do, but it was actually fairly easy.

I used Babylon.js for the 3D game/controls, and I imported free 3D assets from various asset stores for the content. The backend was a simple socket server written in Node.js with socket.io connected to the web frontend via JS using the standard WebSockets API. I got realtime character movement, turning, & jumping implemented pretty quickly. Content became a bottleneck so I stopped developing, but I hope to finish it up sometime in the near future.

Good luck!

Re: The One Man MMO Project

#25
post #24

Looks awesome! I actually created a MMO prototype before, just by myself. A lot of people told me not it's impossible to do, but it was actually fairly easy. I used Babylon.js for the 3D game/controls, and I imported free 3D assets from various asset stores for the content. The backend was a simple socket server written in Node.js with socket.io connected to the web frontend via JS using the standard WebSockets API.…

content is almost always the bottleneck in any form of gamedev

Re: The One Man MMO Project

#26
Wow, looks like he's been at it for a decade. I'm curious how much game development technology has changed over this time and if it outpaces development.

Re: The One Man MMO Project

#27
post #2

How do MMOs maintain and update state for tens of thousands of players and then push those updates from the server back to clients efficiently?

As said before, different type of MMO use different technologies. I used to work on the server part of a (yet to be released) MMO game; we described the technology a bit in the following video [1].

A few things to consider:

- the amount of information to be sent from the server grows quadratically with the number of clients (eg. if 100 players all 'see' each others, you naively would have to send 100*100 updates per server tick); the data received by each client only grows linearly, though

- obviously these are kept in memory, and persistent data is flushed if needed to a permanent storage

- one can reduce the quantity of information by:

+ distance: when a player (an object) is far away, it may get invisible (too far) or degraded (updated only every N ticks, low quality version of the assets sent/displayed)

+ number of entities around: when a lot of players are grouped closely (think a crowd), you can also degrade the information for those further away, even if they are close to the viewer in absolute value, since they are 'hidden' by others.

+ compression tricks: send deltas instead of absolute values for position (smaller numbers can be compressed more than larger ones), don't include the properties that did not change, etc.

- at some point, you (may) need to split the work on several servers, and have an efficient algorithm to split the game space, and synchronise your servers

[1] https://www.youtube.com/watch?v=QeZtqoydXpc

Re: The One Man MMO Project

#28
post #17

Earlier quoted context omitted.

Depends massively on the type of game. In general the two techniques are heavily compressing the data format sent over the wire (e.g. using 16 bit floats instead of 32 bit where it doesn't matter, sending 3 element quaternions instead of 4 and recalculating w), and only sending what the player needs to know based on a radius or some other criteria. Eve Online slows the entire simulation down when huge battles are hap…

Will this change with technology like Google Stadia? Could a massive compute farm calculate all of the state for all players, and then just stream video data down? My guess is no - you'd want the rendering to happen on the edge close to the player, but with a sufficiently advanced compute topology maybe some tasks can be farmed down the graph?

My understanding is that the client-side isn't generally the bottleneck for MMOs, it's all the server-side computation that has to happen to make it all run. Calculating behaviors, physics, etc for hundreds or thousands of players simultaneously is really hard, and Google Stadia doesn't change that in any meaningful way.

Edit: Well, now that I think about it, it depends entirely on the game; PlanetSide 2 is an example I can think of off the top of my head that brought my computer to its knees during big battles. But most MMOs aren't exactly pushing the envelope of graphics quality or physics simulation, so it's not as big of an issue.

Re: The One Man MMO Project

#29

love it! i spent YEARS playing and coding for MUDs and ran a few games as a solo admin/coder. imo it is so very satisfying to watch the global chat channels after a new feature/area/weapon/mob gets rolled out...and what the community thinks of it. i can recall more than one occasion where a well planned quest resulted in interesting dynamics after players started interacting with it. an example; one quest would add a…

Any suggestions on protecting credential transfer in a MUD? I have been wanting to build one but honestly I'm used to the convenience of HTTPS and the passing of credentials over a socket is preventing me from starting.

mbedtls is a bit annoying at first but the windows build process is less painful than openssl.

```powershell New-Item "temp" -ItemType "directory" -Force $client = New-Object System.Net.WebClient $client.DownloadFile("https://github.com/ARMmbed/mbedtls/archive/mbedtls-master.zi..., "temp\C:\temp\mbedtls-master.zip") Expand-Archive -Path C:\temp\mbedtls-master.zip -DestinationPath C:\temp\; Move-Item C:\temp\mbedtls-mbedtls-master\ C:\mbedtls\ MSBuild.exe C:\mbedtls\visualc\VS2010\mbedTLS.sln /p:Configuration=Release /p:Platform=x64 MSBuild.exe C:\mbedtls\visualc\VS2010\mbedTLS.sln /p:Configuration=Release /p:Platform=Win32 ```

Re: The One Man MMO Project

#30
post #26

Wow, looks like he's been at it for a decade. I'm curious how much game development technology has changed over this time and if it outpaces development.

Probably some Unity3D starter pack and something like Improbable will get you there in few evenings.
Post reply on HN