Spike in ping after joining

Hi all,

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!

4 Likes

Can you set up a separate place and disable different parts of the pre-loading?

2 Likes

Using the microprofiler might help you out.

Its extremely helpful in analysing performance problems within a game.

Pressing Ctrl+F6 brings it up in ROBLOX Studio.

1 Like

@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) :thinking:

@Alexander_Ashford Yeah, I used the microprofiler but it stayed pretty steady and did’t reveal any helpful information unfortunately. Thanks though!

1 Like

I’ve had that problem. Not really sure how to fix it.

2 Likes

which game is it, can you provide a link?

2 Likes

🎮Game Dev Life🕹️[Beta] - Roblox (It is paid access alpha at the moment though)

3 Likes

Pretty cool game. I like it.

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.

Hope you get it sorted.

2 Likes

Thanks! :smiley:

Hmm yeah, thing is, it’s definitely network related as it’s a ping spike!

The terrain isn’t usually there and it’s only a small amount so I’m pretty sure it’s not that :confused:

Thank you!

1 Like

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.