It looks like OP's satisfied with that answer, so I'd be inclined to let sleeping dogs lie there - unless anyone has recommended edits that could improve the question's focus?
user92578
I don't think there's anything that could make it game development specific
The best guess I have is that maybe GDSE has better knowledge of sfml than the other stacks? But I'm also not convinced & suspect there's a better home for it with more expertise than here.
@Almo According to their help, superuser is not about programming and software development, so it doesn't look like it should be sent there.
Currently my "game-server" is running on one machine... using a ecs as the architecture ... at some point i would like to have a way to add more "servers/machines" to scale horizontal... but i have no experience with that topic. As far as i know ( Knowledge from a few articles ) there multiple ways of doing this, for example one server per region, one server per world... one server for mobs, one for logins... but how is this done ?
Do you write new server code for each of the instances ? Or is it possible to provide one server code which is getting used by all of them ? How do the instances communicate with each others ( Usefull for mmos ) ? :/ Oh and is a "ECS" a good architecture for providing horizontal scaling ? If so what should we consider ? ^^
Currently its just a single instance... simulating the game world... lets say i wanna have enough flexibility to add another instance to reduce the workload on the first instance... how do we do this ? Are we forced to hardcode what each of the instances should process ?
Or is there a way/architecture to let multiple instances operate on the same world
It sounds like you already know hard-coding would be a terrible solution here, so just don't do it. Control it with data.
How we do that depends on how you want to split responsibilities between these instances. For example, if they're responsible for completely separate regions that can only be crossed with a discrete teleport, then they have almost no interaction beyond sending each other messages about players teleporting between them.
And if its a real open world without teleportation ? The only way i could imagine is that each instance is listening for "child" instances... if one is available they transfer a set of entities to the child... this way each instance would split their workload once a new instance was added...
but this requires a huge server where all entities are laying inside the ram and all instances operate on their assigned sets... furthermore it may happens that one system from instance A modifies a entity from instance B
Then you need another way to parcel up responsibility. Maybe you divide your world into chunks, and each instance is responsible for maintaining and updating the entities in its chunks. It can then have lightweight "replica" entities for stuff in adjacent chunks visible from those regions, which it updates based on messages from the owning instance. Similarly, it sends information about entities in its bordering chunks to the neighbouring instance.
When an entity leaves one of my chunks into a neighbouring server's chunks, I send an ownership change message to pass the entity into the other server's authority. If it was a player, I tell the player to start talking to that server instead (unless you have a gateway server in front of these servers that handles that routing)
What you are working on is not something we can give easy answers to
it's very complex, and the best programmers in the world struggle with these issues to make usable solutions in specific environments given the relevant product
so what I would recommend is start scaling your thing. Come to us with specific issues you have. not these super-broad questions about strategies
@DMGregory Thanks :) This way we could also add new instances on the fly... for example if a area is heavily used... @Almo I know, im sorry... already searched on several websites for implementation details... but mostly i only find pure theory :/ probably this is too big for one person, it looks like plenty of work...
It's moreso that every game does this a bit differently, because their needs are different. You won't find a simple universal recipe for a broad topic like this.
I find they start to snowball a bit once you get past the halfway mark. The longest bit was sorting out all the topmen and seamen, since folks rarely call them by name.
I wish I'd realized the numbers on the hammocks corresponded to the crew manifest. That would have saved me some guessing.
Big time. I'd have liked it if I could use the book itself as a fast travel. Especially for The Calling. I had to scrub through those memories several times to catch everything going on, and it sucks when you can only do that in one direction sequentially.