[FEATURE] Dedicated servers
Description
Having the world saved and streamed from the dedicated server, and saving the states of each player on it, would be beneficial in a number of ways, which I've listed below.
Idea for how it could work: The world is mainly saved on the dedicated server, clients load in the chunks of the game depending on where they are with a radius similar to a single player game for each user, they load it into memory with an option to cache it for faster loading / preventing unloaded chunks.
Pros
- Allows for better world synching where before certain things like fire and what not could be desynched.
- Allows for better deployments in infrastructure including things like deployments on AWS.
- 'Might' allow for a performance increase on the client level as the world could be loaded in faster / dedicated storage which might make the game more stable for longer runs.
- Makes longer runs more viable as the server can then be paused / unused for longer periods of time. While allowing players to have their runs saved per server meaning they could switch between servers and play different sessions with different seeds and mods at the same time without needing to setup much after the initial setup.
Cons
- Would probably require some more networking synching
- Higher bandwidth
- Complex code
- Heavily modified client / server versions.
- Would require a 'headless' Noita with mainly command line interface for logs and commands.
- Probably a few other things as well.
That's pretty close to how it works already in terms of world sync, and how new entity sync works (not yet released, available on master).
Dedicated server is almost possible already by running noita-proxy in cli mode (see --help or readme, windows binary is a bit funky because it's built with console support disabled, so you won't see anything it prints), but there are a couple important things that depend on host having a noita instance running, so this has to be handled in some way.
Thanks for the quick response.
At the moment I don't have time to take on yet another cool project to contribute too, but whenever I get the time I'll try the console connection out.
And thanks for making such an awesome mod, other than the two bugs we found it works quite good. So far the main reasons of dying is our wand builds and fighting the ghosts hahaha