Where should I render terrain?

If I have code that will render new terrain (Roblox smooth terrain) based on perlin noise as the player moves across the map, and removes the terrain that is out of range, should this be on the server or client.

I was thinking let the client process this, since its local and no networking needed, but then I started to second guess this.

If it was on client, what about npc’s would the server be able to move npc’s if the terrain is only on the client?

Also if on server, would that be a lot of bandwidth useage to send terrain updates?
What if the server created terrain around each player, but didn’t remove it?
Or if that removal was only after the terrain was unvisited for 15 minutes, etc…

So what are some thoughts on how this should be done?

You can do 2 things to achieve this:

  • On the server, do not render the terrain, but render parts under the NPCs to give them some ground.
  • On the server, make the NPCs have the nearest character’s player as the NetworkOwner.

What will that do, to have the npc, have the network owner of the closest player?

It will make the NPCs physics controlled by the player who renders the terrain on the client.

oh ok, I get that, thanks.

I will experiment with this.

What makes the most sense to me is to create the terrain on the server and render it on the client (like Minecraft). Creating the terrain on the server allows all players and objects to interact with the same terrain shapes, and rendering it on the client allows each player to have their little section of it visible without rendering all of it. This will also allow all your NPCs and other objects to interact with the terrain correctly (I would probably unrender the NPCs and other physics objects too, on the client)

But considering this is the Roblox smooth terrain, doesn’t it auto render to all clients when it is created on the server?