Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

significant fps drop #146

Open
rust2 opened this issue Jan 27, 2024 · 3 comments
Open

significant fps drop #146

rust2 opened this issue Jan 27, 2024 · 3 comments

Comments

@rust2
Copy link

rust2 commented Jan 27, 2024

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

@StingyJack
Copy link

StingyJack commented Feb 12, 2024

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...
image
.... is probably caused by this code that isnt checking CanBeSeen() before trying to GetMaxHealth() and GetHealth()

lane = lane + 0.07 * (1 - tower:GetHealth() / tower:GetMaxHealth())

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.

@adamqqqplay
Copy link
Owner

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... image .... is probably caused by this code that isnt checking CanBeSeen() before trying to GetMaxHealth() and GetHealth()

lane = lane + 0.07 * (1 - tower:GetHealth() / tower:GetMaxHealth())

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.

@StingyJack
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants