Saving taking up to 60 seconds and loading 25 seconds

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,605
Reaction score
951
First Language
Portuguese - Br
Primarily Uses
RMMV
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?)?
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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?)?
No way to reduce the number of actors, the whole point of my game is that almost every NPC is recruitable, and I have all their profiles/names/nicknames written already with Gab texts by the order of actors in the party to display their faces and active battle system with each of their faces, message cores with \N[x], etc that makes it really hard(impossible for me) to change.
Screenshot (91).png
 
Last edited:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,679
First Language
Java's Crypt
Primarily Uses
RMMZ
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.
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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.
I don't want to change the save content though since there might be times that I will need to save all 1k actors(e.g if they all level up at the same time or the player changes one of their parameters), I was thinking that if saving in the background were possible, even if it took 10 minutes, I could make a map that doesn't change any variable or even a minigame to distract the player while it saves in parallel.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,679
First Language
Java's Crypt
Primarily Uses
RMMZ
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.
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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 ^^
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,600
Reaction score
4,610
First Language
English
Primarily Uses
RMMV
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.
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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).
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,605
Reaction score
951
First Language
Portuguese - Br
Primarily Uses
RMMV
I don't know... I think if you put the actor's data inside a variable, will result in the same problem since the variables will be stored on the save file too.
I think @MushroomCake28 gives a good solution, store the actors stats on a json file could be a good idea.
But that will go into what hudell said too, you will need someone to make a plugin that work this way and will cover all the holes that will come when implement such a thing.
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,266
Reaction score
1,409
First Language
English
Primarily Uses
RMXP
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?
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
144
Reaction score
37
First Language
English
Primarily Uses
RMMV
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,966
Reaction score
13,600
First Language
English
Primarily Uses
RMMV
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.
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
My saves each weight 10mb, I think it takes 60x25 because of the read/write speed of my HDD, but I might be wrong.
I will have to learn more about F12 since I didn't use it that much yet, my save files are going to the save folder in the game, not to the cloud.
My full path is C:\Users\**\Documents\Games\GCAI Part II\NGQ\save

I have a script to randomly set all 1k character's levels, nicknames, and classes right at the game start, I think that might contribute to RMMV saving all characters even without recruiting.

I don't know... I think if you put the actor's data inside a variable, will result in the same problem since the variables will be stored on the save file too.
I think @MushroomCake28 gives a good solution, store the actors stats on a json file could be a good idea.
But that will go into what hudell said too, you will need someone to make a plugin that work this way and will cover all the holes that will come when implement such a thing.
I see, if storing them in variables also doesn't work then I have no other ideas. I will probably have to distract the player with a loading image or gif. Thanks for saving me a few days of useless scripting xD.

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.
I will need playtesters in about 1 month or so, but I think you probably won't be interested since my game is an H-game.
 
Last edited:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,966
Reaction score
13,600
First Language
English
Primarily Uses
RMMV
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)
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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)
I completely understand, I was just answering the question ^^.
I'm not trying to recruit, I actually already have some testers and will use reddit/etc to release.

Btw I'm using your plugin clone events, the most useful plugin ever, thanks for doing it.
 

Zeriab

Huggins!
Veteran
Joined
Mar 20, 2012
Messages
1,266
Reaction score
1,409
First Language
English
Primarily Uses
RMXP
I wrote a bit about how to read tye profiler here:

That is for MZ. For MV it looks slighly different. The same methodology works.
 

gtswaifuism

Psychic
Veteran
Joined
Dec 31, 2017
Messages
55
Reaction score
11
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
Made a HUGE (YYOOOOJJ) Update to Monstructs and moving towards a Steam Early Access release!
A skill type called: "Rumagic". The intention is Magic with Rum(that pirates drink)
Does it sound strange in English?
So I'm having issues with my steam account... so I can't use MZ right now, so I can't work on my game until its solved, so it be harder to be ready for 31... guess I'll get ice cream :kaopride:
Motivation! Inspiration! There you are. I was worried you guys weren't going to show up today. Let's get this thing going!

Forum statistics

Threads
104,219
Messages
1,004,759
Members
135,725
Latest member
Sark1017
Top