• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

SOLVED Resizing Surface Lag

A

Adry

Guest
Hi all! I've been searching extensively but can't find an answer to this. I have a full screen persistent obj controller I know is causing my game to lag. I should also note that I am using vector graphics. I narrowed the lag down to this line:
GML:
surface_resize(application_surface, display_get_width(), display_get_height())
In windowed mode, I get no lag, however when I switch to full screen and resize the surface (note: if I don't resize the surface I get pixelated blurred vector graphics) it lags. any one got any suggestions? Here's the full code:
Code:
if (keyboard_check_pressed(vk_f5)) {
        fullscreen_toggle = !fullscreen_toggle;
        only_once = true;


}

if (fullscreen_toggle == true) {
      window_set_fullscreen(true);
      if (only_once == true) { surface_resize(application_surface, display_get_width(), display_get_height()) only_once = false }
}

if (fullscreen_toggle == false) {
window_set_fullscreen(false);
  if (only_once == true) { surface_resize(application_surface,960, 540) only_once = false }

}
 

FoxyOfJungle

Kazan Games
I think this is an old problem, I say this because I still had this problem, it stopped after I changed my video card. The lag was caused because for some reason the game went from 60 FPS to 30 FPS, but until today I have never seen an answer, you can try to update the video card drivers.
As I understand it, you don't use the function every moment, so the problem is not in your game, but in the Game Maker Studio 2 runner, or your computer. (I guess)
 
Top