How to optimize big map

I am making a story based game, that is going to have a huge map, with lots of assets in it. I have implemented custom optimization, that locally stores all the assets that player cant see into a replicated storage, and keeps in workspace only those in sight. But i wonder if that will be enough to guarantee nice performance with a huge map and tons of assets?

What are the best strategies for optimizing a map?

P.S. My scripts are pretty optimized too, so no need to worry about them

1 Like

Have you looked into StreamingEnabled?

1 Like

Try not to make unnecessary unions, if possible make them meshes. I would also look into procedural generation/rendering if the map scale is huge enough to warrant it.

3 Likes

Are you storing the map models inside of ServerStorage?

This is the easiest way to help with performance.

2 Likes

If you want to load in a map, instead of loading in the entire model/object at the same time, try iterating over the map and loading in chunks of it slowly.

It helps with performance

1 Like

If the client is gonna retrieve it, it must be in replicated storage.

1 Like

Do you mean view it, or actually interact with it?

1 Like

Like actually retrieve it. The client can’t retrieve stuff in ServerStorage, which is why it’s called Replicated storage, server and client can access replicated storage whilst server storage can only be for server.

When I say that I meant to see it. It’s more safe to store it in ServerStorage to keep it inaccessible from hackers and hacked clients. I understand the client can’t access things in ServerStorage.

2 Likes

For example, I previously explained this to someone else.

If you wanted to make a custom leaderboard, and you wanted to get a players avatar photo, you can setup it up to where, you have a LocalScript in StarterPlayerScripts. You can request the data stored in ServerStorage, using a remote function. Through this remote function, you request the avatar image, then load it onto the GUI. Simple.

See here for more info about RemoteFunctions.

https://developer.roblox.com/en-us/api-reference/class/RemoteFunction

Then you would fall off the map when he lags lol, and also let’s not forget that it’s inefficient, even though the hacker can’t access it, a hacker is determined to copy all part frames.

Performance > safety (unless it’s a big security issue)

And like this, you are ruining the players experience instead of helping them, which ruins the entire purpose of fixing lag.

Use gameplay paused and disable shadows from lighting

I don’t understand you mean by lagging… When you parent a model or part from serverstorage into the workspace, everyone can view it…

If you have internet ping, the parts will have a load delay and you will fall down.

So what’s the point for this “safety” if it’s gonna get parented to workspace = stealable anyway? Just use replicated storage bruh.

You don’t get it? We’re storing it inside of ServerStorage so people can’t just access it while it’s inside of ServerStorage… You’re not making any sense…

YOU are not making any sense. You are requesting the server to get the objects, which therefore can be stealable. Now let’s stop this pls.

If people steal, people steal, but don’t you want to prevent people from stealing it as much as possible?

No. The server is doing it independently… What’s the point of putting inside of ServerStorage if you can just request it…