ferod
New Member
- Dec 10, 2023
- 10
- 5
- 109
Yeah the creator post news in his patreon today, he said the public versión Will be in juneNo news on the update?
Yeah the creator post news in his patreon today, he said the public versión Will be in juneNo news on the update?
I thk attached files didn't existMaelion I read your Patreon posts recently and saw the work on the slow loading/saving. I debugged that myself previously and fixed it without needing to debloat the load/save files.
A big problem is that when displaying the screen with the saves, RPG maker loads all the entries for every entry, resulting in quadratic behavior, which really hurts with large numbers of saves (I'm up to 100 something as I like to save a lot due to lack of gallery). I put a cache in place that only reloads the list of saves if the cached list is older than 5 seconds:
This is a diff on www/js/rpg_manager.js, I'd attach the full file for those not knowing diff, but apparently .js files are not allowed. With this change the load/save menu opens pretty much instantly for me.Code:diff --git a/Cyberslayers/www/js/rpg_managers.js b/Cyberslayers/www/js/rpg_managers.js index 49f61a9..faf29e4 100644 --- a/Cyberslayers/www/js/rpg_managers.js +++ b/Cyberslayers/www/js/rpg_managers.js @@ -45,6 +45,9 @@ DataManager._globalId = 'RPGMV'; DataManager._lastAccessedId = 1; DataManager._errorUrl = null; +var $_global = null; +var $_globalTime = 0; + DataManager._databaseFiles = [ { name: '$dataActors', src: 'Actors.json' }, { name: '$dataClasses', src: 'Classes.json' }, @@ -239,6 +242,8 @@ DataManager.setupEventTest = function() { }; DataManager.loadGlobalInfo = function() { + if (Date.now() - $_globalTime < 5000) + return $_global; var json; try { json = StorageManager.load(0); @@ -253,6 +258,8 @@ DataManager.loadGlobalInfo = function() { delete globalInfo[i]; } } + $_global = globalInfo; + $_globalTime = Date.now(); return globalInfo; } else { return [];
Maelion I read your Patreon posts recently and saw the work on the slow loading/saving. I debugged that myself previously and fixed it without needing to debloat the load/save files.
A big problem is that when displaying the screen with the saves, RPG maker loads all the entries for every entry, resulting in quadratic behavior, which really hurts with large numbers of saves (I'm up to 100 something as I like to save a lot due to lack of gallery). I put a cache in place that only reloads the list of saves if the cached list is older than 5 seconds:
This is a diff on www/js/rpg_manager.js, I'd attach the full file for those not knowing diff, but apparently .js files are not allowed. With this change the load/save menu opens pretty much instantly for me.Code:diff --git a/Cyberslayers/www/js/rpg_managers.js b/Cyberslayers/www/js/rpg_managers.js index 49f61a9..faf29e4 100644 --- a/Cyberslayers/www/js/rpg_managers.js +++ b/Cyberslayers/www/js/rpg_managers.js @@ -45,6 +45,9 @@ DataManager._globalId = 'RPGMV'; DataManager._lastAccessedId = 1; DataManager._errorUrl = null; +var $_global = null; +var $_globalTime = 0; + DataManager._databaseFiles = [ { name: '$dataActors', src: 'Actors.json' }, { name: '$dataClasses', src: 'Classes.json' }, @@ -239,6 +242,8 @@ DataManager.setupEventTest = function() { }; DataManager.loadGlobalInfo = function() { + if (Date.now() - $_globalTime < 5000) + return $_global; var json; try { json = StorageManager.load(0); @@ -253,6 +258,8 @@ DataManager.loadGlobalInfo = function() { delete globalInfo[i]; } } + $_global = globalInfo; + $_globalTime = Date.now(); return globalInfo; } else { return [];
Absolute Legend. Thanks!Fixing save bloat - so you can save the game quickly again
Save bloat occurs when you first open the 'Bonds' menu. It creates about 560 duplicate characters within your save, that expands your save file to 100 times its original size, and makes it take ages to save.
The method below appears to have fixed my end-game file.
It's possibly I've missed something here that will appear later, but for now, Datapad, Phantasm, and the first few scenes all seem to be working.
- Make a copy of your current, broken save
You must be registered to see the links- Upload your current, broken save
- It will be very long thanks to the duplicated game actors. Hit 'End' to get to the bottom.
- "File unpack"
- Copy text
You must be registered to see the links- New
- Paste text
- Tree view
- Expand actors > _data
- You should see @a: 590ish items.
- Right-click on the "590ish items", and Edit Array
- This opens table view, with the path actors._data.@a
- Use the narrow bar in bottom-left to scroll right a little, until you see the 'name' column
- Click the heading once to sort by name. 560ish null rows will be at the top, with 20ish named rows below them. Remember the reference number of the first named row.
- Click back into tree view
- Select all the null actors by clicking at the start of #0; holding shift; clicking at the end of the last one you want to delete
- Now you've trimmed the bloat
- Click back to table view
- Scroll right until you find the _actorID column. It is just before the 'name' column, and has numbers from 1 to 600ish.
- Click on the top of that column to sort it, small to large. That puts the characters back in order.
- Click into text view. Right at the end, just before the square bracket, is a ",null". Remove this. Scroll to the top and add "null," at the top, just after the opening square bracket. You're moving the null table (which is important for everything to match up) from last to first.
- Click "Apply" in the bottom-right. This saves the changes you just made to the actors, and returns you to the main view
- Click back into text view so that you see everything again
- Ctrl-A, Ctrl-C
- Return to your saveedit tab
- Delete the text there, and Ctrl-V to replace with the test from jsonedit
- Download filex.rpgsave
- Replace your broken save with it
Just tried this by adding the diff lines using notepad. Didn't feel a noticeable difference when loading and creating saves, for reference my biggest current one is around 88.
I guess it was a pretty subjective test on my part. It certainly wasn't worse. I can try again later and see.Not very different and very slow, or not very different and already pretty fast? (Notably it isn't about the save/load specifically, but about the slowness in the load/save selection screen)
Anything for the red district or will that be the focus of a future update?Some news :
-Update 0.5 is coming in June for every Patreon Tiers and for the Public
-A new start will be needed because of the bonds system being reset
-Save/Load bloat is definitely gone and the game starts/loads in 1 second
-I'm finishing the content right now and it's a bit delayed because I want quality over rushing things
Themes will be :
-Giant Bot battle (main story with choices based on skills, traits)
-Lucius and Kassiah (Optional Control, Submission, Hacking)
-Dark Tunnels enhanced (Slayer Moves, new scenes with the grims, core seeds events, Kassiah and Aline more intense relationship)
-A few new soundtracks
View attachment 4854047
Nah it was really night and days for me (like 5 second per scroll vs. pretty much smooth scrolling) for me. Either it wasn't an issue for you or it is not working alright. Might be that I run under wine/linux and some operations are slower in that environment then ...I guess it was a pretty subjective test on my part. It certainly wasn't worse. I can try again later and see.
Thanks for letting us know a restart will be needed, as I was just about to finally get around to the last couple of updates, now I will just wait.Some news :
-Update 0.5 is coming in June for every Patreon Tiers and for the Public
-A new start will be needed because of the bonds system being reset
-Save/Load bloat is definitely gone and the game starts/loads in 1 second
-I'm finishing the content right now and it's a bit delayed because I want quality over rushing things
Themes will be :
-Giant Bot battle (main story with choices based on skills, traits)
-Lucius and Kassiah (Optional Control, Submission, Hacking)
-Dark Tunnels enhanced (Slayer Moves, new scenes with the grims, core seeds events, Kassiah and Aline more intense relationship)
-A few new soundtracks
View attachment 4854047
I will do my best for it to be first and last one before the 1.0.Thanks for letting us know a restart will be needed, as I was just about to finally get around to the last couple of updates, now I will just wait.
Thanks again
Makes sense to me, I haven't really used the bonds system but sometimes need to be reworked.I will do my best for it to be first and last one before the 1.0.
After 5 years of development, it's also needed to make a fresh restart to see how things go.
Deleted a lot of bloats/scripts.
Yeah, I don't get the bonds either. They're something you get from seeing specific story elements and progressions, but then when you save you shouldn't enable them (or something?)?Tfw I didn't understand the message about bonds so now I have to restart the game after my like, 3 hours so the saves are not borked. Hopefully I can skip through the text real quickly.
Bond menu once opened, it is not even good or functional, will bloat your save file, that causes it to take literally minutes to load or save the game.Yeah, I don't get the bonds either. They're something you get from seeing specific story elements and progressions, but then when you save you shouldn't enable them (or something?)?
Oh. Guess I'm not touching it then. Hopefully ut's fixed for 0.4.4Bond menu once opened, it is not even good or functional, will bloat your save file, that causes it to take literally minutes to load or save the game.
It sucks but in this case it's better "early" than never. The performance was definitely struggling. Especially if you include saves with some of the standard routes until pre update. Or will there be too many changes for that to be the best choice over restarting?I will do my best for it to be first and last one before the 1.0.
After 5 years of development, it's also needed to make a fresh restart to see how things go.
Deleted a lot of bloats/scripts.