Tests that reveal the correlation of FPS, the number of bots and the number of items on the submarine.
Disclaimers
- [X] I have searched the issue tracker to check if the issue has already been reported.
- [ ] My issue happened while using mods.
What happened?
Warning - I do not know English very well and I use google translator for translation, which can lead to logical errors in translation.
In this Issue, I want to focus on the problem of resource storage on a submarine and how much this affects the performance of the game, especially with bots. Deciding to test why my fps in a single game dropped to 20-30. And if everything is fine, then I have 30 fps and you can still play, but if you start fighting, it quickly drops to 5 and it becomes impossible to play. As a base fps for my pc config i have 150 on dugong. I have an Intel Xeon E5 2689 and GeForce GTX 1050 TI. Game and OS installed on NVMe SSD M.2. OS Windows 10.
Prehistory At first, I sinned about talents, since I had a mod that allows you to pump all the branches of talents on one character, and as it turned out, the problem really was in this mod. For some unknown reason, adding 15 skill trees seriously affects fps, but at the same time, pumping all talents without a mod through the console does not affect fps that much. In my example, this means that with 12 bots with all the talents, my stable fps is reduced from 150 to 120, and with the mod up to 15, strong friezes begin, which is strange since the talent tree file was simply edited in the mod and that's it. In general, this feature does not affect vanilla gameplay and can be ignored until some point. I didn't tag the mods as the talent issue isn't that important and is just mentioned.
The next thing I did after activating 12 bots was take 100,000 credits and buy all the supplies from the station to see how much fps it affects. And the impact is very significant, since it dropped from 120 fps to ~60. It turned out 17 boxes of loot, 5-8 boxes of ammunition and 3 shells for the railgun. Having found the problem of my low fps since I had a lot of loot in my campaign (something like 50 full containers for storage for resources) and 11 level 12 bots I could stop. But after conducting another test, I realized that the problem is also in the orders for the bots. Since leaving only 3 bots, I returned to where I started, namely 150 fps, which surprised me a little. But a little later, this figure froze around 130. Having given orders to the bots on the side, I dropped the fps to 114, which didn’t surprise me at all.
Identified game issues The accumulation of a large amount of resources is directly proportional to the drop in FPS. And storage containers exacerbate this problem even more, as they allow you to store 25 containers of 96 items in a 5x5 locker (for a total of 24). I would really like to see more optimization at least for cabinets and drawer shelves. Well, if the items lying on the floor affect the FPS, but not in the boxes on the shelf. In many games you can store literally tons of items and it doesn't drop FPS like it does in barotrauma. I really like the game and I would like to store more resources for the same FPS.
Now bots... The fact that the more bots the less FPS is understandable and logical, but the fact that orders to collect loot from the floor causes significant drawdowns even if there are only 3 bots, one of which you control, is no longer good. I really hope that orders for bots will be finalized and optimized, especially cleaning. And in general, more optimization for bots is always good.
Talent Trees. In general, it is not too important that adding additional boost branches after three affects the FPS, but I would like to at least try to solve this problem. And I still do not see the objective reasons because of which this problem arises.
The presence of a large number of bots when you are at the station for some unknown reason also affects the FPS. Most likely due to the increase in space for walking.
One of the problems with low fps that came up is that if you have 5 fps and less than 60 physics in showperf, then there is a very strong input lag that does not allow you to pause or close the TAB menu, especially the TAB menu. I've seen this mentioned in other posts, but I haven't seen it talk about marginal values.
The final I like baratrauma and enjoy the game, but the inability to play the campaign on a medium PC due to my habits of accumulating as many resources as possible, I do not like. I hope that in future updates at least some of the problems described will be fixed. Well, or I will buy a more powerful PC. Perhaps some of the problems described are already in separate Issues, but there are tests going on here and it makes no sense not to mention what I encountered. Updated. Looks like my main fps issue was indeed related to the talent tree mod, but the issue is not about that, so those are my problem. Without the mod in my single player campaign at sea I have 40-50 FPS. The station will most likely be less like the battle, but it's definitely better than it was. And yes, I tend to write whole sheets of text.
Screenshots with showperf
Start of tests
I have 3 bots and upgraded them through unlocktalents all
There should be a script where I have 60 FPS, 12 bots and I already stocked up but I forgot to make it. Therefore, there will be a screen where I have already sold bots, leaving 3.
Here you can see that there are 17 boxes and the FPS has fallen due to the distribution of orders for the 3 remaining bots
I bought and upgraded 9 bots again and sailed from the station
I was surprised that I had 95 fps, but when docked back everything fell into place again ~ 60 fps.

Reproduction steps
- Launch the game
- Play until you have accumulated about 50-70 resource boxes
- Buy at least 7 bots at the same time and upgrade them.
- Your profit has dropped FPS.
Bug prevalence
Happens every time I play
Version
0.18.12.0
-
No response
Which operating system did you encounter this bug on?
Windows
Relevant error messages and crash reports
No response
I have the same issue. My friend and I are in particularity endgame and whenever any group of enemies spawn, there is small lag, and when they enter screen mine FPS drops from stable 60 (at start of the game few updates previously i had 120, from some update i average much less, even in new game), to 0-12 (depends of how much happens on screen) (most of times 2FPS). My friend has a lot more subtle drop, but also happens but to playable 30-60. (I'm hosting btw). And last time when i died with my 2FPS, i did a test: upon looking at large quantity of enemies, with observator screen, there is spike in draw and update graph, and rubric labeled ,,map" goes purple (mostly caused by ,,backcharactersitems"). And when when I go outside of the enemy rendering area everything is back to normal greenish/yellow. Then i stumbled upon this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2701251094 We tested it and it works very well. My game goes down max to 30 (in extreme cases) (in entity groups with mod normally i lose around 10FPS from normal, barely noticeable (50FPS)).
Addressed in https://github.com/Regalis11/Barotrauma-development/pull/4114
Tested, working correctlyl Can be merged and closed.