Hey guys i just wanna say a couple of things:
You might remember me as the guy who tried to correctly compress all assets in the game to make it run better from the last thread. First i have to inform you guys that compressing the images that were included in the game didnt help with the performance at all, it basically had no benefit to it except for decrasing the game size about tenfold. However i did find the cause of the performance problem after a bit of profiling and debugging and it seems that the problem is much bigger than i thought. For context: Renpy usually preloads images that will be shown on the screen before they are actually show in order to prevent these images to load the second they are called by the script and cause lag. The Renpy website has a indepth documentation which explains how to handle and manipulate images in game to ensure this feature of the engine gets used and the game runs smoothly as a result. So as some of you might know since this game is depends on gameplay mechanics such as being able to chose what the characters are wearing, and the ability to interact with different characters on demand in an unlinear fashion, textures such as clothing, facial expressions, and other stuff is called into the screen rather often.
Now if the game had been using the techniques i mentioned above then there would be nothing to worry, however for some reason Oni decided he would rather write his own solution to this problem and came up with a couple of much used scripts that composes the characters appaerance by stacking several images on top of each other by brute force. Now to give him some credit when you have different combinations of textures that all reflect a different option in the game such as skin color, hair color, underwear, expression, skirt, top, etc. composing the final becomes a bit tricky since most renpy games are just linear visual novels that has only a couple of textures per character at most. However Rogue Like isnt the only game that tries to do such things within the constraints of the Renpy engine and there are frameworks and guides on the web that does the same job while also makes use of the preloading feature thus running smoothly.
You see if a script draws images on the screen using the techniques used on this page
You must be registered to see the links
, then it all works out. However if you write python code to accomplish this instead of utilizing the tools provided by the renpy engine then the game loads the texture at the first frame when the corresponding button is pressed in the game. Now if you try to go to rogues room most of you will recognize a stutter when she is first seen, this is due to the scripts that oni has written which causes the game load all 20-30 textures that make up Rogue all at once at the same frame. Unless you are running the game on some extremely fast M.2 ssd or changed the options within the game to load all of the assets which make up the game to RAM, you will experience this kind of stutters whenever you enter a new "scene" with characters in it. I've tried looking at function which composes Rogue thinking that maybe i could improve it but unfortunately its just 5000 lines of "if" "else" statements that all ends with an image that has about 20 textures stacked on top of each other. Due to this fact unless we spend some time rewriting scripts that makes up the "core" of the game the game will keep stuttering even on the most beefy hardware.
Also now that i have some free time i will experiment with compressing the entire game in different settings and have renpy load all assets to RAM at startup to see if it could work. Another thing i want to say is that, even though i disagree that we should spend our effort adding yet another character instead of improving the existing ones, if you are adding a character into the game please check out the proper way to do it on the web and make sure you wont bloat an already horribly coded game.