I created a folder www/save to put all the save files, while packing all the other files into the exe.
But I do notice that checking save files is making the game to lag (fps drops below ~10).
I am using 100 save files, reducing the # makes the lag less severe.
Not sure if other people have noticed this. Will there be a solution for this?
This does not happen if I don't pack all files into single exe.
Also there is no description in the manual of how to treat the save files. I guess they have to be outside the exe pack.
PS: if someone uses plugin for better visualization of title (like animated title). The update function in Scene_Title may be calling a piece of code to check if save file exists. This will cause the fps to drop below 10fps if you pack the game. I moved the check save file code to the start function in Scene_Title and it fixed the problem (because save file is not being constantly checked). This again makes me think the loading of save files is causing the game to lag when it is packed as an exe.
after tracking down the code I suspect this function is causing the lag because it checks the existence of all save files, maybe there is a way to cut down the files it looks after (like only the save files in view)?
But I do notice that checking save files is making the game to lag (fps drops below ~10).
I am using 100 save files, reducing the # makes the lag less severe.
Not sure if other people have noticed this. Will there be a solution for this?
This does not happen if I don't pack all files into single exe.
Also there is no description in the manual of how to treat the save files. I guess they have to be outside the exe pack.
PS: if someone uses plugin for better visualization of title (like animated title). The update function in Scene_Title may be calling a piece of code to check if save file exists. This will cause the fps to drop below 10fps if you pack the game. I moved the check save file code to the start function in Scene_Title and it fixed the problem (because save file is not being constantly checked). This again makes me think the loading of save files is causing the game to lag when it is packed as an exe.
after tracking down the code I suspect this function is causing the lag because it checks the existence of all save files, maybe there is a way to cut down the files it looks after (like only the save files in view)?
Code:
DataManager.loadGlobalInfo = function() {
var json;
try {
json = StorageManager.load(0);
} catch (e) {
console.error(e);
return [];
}
if (json) {
var globalInfo = JSON.parse(json);
for (var i = 1; i <= this.maxSavefiles(); i++) {
if (!StorageManager.exists(i)) {
delete globalInfo[i];
}
}
return globalInfo;
} else {
return [];
}
};