2

Solved: Boat platforms EXTREMELY laggy

Tim3555/1/22 10:53 am history
5/4/2022 1:56 am
Tim355
Hello. For my map I created moving platforms using boats. I won't go into detail but basically there are armor stands with special names and boats will move between them. To make the boats smoothly move I teleport the boats towards their target little by little every tick. However just having like 20 boats or so causes the server TPS to drop to 14! (Even when 0 players online)

Is there any way to make this less laggy?
-Thanks Tim
Posted by avatar
Tim355
Level 1 : New System
1

Create an account or sign in to comment.

6

1
05/01/2022 11:30 am
Level 25 : Expert Engineer
WhoAteMyButter
WhoAteMyButter avatar
Teleport the boats in more of an increment.
1
05/01/2022 4:58 pm
Level 1 : New System
Tim355
Tim355 avatar
Yes but I'd like to avoid that if possible. I mean why does teleporting some boats cause so much lag anyway?
2
05/01/2022 6:50 pm
Level 25 : Expert Engineer
WhoAteMyButter
WhoAteMyButter avatar
Because you're teleporting 20 boats to an armor stand every tick. Maybe your PC just isn't able to handle it. Maybe you should run a debug profiling to see if something else is causing the lag.
1
05/02/2022 1:42 am
Level 1 : New System
Tim355
Tim355 avatar
Actually the problem is most likely not my PC, since the server is running on a dedicated system. Here are specs: CPU: AMD Epyc 7351P, 4GB Memory.

Also I already checked timings and 129% of the tick are scheduled blocks (which I believe are always active repeating command blocks), and if I disable only the boat thing then it drops significantly.
3
05/02/2022 1:46 am
Level 25 : Expert Engineer
WhoAteMyButter
WhoAteMyButter avatar
Use functions instead of command blocks.
1
05/04/2022 1:56 am
Level 1 : New System
Tim355
Tim355 avatar
This ended up being my solution, thanks!
Also it's incredible how much faster functions are compared to command blocks!
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome