Hello, I need some suggestions on how I’d go about making custom worlds / islands similar to Minecraft. The concept is simple, I’m trying to make the ability to let players create their own save file / world and players can invite their friends to join their world and play on it and such. There’s a couple parameters that I need to keep the same though.
There’s a couple of notes before getting into this subject:
The map will be the same for every world
Players have the ability to place anywhere in building zones across the world
The game will save player’s built structures inside their world
Saving the player’s map will save the map itself instead of the players to prevent other people joining other worlds and their progress loading on top of another players (perhaps a simple check to see if the joining player is the owner of the world or not)
The worlds are a big open map
The worlds are just like a normal game; has shops, trees to chop, minerals, etc.
The worlds will all have the same scripts
The worlds aren’t randomly generated, they are all the same as said above
So pretty much a rundown:
I want to create the ability to let people have their own dedicated server that loads the player’s placing progress with all their built structures inside the world. I’m trying to keep my idea as simple as possible. Allowing players to create a custom world in the main menu, join their custom world they made, place structures after buying blueprints, when the player leaves save their world and structure place changes to it, allow the player to come back to the game and join their world, load their structures placed onto their world. Players can invite their friends to join their world and make changes as well as help them progress through the game.
How could I possibly go about doing this the correct and simplest way? Surely there’s a module or API recourses I could use. Thank you!
What you could do is create a perlin noise voxel generator or something similar, and incorperate a seed system. The player will be given a random seed or it can put in custom seeds to generate the world. You can then save the seed to regenerate the exact same map when they rejoin the game. Scripts being the same are self explanitory, and to save builds you can have a table full of all placed block locations, and if a block is under the ground (you can check the Y value), save that block as an empty block for it to be destroyed
The seed part could work, but otherwise I want to keep the same map for everyone, just different map changes for each person. Exactly how that works, minus not keeping the map layout. I want the map layout to be the same.
Correct me if I’m wrong, but this sounds similar to how Rust servers typically operate: the map is the same but each server has its own player-made buildings or other things changed by players.
If the map is the same for everyone’s world, saving only what is placed down by players and not includded in the “base map” would be ideal, but if you are going to allow the players to alter the map in any way (like destroying terrain or other bulidings that aren’t player-made), then you could tag objects that are changed by players.
As @ThanksRoBama stated earlier, using reserved servers would be a good idea. You can take the access key given when you generate a new server and save it to a DataStore for the player that they can access. You can then use that access key as another identifier to get world data, that way anyone can join it with the access key. You can either make a system to find other players’ access keys or put them somewhere for players to send to their friends. There are plenty of DataStore modules out there that you can choose but Roblox’s DataStoreService would likely suffice.
The design of the experience is entirely up to you, though.
Bringing this topic back up this is exactly what i was talking about. A rust server or minecraft world. Anyways, I also have a question regarding loading into the worlds. What about if Im making a main menu to load into a player’s world? They can go through a list and select a world they made or make a new one. Itll then teleport the player to their own world. I guess im confused on how I could make it so their private server (dedicated server) knows which world they selected or made and how it’ll know to load their data in that dedicated server.
I can only assume it has something to do with making two places. One the main menu and the other the main game. But i dont know how id make the main game know the data when a player is sent to that main game and given a dedicated server with their world key/id.
Somehow I feel deja-vu with your post. I know theres many posts that ask this same question, but yours sounds very familiar to me…
As this question has been replied many times, its just about:
ReserveServer per player, saving the Code/Password and the player into a DataStore (so each player can run their own “dedicated server”)
Map saving, if the terrain/map its the same for each player, and they only will save their buildings, then save the models/parts the player placed with its coordinates etc into a DataStore per player
There are many ways to achieve this, but having the starter place be the main menu where the player selected the server to go would be how I would do it.
Places within the same universe share the same DataStores. Places aren’t the same thing as universes, but both make up what Roblox calls an “experience.” Ideally, the following would probably suffice:
One DataStore that stores the player’s “worlds,” which consists of a list of tables with data such as ReservedServerID, WorldName, CreationDate, etc.
A second DataStore that matches the ReservedServerID to the saved world data, which would be loaded when the reserved server is started.