I’ve been having an issue in my game for a while now where players join and then about 20/30 seconds after, the game freezes for a good few seconds. I recently discovered that this is caused by a ping spike where it goes from around 30/40ms all the way up to 5000ms and then back down again.
I preload assets but these are only images and this is done way before the ping spike
I also clone models into the game, like most tycoons do, however I separate replication of these (after every 10 models) with a remotefunction and the ping spike doesn’t correspond with them - it seems to happen a good 10/20 seconds after.
As far as I know, there’s nothing network intensive I do, and especially not at that specific time.
It’s almost as if the network gets clogged up with the models being loaded and then 10/20 seconds after, the ping spike happens but I can’t see why it would be delayed like that. Has anyone experienced a similar issue?
Any suggestions or ideas much appreciated. Thanks!
@WingItMan I have done that and discovered that loading only a few models reduces the ping spike by a lot, but it’s still there. It also doesn’t make sense why the ping spike happens 10/20 seconds after the models have all been cloned in (if that’s what is causing it)
@Alexander_Ashford Yeah, I used the microprofiler but it stayed pretty steady and did’t reveal any helpful information unfortunately. Thanks though!
Played for about 10 minutes and through the microprofiler there were about 4-5 spikes near the start (up to about a minute in), but if I didn’t have the profiler up I wouldn’t have noticed.
Could simply be a lack of performance on the user’s end, which you’ll always get.
I did notice that the map seemed fairly big, and you are using some terrain for snow. I’ve had issues on lower-end devices with terrain before but, honestly I’m not sure.
You could try two things:
Using the F9 Developer console too look at client/server script performance.
Enable Streaming in Workspace.
Try deleting all of your scripts and just load in the map in a separate place file. Try storing the excess tycoons in ServerStorage (If you don’t already) instead of ReplicatedStorage.