What is "movement interpolation" and what's the best way to utilize it for a Bee movement system?

  1. What do you want to achieve?
    I want to make a bee movement system like in the game “Bee Swarm Simulator”, so other people can use it to better show of their ideas for Bee Swarm Simulator.

  2. What is the issue?
    I don’t know which would be the best way to achieve this. I was thinking of using the TweenService or the BodyMovers, but both are very resource-intensive and Onett (the Bee Swarm Simulator developer) also mentioned that he moved away from using the BodyMovers, because they caused lag (which I can confirm) and no Roblox physics are involved in the new movement system, which doesn’t cause lag and runs way better.

image

He also mentioned that the “new bees are animated and moved independently on the client and server”.
→ I would translate this to that the server tells the client where to move the bees and the client animates them.
My question to this: doesn’t this constant traffic between the client and the server also lag the game? There can be up to 250 bees and in one server and everybody can see everybody else’s bees, although there is an option to only see your bees. Oh, he also mentioned that with 250 bees there will be some small unavoidable lag, which is okay since 250 bee server are very rare.

image

→ Adding onto this, he said that the new system now uses a thing called “movement interpolation”. What is this and how can I implement this in Roblox?

I’m guessing it’s a movement system run on Lerping (or Interpolating) the character (in this case is a bee model) CFrame. You can learn more about Lerping here

1 Like

Wow, I expected something more complicated, but this makes things easier. Thanks for taking the time to answer my question!

1 Like

Oh, I have a question to that: If I have to constantly send updates for the bee movement to the client, doesn’t this cause lag because of all of that network traffic?

Actually, it’s the other way around. The client handles the inputs by the player. Then it sends parameters to the server so that the server may change the bee’s Position or CFrame. It will produce maybe a little bit of lag, depending on the amount of bees and players are in the server. However, they could just make it so that the local player will not render bees that are far from the player’s character.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.