I want to try optimize my game as much as possible, and 1 of the ways I think can work is Terrain. I want to cut it into chunks (like roblox does) each is column of 16 voxels in X-Z dimensions and max by Y. Then I want send some info to server about player’s position, and server will return table with terrain voxels.
But, I met 1 problem - IDK how to delete terrain on client. I don’t want use Terrain:Clear() because I have really big terrain, like 24.000-30.000 studs, and calling that function will lag client for some time.
So I want to ask you - is there any way to make that terrain deletion, or no?
Bumping this topic because it’s almost half-year old and no one responded. Help still wanted.
You can gradually set all terrain to air.
If your main concern is performance I think it’d be best to just rely upon StreamingEnabled and graphics settings as compared to trying to reinvent the wheel and procedurally load in terrain as it’ll cause problems for people with bad ping and will probably not help out performance all that much (potentially even worsening it due to the fact the client has to clear out terrain then fill up new terrain once more)
Either way, if you’re really hellbent on doing something like this, you could just not have any terrain at all whatsoever, and store positional, rotational and size data somewhere else (be it in a table or as invisible parts that remain collidable as fallback) and just send over that information as the client moves about. Having a game with that much terrain’s bound to be laggy either way so it’s best you just work with what’s given and perhaps try to just decrease the streaming radius.