Low FPS for 10 - 15 seconds on first launch

Hey all,

I recently released my game. I *can* link to it if that helps anyone help me with this issue (it is free to play with the option to pay), but I don't know if the support forum is an acceptable place for just providing a link to my game out of the blue, so I'll refrain unless it's requested.

Basically, when I was playtesting the game through RPG Maker MZ, I never had framerate issues. But, with the deployed version, on first launch it is really choppy/stuttery for 10 - 15 seconds. After that it is fine, and this issue doesn't happen on subsequent launches. But, I'd like to be able to have it perfectly smooth from the getgo, if anyone knows what might be causing it and how to fix.
what did you deploy to?
It sounds like you deployed to a website, and then there is nothing you can do.

Resources need to be loaded before they can be used, and what you describe sounds like a load delay due to too many files needed at the beginning. After they are cached the game can access them much faster.

But download over the internet is always slower than a local load...

If it is not deployed to web, a similar effect can still happen if you're using a preloader configured to load everything up front, or if you've wrapped your game inside a container as that will also take time to get the files out if done wrong.
Thanks for the response.

I deployed to Windows, then you download it as a zip through itch.io and extract it or can install it through their launcher. I have the issue through either method. AFAIK I do not have it set to preload everything on first launch, I've suspected that might be what's happening though. I don't know any coding really so I didn't wrap it inside a container. If I knew how to do it I'd probably be seeing about being able to get it on consoles.
I think it is because the browser is launched for the first time and needs to create your user profile.
However it is also possible some plugin needs to create files.
If it can't be avoid maybe you can have longer splash screen?
It goes straight to title, I don't have a splash screen. Or do you mean the loading circle? I think making that too long would be another problem in a different way. It also seems it isn't just happening after first launch, but it wasn't happening for a few launches in a row. Now I've had it happen after a few launches in a row.
that sounds as if a different background program sometimes runs in a conflict with the game.
one possibility here is an antivirus with a heuristic search that stumbles about the fact that it is a HTML-game, not a HTML website
Okay, I added the game folder as an exclusion to my antivirus (what's built into Win11), did 5 launches and didn't have the problem. So it seems that is probably what was going on. Added the issue and this potential fix to my project page. Thanks for the help!

EDIT: I got it working on Steam Deck, and it doesn't have this issue at all. So yeah must be an antivirus thing.

Original thread: https://forums.rpgmakerweb.com/threads/low-fps-for-10-15-seconds-on-first-launch.177572/