I don't recall calling the code 'Spaghetti code'. Pretty sure python doesn't support GOTO (it does not, by design), which makes true spaghetti code impossible. And you may possibly be right, and I have ZERO doubt that Harem Hotel has a ton of technical debt which is just getting pushed off. The time that it would take to fix that technical debt is also time that isn't spent attempting to get out new updates, which would probably cost him patreon subs. Assuming a 25% rate of technical debt (A large assumption, I admit), it would take a year and a half given their current dev schedule to pay down that debt. That is a year and a half worth of shit they have gotten used to, for better or worse.
I looked through the python code, and I didn't see anything terribly egregious. I did not open up the RenPy scripts, because my experience with those is zero. A brief look at the docs didn't reveal much. Which files do you have a problem with in particular? And if you problem is optimization, then you are barking up the wrong tree here. The language is Python, the literal last choice for optimization. The game will still run decently on a potato anyway, so there isn't a need. Optimization comes at the end, not during dev.
I'm not a Ren'Py professional, but I have read dozens of Ren'Py scripts from the major Devs on this site and since they ALL use Ren'Py
jump instruction, I have to assume that Ren'Py script doesn't provide a more structured flow control.
After all, it's understandable: Ren'Py was designed with Visual Novels in mind. A visual novel require branching, but it doesn't require anything like
while - do,
do - while, or
for loops.
@
torresm is right: in a Ren'Py game all the Dev's work is in the
game folder, specifically in the
.rpy scripts. The code in the other two folders (namely
lib and
renpy folders), is standard code provided by the Ren'Py SDK, and it works out-of-the-box so the Dev typically doesn't change it.
Optimization is not an issue talking about a VN.
What may be an issue is
maintainability.
It's not a matter of writing code in a machine-friendly style. Quite the opposite: it's a matter of writing code in a human-readable style - and as
ordered and
structured as Ren'Py allows to do - to be able to add new content seamlessly, that is without any new content potentially being incompatible with previous code.
I'm not assessing that Harem Hotel does have such an issue (I'm not qualified enough to confirm it nor to deny it), but I am sure that as long as a Ren'Py VN is concerned saving CPU or GPU cycles is not an issue;
maintainability is the issue, if you are going to publish the game by incremental updates.