Performance Degradation After Extended Playtime in Our Tycoon Game Mode

Hello,

I’m reaching out here in hopes of finding a solution to a persistent performance issue in our tycoon game mode. Despite fully rebuilding our Verse system and optimizing many functions alongside other skilled developers, the problem remains:

After approximately 1.5 to 2 hours of continuous gameplay, the server begins to degrade. Players experience increasing ping, and server TPS gradually drops over time.

Steps Already Taken:

  • With the help of Andrej, we investigated potential issues related to lingering concurrent Verse tasks. Nothing abnormal was found—tasks are correctly disposed of.
  • I thoroughly reviewed the entire codebase for recursive functions or infinite loops. Currently, only two loops are in use:
    • One runs every second to compare the player’s position against an array of coordinates.
    • The other saves tycoon progress every 15 seconds.
  • I’ve also researched common sources of memory leaks in Verse and confirmed that none apply to our current implementation.

At this point, I’m turning to the community as a last resort. We have thousands of players who love and support our tycoons, and we’re committed to providing them with the smoothest experience possible.

If you’ve encountered a similar issue or have insights to share, your help would be greatly appreciated. Please feel free to reply to this post.

Thank you in advance.

1 Like

A post or two have had issues after about 45 minutes. One may have been due to accumulations of dropped items and I think it improved after using the Mutator Zone to despawn them after 30s.
I think some of those posts had a bit of discussion, but they are probably over a year ago

I noticed some potential issues with the SetMaterial function. I’m triggering around 30 SetMaterial calls per second, and when I disable this feature, the server seems to last significantly longer without performance degradation.

1 Like