I have 1k actors, 800+ maps, a lot of variables, switches, and events, which I think is the cause of these long saving times.
Is there any way to make the save faster? Like progressively saving the game as a parallel event or something?
Hi!
I don't think save the game in a parallel event will help.
Why do you have 1 k actors? There's no way for you to reduce that or create temp actors dynamically in the game(maybe with a plugin?)?
By default MV saves all actors inside each save file. I don't think there's any plugin that changes the save content, so I would recommend requesting/commissioning a scripter to make something specific for your project.
The switches and variables shouldn't be a problem.
Yeah but the way MV does it, everything about the actor is included on the save file: the sprite name, face name, class id, battler name, initial and max level, notes, profile, traits... My suggestion was to make something specific for your game where it only saves the data that you needed saved.
Making a system that saves in the background would be a lot more complex and wouldn't work as well as you expect.
I would do that but I can't make commissions, unfortunately. I will probably have to find a way to just show a gif image while it saves to distract the player and make the game with few saves and save crystals ^^
Yeah RPG Maker games by default save all actors inside a single save file and loads them all up when you load a save file. The best way to do it with 1k actors is probably to have a customizable system that changes the save system to something like 1 json file for keeping info per actor, and that json file would only be updated when that actor has been updated in-game. Unfortunately you are pushing the limit of the engine, so if you really want to have quick saves the entire save system needs to be redone.
I could make a script to store all actor profiles and nicknames in variables, erasing all of them, and assign it from a variable when they are in the party, do you think that would significantly shorten the save times? (It would be a bit hard to do for me so I'd prefer to know beforehand ^^ since it will likely take a whole day to do)
I might be able to do it for character battlers and sprites but not faces because of message core, gab, and other bindings, would that help a lot too?
Edit: Oh wait, I have a great(or not) idea, when opening the save menu(with an item so I can call a common event), I can erase pretty much everything from all 1k actors and store their info in variables(names, faces, everything), and as soon as the player closes the save menu(OnCloseMenu() or something, if I can't find it I might do an OnNextKeyPress()?), I will assign them back.
I will see if I can do that and report my results(which might take a few days since my coding is bad).
Is it a local save file?
60 seconds sounds like something weird is happening. How big are your save files?
Profiling is always a good idea with performace issues. F12 brings up the dev tools when testplaying the game.
Click on the performance tab. This allows you to record a bit of you playing your game. It will then analyze the recording and tell you where it spend its time. Super valuable information when trying to optimize your game.
How to actually use the information presented there can be a bit daunting at first, but you could see which elements of the saving that takes so much time.
Is it the construction of the JSON? Is it writing of the save file? Is it actually something completely different?
I don’t have any ideas about how to optimize your game but I’m interested in playing it if you’re looking for play testers.
The save file does not save all actor data. It saves the data of all actors that have been recruited at some point in the game. So if that were the issue, saves would be fast at the start of the game when you only had a smaller party, and the more of the NPCs you recruited, the longer it would take. I still don't see it taking that long though.
60 seconds to save, 25 seconds to load ... that sounds like an upload/download thing to me - slower upload speed, faster download speed.
As Zeriab said - where are your saves going? What is the full path to your project? If your saves are happening in the cloud, then it is going to be affected by your connection speed.
As this is a PG13 forum, you probably won't be able to recruit here for testers, or release your game here when it's done. (unless H stands for Horror)
Thanks, I will definitely try to understand it, but it looks too complex for me.
I will report my results if I eventually manage to solve the save time issue.