Resolved Possible performance issues related to luck stat

Gecob

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Windows 10
Terraria Version
1.4.0.3
Controls Used
Keyboard/Mouse
I'm really sorry to make another bad performances thread here, but this time I would like to focus on a possible cause that hasn't been mentioned much, if not lately in other social platforms.
I'm talking about the luck stat, which, according to what I read in wikis, seems to be calculated aggressively every in-game frame. As you know, there are many factors taken into account when calculating luck, one of them is "torch luck". From my own experience, I get intense fps drops in underground areas with a dozen of torches (no matter the lighting or frame skip setting). The issues suddenly stops if I simply remove them, which makes me think that "torch luck" isn't being calculated anymore.
The same happens in big NPCs towns, where of course there are many light sources, but also "ladybug luck" happens to be at work (if I understood correctly how it works), since there are many NPCs for which the game checks if they have been killed (thus giving bad luck). In fact, diminishing the number of NPCs and torches seems to halt the fps related issues.

These may be pure coincidences, since correlation does not usually imply correlation, but I wanted to bring to your attention this hypothetical problem (if there is at all, since not everyone is experiencing it).
My humble and probably overly simplistic suggestion, if luck really is calculated every in-game tick, would be to add a few minutes or seconds delay between each recalculation.

Anyway I want to thank you for your hard work and dedication to the community, I hope not to have bothered whoever reads this.
 
The game calculates thousands of things every tick. Luck is in there, but not particularly different in how severely it is calculated.

The accusations of Luck impacting FPS, IMO, are just misdirected anger at the Luck system itself. The FPS impact you are observing is far more likely to be simple lighting performance issues (of which we are identifying and looking into).

NPCs are also, surprisingly, one of the highest performance impacting things in the game. This is known and we are also looking into optimizing it.

The wiki has been and continues to be severely misinformed about how Luck even works in the first place, and people have taken this misinformation to extreme places, including the performance related impacts. We are suffering from performance issues, and we are working to resolve them. Luck is not one of the things causing this impact.
 
Thank you very much for clarifying that! And by no means I wanted to criticize the luck system. Anyway, keep it up!
 
Last edited:
Back
Top Bottom