Except it's not, I'm sorry. I can guarantee you, there's is almost never a case in RenPy where you see noticeable lag and that would be caused by the code logic, unless you do it on purpose.
It will be the presentation layer that still takes up most of the cycles (image/screen prediction, screen redraws, image unpacking and rendering, etc, etc.).
anne O'nymous 's example is pretty telling.
But let's assume this is actually the case anyway. Any creator will almost always opt for maintainable code over the absolute most performant one.
And by "maintainable" I mean, they want to know roughly how it works because it's themselves they'll have to use or change in the future. Having a bit of code that looks like arcane magic to them will bite them in the ass eventually, even if it supposedly allows them to show a screen 0.0001 seconds faster.
Back to you. I just looked at
anne O'nymous after I un-ignored him.
As usual that proved to be a waste of time.
He didn't even look at the source even though I linked to it. Beyond obvious.
The only thing I can give him credit for is posting actual renpy script that someone could use.
But it is massively limited in comparison to what I posted. I explained the advantages a bit more in the first of the two replies to him.
As for your statement.
Well I'll give you one example then list what I did to verify my hypothesis in regards to the games and performance.
JikageRising
3803 if statements not including those in dialog,
444 elif,
1355 else
I used this sites search system because you can actually limit down to various game types search for key words and include tags. A couple tools I had to make use of include
rpatool.py
You must be registered to see the links
unrpyc
You must be registered to see the links
The first tool is used to extract archives
The second is to convert rpyc files back to code that is readable
Keywords I used to search were laggy and slow
I had to make a determination if the lagg was caused by another issue or game code.
In most cases things like video playback issues I would attribute to other factors. In some cases of video playback it wasn't actual video they were doing but playing a list of images and depending on how that was done. That some times was a coding issue but not the type I was looking for.
The primary coding issues I was looking for was slow updates to scene loading.
Usually this came down to how dialog was being selected to placed on the screen.
You can run a performance profile renpies game flow. It's not hard. Use a line of python to write to the file at the start and end of each section of code. Include section name and time stamp in milliseconds or microseconds
You can use profile software or save a dime and use chrome browser to view it.
You just need to store the data in the same format chrome does for profiling web pages.
You can also do another little trick.
Remember that script I used to write the many if statements.
Well there is something quite the opposite.
You can write one to go through the file and sort nested if statements.
It then can combine them to create text to write all those tuple entries.
You can then create generic functions to act as a wrapper for the various code sections.
Yep, what I am talking about is a python script that can automatically replace all those nest if statements with a dictionary system.
That kind of thing can save a bit of work. Turn something that would take hours in to running a script.
I might normally say, "If someone asked nicely I might give them a copy of such a script."
Yea, I thinks nice is kind of passed this conversation by.
If someone wants it money is going to need to do the talking.
That or you could write the script yourself. It took maybe 30 minutes for me to do.
Now I didn't check all 3609 renpy games on here.
Hell I didn't check everyone that has a problem.
I even eliminated the ones I figured were related to other issues. (that's a long list) i had to look at more than one complaint per a game. To even determine the type of issue fit what i was looking for.
I found other stupid shit in the process. example: Using recursion to go through a list of characters to update.
I noticed a good bit of games in the abandoned area with lagg complaints had that commonality.
Anyway I looked at over 150 games I didn't get to 200 I pretty much was sure by that point. This was a factor.
It might not be every games issue it sure as hell is a lot of these games issues.
But, I'd like to hear how you came to your conclusion. Well I already know the part were you listened
anne O'nymous
But you apparently didn't bother to really evaluate what he posted.
He made a false claim I didn't do a check. Then he went on to post bogus code regarding in and get and clearly didn't even look at the actual source code that I linked to renpy's compiler.
Example:
How many games did you check and how did you sort out the different issues?
Did you just run a profile or did you replace code?
Did you do any hard test beside profiling such as code replacements? Even if it was as simple as removing chunks of code to see if the problem was in that section. Maybe you commented out or actually deleted it.
Yep, I would love to know what you actually did.
I'm pretty certain you didn't use a script to replace code section with improved code and no one else on the site is currently or has shared such a script. So I think we can eliminate that.