I wonder Building slot data consume much of database

You can write your topic however you want, but you need to answer these questions:

  1. I want to know that the data size of building slot data consumes much of database that roblox will provide for each place or (server/game).
  2. If example i allow player to have a slot of 50x50x50 so approximately there will be 125000 item in each table slot (also each item will have CFrame , color , ,…)
  3. also my game will allow player to have multiple save slot up to (20-30)
  4. so will it be a problem of data size for saving?

Sorry if my english is bad.
Thank!

you can use buffers to serialize data
Roblox will apply some compressions to buffers afterwards automatically.

2 Likes

Thank you very much for the advice!!!

1 Like

wait one more thing
which will be better i create buffer for each block or should i create buffer for whole slot

depends.
Im pretty sure not much differance anyway

Here like this but wont it be limit to how many value or string that i can store for each buffer?

buffer.writef64(objectBuffer, 0, CFrame.new(0, 5, 10).Position.X) -- Store X position
buffer.writef64(objectBuffer, 8, CFrame.new(0, 5, 10).Position.Y) -- Store Y position
buffer.writef64(objectBuffer, 16, CFrame.new(0, 5, 10).Position.Z) -- Store Z position
buffer.writestring(objectBuffer, 24, "TreeModel", 8) -- Store model name (max 8 characters)

local xPos = buffer.readf64(objectBuffer, 0)
local yPos = buffer.readf64(objectBuffer, 8)
local zPos = buffer.readf64(objectBuffer, 16)
local modelName = buffer.readstring(objectBuffer, 24, 8)

print("Object Position:", xPos, yPos, zPos)
print("Model Name:", modelName)

I feel like 64bit floats are more than needed for a 50x50x50 grid… Also the maximum buffer size is 1 GiB (1_073_741_824 bytes), however you can’t have that much data for 1 player anyway

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.