Super rapid update and shameful admission of failure
While enjoying some time off from $DAYJOB I have returned to active dev on this project, spending quite a bit of time over the past week or so.
I felt like the a fair bit of the narrative section is getting close to being usable and decided to go back and re-look at the gloryhole minigame part. Checking the update timestamps, I was dismayed to find that I was last working on it (gulp)
last year.
Revisiting such ancient code was an *unpleasant* experience. I'm amazed that I got it working at all, and now I am astounded at my mortal hubris in thinking I would be able to use such extremely complex code in working game.
The issue with a complex design is that it's hard to understand, and fragile when making changes. Therefore trying to work from a starting point that is already overly-complex would be a death knell for a game like this because... the minigame is the heart of the "The Moorcock Incident" game - it has to be *good*.
I want (need?) the minigame part to fulfill the following requirements:
- it must be smooth to play (not frustratingly jerky or filled with annoying pauses or UI clunks)
- it should be visually attractive (animations smooth and connected, screen and UI transitions etc smooth)
- it must be "extendable" (so that more types of interactions can be bolted on as content is added)
Smooth and "feels good to play" is actually kinda hard in Renpy (or at least it is difficult for someone with my meagre ability) - the framework is simply not designed in a way that would make it easy to do what I imagine in my mind
In a more custom game engine design you would set up an event loop that gets run (i.e.) 60 times a second, where user input is taken in, game logic is executed, and output images that reflect any state changes are drawn. But Renpy does not work that way unless you get right into the guts with "Creator Defined Displayables". Instead, it's all about reacting to user interactions to trigger actions, with no easy way to setup a sequenced programmable animation to play in parallel to other screen updates, main image animation, sound effects and button interactivity.
As I mentioned, I *did* manage to get such a thing somewhat working by using Renpy screens with short interval timer loops that continually trigger an "action queue" runner. Upon each timer event (which sadly trigger no faster than ~20 times a second and can be even slower when there is a lot going on, or on a lower-power CPU platform) the runner would check the top event on a queue and if the event's TTL (time to live) had been reached would run a callback function to do something like update a UI bar, or swap out a displayble, or increment a score counter. By queuing up various actions with different TTLs something that looked like a "many parallel animations" screen could be acheived.
So... where does that leave me? I beleive I need to rethink the design and stop
raging against the machine fighting the system design.
Renpy does have some ways to do effective "update this UI element x seconds later" via the ATL system. This most basic use of this is the renpy.notify function which shows in the background an animated ui element that then auto fades away some time later - and does not interfere with the normal actions of the player at all.
I think that with prudent use of that sort of technique, along with changing the user interactions of the minigame play design into something that is a more direct "choose action" -> "watch result" loop, will let me build a core game element that is sustainable.
I've partly come to this conclusion from the knowledge gained via digging into source code for various other games over the past year.
A Very Full House is one, and
Decked in Love by my long vanished man-crush
MrSilverLust is another. I even spent some time trying to understand what the fuck is happening in the code of the game that inspired me to make this one, "On Edge", but that is double cursed because a) it's fucking RPGM which mostly does not use source code but instead is all made in a Windows editor, and b) the javascript code module that the dev did create custom for the game are a hellscape of unused code paths, cryptic names, and commented-out functions. I truly beleive that one of the reasons that the dev abandonded the game is because he had written something so complex that when he came back to it after a break he could no longer understand it. I will take that lesson to heart - complexity it the enemy.
And finally, after vomitting nearly a sophomore level essay of words into this text box, I will reveal the shameful confession...
I do not have any new art to show you. It has all been code this past week.
Sorry!