I am using chrono engine demo
https://mega.nz/#!SV5yGYBB!Y9CUZVHWbUtvcuxx2XgkYxser_LAQU0HlagKbM-Tq1A
I want to do auto save game every 3 seconds in parallel using this script:
DataManager.saveGameWithoutRescue(2);
but I want to solve the regular save game lag first.
normally saving my game will lag for about 2 seconds obviously
is there a way to save the game smoothly and player doesn't notice the lag.
Any help is appreciated
save game in background, no lag
● ARCHIVED · READ-ONLY
-
-
Definitely not do it every 3 seconds.
Make sure you're using wait commands in your parallel process, otherwise it will most definitely lag. I suggest using 4 wait commands, each 999 frames. That's about 1 minute in real-time. You do not need to autosave every 3 seconds, most games do every 5 minutes (or before every boss). -
sorry what I meant was even with just regular saving, no parallel, it lags a little every time I press save from the menu, I want player to save smoothly and doesn't notice the lag.Definitely not do it every 3 seconds.
Make sure you're using wait commands in your parallel process, otherwise it will most definitely lag. I suggest using 4 wait commands, each 999 frames. That's about 1 minute in real-time. You do not need to autosave every 3 seconds, most games do every 5 minutes (or before every boss). -
Would be cool if you managed to fix this, unfortunately I believe most menu lag is an engine lag and it's there to stay.
-
I encounter zero lag when saving. Does this happen in a new project as well?
-
forgot to mention I use Chrono Engine DemoI encounter zero lag when saving. Does this happen in a new project as well?
https://mega.nz/#!SV5yGYBB!Y9CUZVHWbUtvcuxx2XgkYxser_LAQU0HlagKbM-Tq1A
it lags every time I run that saving script. -
@manck @Dankovsky
the last default engine memory leak has been fixed several versions ago, so with any newer core you should not have any menu lag at all - as long as you're in the default engine.
Plugins may have their own memory leaks or other capacity problems, and that can cause lag - but in those cases the plugins need to be optimized and bughunted, nothing anyone else can do.
so if you still have lag, then the problem is either because of the plugins you're using or because your engine core is too old.
to check the core version, open the projects rpg_core.js file with any text editor and check the title line (no number there means 1.0)
if the core is 1.5 or 1.6, then your problem is caused by the plugins you're using and you need to ask the plugin writers for updates. -
There is actually some lag even in default engine (for example, opening main menu is not ever truly "instant", the freeze can last from 5 to 60 frames depending on the system I believe.@manck @Dankovsky
the last default engine memory leak has been fixed several versions ago, so with any newer core you should not have any menu lag at all - as long as you're in the default engine.
Plugins may have their own memory leaks or other capacity problems, and that can cause lag - but in those cases the plugins need to be optimized and bughunted, nothing anyone else can do.
so if you still have lag, then the problem is either because of the plugins you're using or because your engine core is too old.
to check the core version, open the projects rpg_core.js file with any text editor and check the title line (no number there means 1.0)
if the core is 1.5 or 1.6, then your problem is caused by the plugins you're using and you need to ask the plugin writers for updates.
And yes, the plugins are to blame too, absolutely. Too bad we can't live without them.