Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED] Strange FPS drops that only happens in windowed

When running an event loop with many conditional branches and such commands that don't exit the interpreter loop in the scripts, my game starts to drop its frame rate to 25~on average while in windowed mode. However, when I play in full screen, you can't even notice it.

Is there any particular reason why full screen lags a lot less than windowed mode?
And in that case, is there an API call available to check if the game is currently in full screen or not?

It's kind of a general question even though the last inquiry is a scripting question, I thought it would fit best here.

Thanks in advance.
 
With most operating systems; system resources are prioritised for full screen applications, it's simply that the CPU when in full screen isn't working as hard to process the other applications that are running along side the game.
This also works with GPU, when in full screen (Especially if the full screen resolution is less than the native monitor resolution) the GPU dedicates more resources to processing what's in full screen than what's in the background. But RPG Maker games use GDI+ I believe, so the GPU isn't much of an issue with this.

As for the second question, I don't think anyone's made a full screen check scriptlet, the best you can probably do is get a key input script and check if left-alt & enter or right-alt & enter has been pressed then turn a switch on to say "We are now in full-screen".

EDIT: If you want to solve your problem you should re-write your events to be more clean
 
I fixed the issue mainly by having those conditional branches run as scripts instead of through events whenever a certain boolean was true. Looping with conditional branches certainly slowed everything down too much.

And that sounds like an idea to check if full screen is on. Thanks for that, should be no problem to make.

I have no FPS issues anymore after the script change, so I can consider this to be resolved.

Thanks!
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top