In my project I need the game to be split into sectors so land able planets and moons at large size would be possible and I need to split them into different places for performance reasons.
- I want to create a server teleporting/meshing system, I have the teleporting between places done, but I have heard of something called reserve servers but with my limited coding knowledge in LUA, I don`t know if you can save player data across reserve servers? Should I even use reserve servers?
Also I want to implement a form of PES or Persistent Entity Streaming sometime in the near future. Would this be possible? Here’s a link to a post from Star Citizen Devs about what Persistent Entity Streaming is → Server Meshing and Persistent Streaming Q&A - Roberts Space Industries | Follow the development of Star Citizen and Squadron 42
1 Like
For something like that, you could use reserved servers, but I don’t really see the point in that. It’s also not great to have a server per-section as what happens if one section becomes overpopulated? You can’t let them enter without creating a secondary server (requiring you to generate a new server once each server for that region has filled) for that section, which will cause some de-synchronization.
I would probably actually recommend a combination of things. I would use Memory Stores to keep track of sector and player data cross-server. This way you can match players within a given region and connect them to the same server.
From what you’ve provided, there does seem to be a combination of the two methods. I would probably prioritize syncing with servers that the player’s friends are in and people who were nearby. It’s a bit complicated depending on how you go about it and how seamless you want the experience to be.
But I think the main thing is that you don’t actually need separate game places. You can just load everything in segmented chunks. In fact, you don’t even need to connect between servers. You could actually force a mesh by using 1-player servers and connecting relevant data via Memory Stores, including player positions and the like.
Honestly I’m not sure the best way to go about this. I’ve thought about it before, but never came to a conclusive answer. The easiest solution would just be to slap on a server universe. That server would house one instance of the universe. Again, only loading things in chunks as to not cause lag. Also I would load things client-side. Only issue there is that the player limit would be based on the server, not the region. So you have options, perhaps you’ll want to use a mix of them.
2 Likes
Hi, thanks for your reply. My reason for wanting to have planets in a different server is because I haven’t found a way to create terrain in a sphere and for it too be big enough too hold up to 100 players on the surface and them not being able to find each other the terrain is so large. If you could think of a way that would be a great help because I would love to have a seamless transition from sphere to plane.
As for saving data cross-server, I think I could achieve that so thank you for the idea, but one thing I can think that will complicate things is the players ship. I would have no clue on how to spawn the player in their ship in the next server the warped too. As for the Persistent Entity Streaming how taxing would that be on performance? Say if there was 100 dynamic guns/backpacks or armour at 1 outpost on a planet I feel like that would be too taxing on the datastore and server. But then again this is the first time coding servers and things like this so I have no clue whats possible
1 Like
Terrain is sadly not that adaptable. The sphere will have to be a mesh of some kind that would have to be huge. Then as you fly closer to it, eventually it will be hard to tell that it’s curved, at which point you could start loading in a flat surface. The flat surface doesn’t actually need to wrap around in a sphere shape, you can just have it procedurally load as you walk, so that eventually after walking far enough, it’ll generate land that would have existed from the opposite side. But this poses all sorts of complex things such as mapping a sphere to a flat plane, as well as syncing player positions relative to that.
If I’m being honest, while this is definitely possible, I think it’s overly complicated and far beyond the scope of most people, especially starting out. I would recommend either simplifying your goals or going with a smaller and more manageable project. There’s also the fact that Roblox isn’t built to work with large objects. Lighting breaks down pretty easily, unless you use some fancy techniques to work aroudn that.
1 Like
Oh wow I did not think of that, ok that would be a great way to do it. Is there a way I could make the terrain load in / out from a script?
Also Persistent Entity Streaming isn’t necessary and I wouldn’t implement it into the game for a long time definitely not as soon as it releases.
1 Like
Yes, terrain is scriptable thankfully. If you can work out all of the maths and complex systems for something this big and complicated, I will be quite impressed. Well done if you do
1 Like
Ok, I will try lol thank you for all the help