Which data type I can use?

  1. I want to make a game and it has a UI like Instagram page people can share their posts like pictures and they can add more details so I mean posts are in big folders.

  2. I asked chatgpt and he said big files for data will make your game slower.

I want you guys to help me about which data I can use and how to use it i really need it please.

1 Like

You can use a dictionary and map each pixel location on the image to a Color3

local imageDict = [
Vector2.new(0, 0) = Color3.fromRGB(255, 0, 0)
Vector2.new(1, 0) = Color3.fromRGB(0, 255, 0
Vector2.new(2, 0) = Color3.fromRGB(0, 0, 255)
...
]
for pixelLocation, pixelColor in pairs(imageDict) do
-- do pixel generation handling here. instance.new, editablemesh, etc.
end

And then you could use DataStoreService to save the image dictionaries like Instagram


Further Reading:

Sorry for misunderstanding I want to make the page same on every server and there is properties like clicking to a post you can leave a comment down below and the post is a folder for player made movies. Folder contains animation objects and you know all of the objects has a lot of properties inside of them so I mean folders has a lot of objects I want to keep them in my data the data won’t be a special data for player it will be only for the game itself.

You will probably have to use MessagingService if you want every server to see the same post.

1 Like

Your filling the entire data scope in less than 2 images buddy.

1 Like

Unless you use a scope for each image :thinking: thats actually pretty smart i take that shi back

Yes brother I can use that but what if every server closes what will happen to player posts I want to save them too can you recommend me a way to add them to my database.

You should just save a datastore, where the key is the player and the value is their posts.

But like I said post is a big folder it has a lot of objects how can I do that

You shouldn’t have lots of objects to represent your data. Your data should be represented as tables. From there, you can generate all the objects you need.

How can I save tables to my data I will use ordered data store for pages but I don’t know how can I.

Well, do you know what Object Oriented Programming is? You should look it up. There’s many tutorials on devforum

I actually want to achieve, you know in some games there is player inventory and inventory has objects. Objects have some properties like quantity, power and some more I want to store an inventory which for the game. The game has movies folder, folder has an animations folder and an images folder in it both of them has objects image folder has image labels and animation folder has animations objects also they have IDs. I want to store all the images inside the folder and their IDs can you help me about it.

Again, you shouldn’t be storing it in folders.

local PostObject = {
imageID = 1,
postID = 2,
}

for i,v in PostObjects do
GenerateLabels(v)
end

Okay, I got it but I don’t know how to store a table if you’ve got an example can you show me.

I don’t think this subject is within your skill, yet. Better just stick to the basics

I just don’t understand data stores man please help me about it.

Here’s a guide Data Stores | Documentation - Roblox Creator Hub

Thank you for your help. I’ll use this page.