Saving player interaction, terrain, and buildings/parts

Hello! I’m interested in making a war game. If you’ve ever played minecraft on a server, you would know that everything saves! Is there anyway I could save smooth terrain, models, tools, and parts using datastore? And how should I organize it?

This is really important as I want players to be able to dig out large chunks of land, and commit lots of time to building large structures without having to worry about their work being lost when they leave!

Again, this would include smooth terrain, and removed parts of it from player interaction, such as digging.

-artificialflavouring (@lukethebestpug)

Use a datastore and tables to store the data. Have a universal language so that the game knows how to read it. Use readvoxels and writevoxels to add or save smooth terrain.


[1] = {
{0, 0, 0},
[2] = {
{0, 4, 0},

1 Like

So wait, I think I’m getting somewhere with this. Say that you dig a voxel in the terrain, should I insert a region3 value into a table every time, then when the game reloads data, clear all of the terrain within that space?

And, I was going to use procedural terrain generation, Should I save all of the region3s that are turned into smooth terrain too?

And again for models, I’m presuming I just save the part/model type and it’s position to a table, so when its reloaded it just grabs the model from replicated storage and positions it?

Same for tools but its just a table of which tools, and their owner/parent.

are you planning to save only a player’s changes or just the whole server? because the latter will be very inpractical and bring a lot of problem.

Well, again, I’m trying to save all of the essentials, like where terrain is, and where buildings are, as well as tools.

There is a limit to how much you can save based on how you structure the table. If the table is inefficient it will end up maxing out. You can store about 4MB of data for your game, unless you were to use multiple datastores to store different sections of the game, then theoretically you could have an infinite amount of space for your data.