I’ve been hard at work programming a Clans and Guides fort for about a couple months now, and it’s been going great, until recently. As I put the finishing touches on it, and we began lots of testing, one thing we noticed was that it lagged. Not just you know “oh a spike here, a spike there”. It got worse.
Usually when we test it, this game has an upwards of 16 people in it at once, sometimes more. A game of 16 people in my opinion is not a lot, since roblox servers can now support 100. When you first join the game, it’s pretty stable, no issues and no lag. You get your 60 fps that roblox caps you at.
However, flash forward, as most C&G forts have, a “start” command. This effectively distributes weapons, activates a timer, and anything else tied to it. Some lag is to be expected during this period. As expected, there is some lag. Most players don’t go lower than 50 fps at this point. I can live with some lag like that.
However, most “matches” in this game last 25 minutes or longer, and typically about 5 minutes in, players start noticing extreme lag (Including myself). Let me make clear, it’s not a sudden spike, it’s a gradual increase in lag. Frames slowly start going down, and typically at the end of 25 minutes even, players are running at 25 or less fps. Imagine how slow this gets when we’re running 45 minute matches.
I’ve been looking at the f9 console, and there aren’t too many errors that cause it, and a lot are resolved due to player death immediately after. One thing that is note worthy is in the “script” tab under “rates”, one of my scripts has over 1000 rate. I don’t entirely know what this means, or where to look to find sources of lag. I read somewhere that using spawn(function() would cause lag, so I cut a number of those out of my game as well.
Help would be appreciated!
Note, if you’re in need of data to assist me, I will not be able to provide it instantly, as I will need to get 18 or more players, and we will need to play the game for 25 minutes.
Data I have right now is to this extent: (I have changed some scripts since and made changes)
I appreciate any help you can offer in the meantime to make this less laggy and more enjoyable for players!