I am making a very low resolution, pixel art game. My key goal is to get a perfectly consistent 60 fps. Seeing as how low res the game is, and how it uses little to no effects, I feel this should be doable.
By and large, my game does run at 60fps. However, trouble arises when I put it in f4 fullscreen. After I do that, it often drops to 40fps. Bizarrely, if I maximize the window instead of hitting f4, the fps doesn't drop. I can toggle between maximized and full screen, and the fps will toggle between 60 and 40. Maximized is fine, Full Screen lags.
I've been searching my way through the scripts that come with the game, to find and remove unneeded code, to make the game render easier. As an example, I've commented out Create and Update for Shadows and Weather in Spriteset_Map, because my game won't use them. In PIXI, I've changed all Smoothing to be off, and made it so that scaling is always Nearest. In index.html, I've added CANVAS{image-rendering: pixelated;}, forcing the game to stay pixely no matter the window size.
However... none of this seems to actually do anything to make the game run better. I figured removing smoothing, and making the maps render less would make the game run better, but I'm not sure if it actually helped at all. It didn't hurt, but it didn't help either.
The only thing I've ever done to create 100% consistent performance was by editing PIXI, and making it so that in the WebGLRenderer.prototype.render function, it returns on even frame counts (basically, forcing the game to 30 fps.) This did remove all lag and hiccups... but, locking the game at 30 fps to avoid frame drops feels pretty backwards, you know? To avoid the game going to 40fps, lock it at 30fps? That's a bad solution, haha, and I'm currently not doing that. It's a nuclear option I'd like to avoid.
I am using some plugins. Mostly Yanfly's, but some others. I am also using Irana's Performance Upgrade plugin that just came out. I'm using TileD, and the DSE Audio Lag Fix. Any other plugins I'm using are self contained to specific things, I think these are the only entire game changing plugins. If you want, I can list the entire plugin list. My core files are 1.6.1. I run my game in WebGL mode, not Canvas.
I've checked, and the lag from full screening happens on new games too.
What ways can I optimize my game? What things can I remove? Is there a line hidden in PIXI or the core files that's, like, "Set this to true, and all needless effects will go away, but the game will run 90 times smoother!" Do Yanfly's scripts cause performance issues? Are there other performance enhancers out there? Has anyone else run into this weird full screen lag issue?
Any ideas are welcome!
By and large, my game does run at 60fps. However, trouble arises when I put it in f4 fullscreen. After I do that, it often drops to 40fps. Bizarrely, if I maximize the window instead of hitting f4, the fps doesn't drop. I can toggle between maximized and full screen, and the fps will toggle between 60 and 40. Maximized is fine, Full Screen lags.
I've been searching my way through the scripts that come with the game, to find and remove unneeded code, to make the game render easier. As an example, I've commented out Create and Update for Shadows and Weather in Spriteset_Map, because my game won't use them. In PIXI, I've changed all Smoothing to be off, and made it so that scaling is always Nearest. In index.html, I've added CANVAS{image-rendering: pixelated;}, forcing the game to stay pixely no matter the window size.
However... none of this seems to actually do anything to make the game run better. I figured removing smoothing, and making the maps render less would make the game run better, but I'm not sure if it actually helped at all. It didn't hurt, but it didn't help either.
The only thing I've ever done to create 100% consistent performance was by editing PIXI, and making it so that in the WebGLRenderer.prototype.render function, it returns on even frame counts (basically, forcing the game to 30 fps.) This did remove all lag and hiccups... but, locking the game at 30 fps to avoid frame drops feels pretty backwards, you know? To avoid the game going to 40fps, lock it at 30fps? That's a bad solution, haha, and I'm currently not doing that. It's a nuclear option I'd like to avoid.
I am using some plugins. Mostly Yanfly's, but some others. I am also using Irana's Performance Upgrade plugin that just came out. I'm using TileD, and the DSE Audio Lag Fix. Any other plugins I'm using are self contained to specific things, I think these are the only entire game changing plugins. If you want, I can list the entire plugin list. My core files are 1.6.1. I run my game in WebGL mode, not Canvas.
I've checked, and the lag from full screening happens on new games too.
What ways can I optimize my game? What things can I remove? Is there a line hidden in PIXI or the core files that's, like, "Set this to true, and all needless effects will go away, but the game will run 90 times smoother!" Do Yanfly's scripts cause performance issues? Are there other performance enhancers out there? Has anyone else run into this weird full screen lag issue?
Any ideas are welcome!