TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GameGuru Max Issue - MASSIVE FPS Drop When Using "SetPlayerFOV" #2970

Closed DarthPickles666 closed 2 years ago

DarthPickles666 commented 2 years ago

Hi there, so I've noticed a massive issue when using a script for a Helmet HUD on one of my outdoor levels. Without this script running, I get 80FPS (which is a separate issue altogether), then when I load up the level with the script running from the start, it drops down to 20FPS!!! This is a HUGE issue, especially since my game is Sci Fi and I would prefer it if I had the Helmet HUD.

I've attached a picture of the FPS counter with and without the HUD (top left corner)

image

image

Thanks

Jereth

DarthPickles666 commented 2 years ago

Just to add, it ONLY does this massive FPS drop when the script for the HUD is running. Without it, it runs fine at 80FPS.

rvanner commented 2 years ago

@LeeBamberTGC Paul said he wasn't the best at looking into this. Maybe you or Preben?

DarthPickles666 commented 2 years ago

Hey folks, I believe it's been fixed, someone has edited the script and I'm now getting the 80 fps again. Not sure if this is an issue for anyone else, but the script seems fine now.

image

AmenMoses commented 2 years ago

The culprit was SetPlayerFOV() which was being called every frame.

smallg changed the script to only call SetPlayerFOV() when needed, i.e. not to call it unless the value changed.

But it might be good idea to look at what the function is actually doing in MAX as I'm pretty sure it didn't do that in Classic (Cine|Guru allows smooth camera zooms using FOV changes every frame).

Necrym59 commented 2 years ago

Sorry my mistake in the script - couldnt wait for me to have a sleep to fix it ;)

LeeBamberTGC commented 2 years ago

NOTE: Added code so only do massive FPS hungry visual update if the FOV actually changes. Lots happening when you change FOV as it updates related things in the visuals code :)