CriticalFlaw / flawhud

Custom HUD for Team Fortress 2
https://mastercomfig.com/huds/page/flawhud/
170 stars 42 forks source link

Switching PDA menus causes frame drops #361

Closed ScratchyNuts closed 1 year ago

ScratchyNuts commented 1 year ago

It happens with some other HUDS, and some don't have this issue. However, I haven't seen anyone else report an issue like this. It could be a me issue, but just to be sure I wanted to report it. Thanks for reading :)

CriticalFlaw commented 1 year ago

I'm aware of this causing frame drops but not if there is an actual fix for it. Which HUDs do not have this issue?

ScratchyNuts commented 1 year ago

I'm aware of this causing frame drops but not if there is an actual fix for it. Which HUDs do not have this issue?

Some that I've recently used and don't have this issue are ToonHUD, Middle Mann Centered HUD, SpaceHUD, TF2 HUD Fixes, 7Hud, and NostalgiaHUD

If you're interested, some other HUDs I've used that have this issue are PeachHUD, HypnotizeHUD, SunsetHUD, and MonoHUD

CriticalFlaw commented 1 year ago

I'd have to ask around on the huds.tf discord because briefly looking at the huds that don't have this issue - nothing stands out that directly addresses the issue.

CriticalFlaw commented 1 year ago

According to other developers this is possibly caused by use of #base in the PDA files. This was done to help with maintaining those files, but if it can be proven that they do infact cause frame-drops (by removing those files and using the default PDA) then I'd consider reverting the #base use.

ScratchyNuts commented 1 year ago

According to other developers this is possibly caused by use of #base in the PDA files. This was done to help with maintaining those files, but if it can be proven that they do infact cause frame-drops (by removing those files and using the default PDA) then I'd consider reverting the #base use.

If this alot to ask for, but how can I find the PDA files. I'm stuck on what do you do with the #base files because I can't tell if you delete them or you're saying to delete them then put it back in? (sorry for the bad wording lol)

CriticalFlaw commented 1 year ago

The PDA files are located in the following folders:

ScratchyNuts commented 1 year ago

so do i remove those files and then do something else?

CriticalFlaw commented 1 year ago

You can try removing it then switch PDAs to see if the framedrops still occur. You'll have an unsable PDA menu but at least we'll prove a theory.

ScratchyNuts commented 1 year ago

https://github.com/CriticalFlaw/flawhud/assets/141075436/8c078d3b-bb22-4c16-8e98-693729585fcb

I tried but it didn't work :( I've linked a vid to show what the frame drop looks like

CriticalFlaw commented 1 year ago

Can you show a similar video with the default hud please?

ScratchyNuts commented 1 year ago

Also sorry for the compression. Github wont upload anything abv 10mb

https://github.com/CriticalFlaw/flawhud/assets/141075436/0b856a91-64b1-4dae-8daf-9977720d942e

CriticalFlaw commented 1 year ago

Interesting note, if you hide the hud using toggle cl_drawhud - the lag persists even though nothing is being rendered on screen.

ScratchyNuts commented 1 year ago

I don't know how to say this since I don't make HUDs, but could it do with how big the file size of the HUD is? Also, that Middle Mann HUD I mentioned earlier that didn't have this issue now drops frames when I switch between the PDAs. So weird :/

CriticalFlaw commented 1 year ago

I did some dumb tests where I kept removing files and restarting. Could you please try deleting flawhud/cfg/valve.rc and test again? That files was added to middleman hud recently so I just wanted to see if you could tell a difference

ScratchyNuts commented 1 year ago

Good news, removing the valve.rc file doesn't cause the frame drops. However, I don't know it's purpose and if it negatively affects the game at all

CriticalFlaw commented 1 year ago

It's main purpose is to ensure that Streamer Mode is not enabled at launch (cl_hud_minmode 0). If you don't use that mode or refresh the HUD frequently, it can be removed without other side-effects. Unfortunately it will need to be kept in the HUD because otherwise, users who use minmode will always load into Streamer Mode with flawhud.

ScratchyNuts commented 1 year ago

I do use minmode unfortunately, but I don't know how much it negatively affects my game

CriticalFlaw commented 1 year ago

It won't be an issue because you can turn off streamer mode in the hud settings. It's just an inconvinience.

impale1 commented 1 year ago

Perhaps he should also check by deleting each command in the valve.rs file in turn

impale1 commented 1 year ago

I changed the value of the vgui_cache_res_files command to 1, and the game stopped lagging

ScratchyNuts commented 1 year ago

How do I open rs files?

impale1 commented 1 year ago

double-click on the file and then you have to select the notepad application

CriticalFlaw commented 1 year ago

Yeah it looks to be tied to vgui_cache_res_files. Changing between 0 and 1 has a noticeable lag when switching PDTs.

ScratchyNuts commented 1 year ago

Thanks for the help