Best map loading method?

I am trying to implement a Subway surfer type environment for my game. The problem is I am trying come up with a method that will not cause jitters in player movement and lag.
So far my options are this:

  • Keep the player area static and move the background map in a loop

Now, in this method, a player is allowed to move within certain area in X-Z plane. The background maps which has no effect on player’s interaction will continue to move and loop in background locally

  1. Pros = No jitter movement among players
  2. Cons = Moving large maps locally could cause lag

Move the players constantly in one direction and load the map dynamically

This is the most common method used in games. The background map dynamically loads in depending on the player’s position

  1. Pros = Lag reduction
  2. Cons = Jittery movement among players.

My goal is to have 0 Jittery movement. This is possible in option 1 as players are not moving constantly in one direction. If they do, players with slightly high ping can see jittery visuals on other player’s movement.

What should I do ? I need help asap. If you got a separate method, I am all ears.
Thanks for the help in advance :pray:

if you want zero jitter, you have to move the map on each client separately instead of on the server. Send the starting timestamp for the animation to the client so it’s synced and just move the background there.

Map syncing for all players is not mandatory. It has 0 value in player’s interaction. Its just for visuals. And all the maps load locally ( client side ). But if I do this, client will face fps drops because the entire map is moving on the background

How are you moving the parts, and how many parts are there?

A single map has close to 15 Baseparts. But it varies from map to map. The map is a model and I used PivotTo() in RunService for it.

Is this a wish list or do you need help with a script here?

PVInstance:PivotTo() is pretty efficient, you shouldn’t run into issues even with a few hundred parts, but the most efficient way would probably be to weld all the parts together and set the CFrame of one primary part.

I am trying to find out the best logic before I program

Truly hard to say… Depends on a lot of things… The outcome performance is even hard to gage. You’ll have to mock a few up and try it both ways to really know.

If your looking for an infinite type method your gonna want to keep the players static and move the map. You may have to develop some workarounds for certain things at least to get the desired effect but you will at least be able to have it run infinitely without worrying about the player running into the weird areas of the world as they get further from 0, 0, 0. They most likely won’t have to worry about that regardless but still something to think of.