Open rust2 opened 5 months ago
I have this FPS drop problem also. It usually starts at around the 20 minute mark and I go from 60-80 FPS down to 21 FPS, but the choppiness makes it feel like 5 FPS,
This scrolling spamming console may be unrelated - each of those function calls to get information about something that cant be seen is wasted CPU cycles, but I would think that would be rather constant throughout the game time and not different for the first X minutes and then FPS hell. They ought to be fixable by checking CanBeSeen()
before checking IsInvulnerable()
, GetHealth()
, GetMaxHealth()
, etc.
This set of yellow messages...
.... is probably caused by this code that isnt checking
CanBeSeen()
before trying to GetMaxHealth()
and GetHealth()
https://github.com/adamqqqplay/dota2ai/blob/1cb962e6b5d1a6eadb6a35b4d18beb5b371ca0b6/team_desires.lua#L196
Disclaimer: this is just an educated guess by someone who does not know Lua, or how the Dota2 bots API works, but has been programming professionally for a long time.
This same thing does not happen with the default bots.
I have this FPS drop problem also. It usually starts at around the 20 minute mark and I go from 60-80 FPS down to 21 FPS, but the choppiness makes it feel like 5 FPS,
This scrolling spamming console may be unrelated - each of those function calls to get information about something that cant be seen is wasted CPU cycles, but I would think that would be rather constant throughout the game time and not different for the first X minutes and then FPS hell. They ought to be fixable by checking
CanBeSeen()
before checkingIsInvulnerable()
,GetHealth()
,GetMaxHealth()
, etc.This set of yellow messages...
.... is probably caused by this code that isnt checking
CanBeSeen()
before trying toGetMaxHealth()
andGetHealth()
Disclaimer: this is just an educated guess by someone who does not know Lua, or how the Dota2 bots API works, but has been programming professionally for a long time.
This same thing does not happen with the default bots.
@StingyJack Thanks for your analysis, we will try to fix it. We also welcome everyone to submit PR.
@adamqqqplay - sorry to just leave a guess like that and no PR. I did look at the bot documentation, but I couldn't find out how start or how to make changes and see if they worked or not.
Is it possible to disable console logging at all? Disabling console doesn't do anything as its probably still writing to it. So I wonder if disabling logging would help at all.
When I play with this bots and game is not paused, the console is being spammed with these yellow messages and game fps drops significantly for me (around 40fps -> 10fps). Can I do anything to fix this? Maybe it's unnoticeable with good PC builds. Looking for some help![image](https://github.com/adamqqqplay/dota2ai/assets/43823272/d00b380f-47ee-4a0e-bc88-17ea0514cbbd)