how many me's does it take to screw in a lightbulb (Patreon)
Content
Time: Wednesday
Objective: Test to a certain point so I can fill in more eventing. There's a long scene before that point that I have to get through though. I specifically need to check where the events are at the end of that scene so I need to play it out.
Obstacle 1
Ah, I didn't insert a face graphic here that we just finished recently... Let's just do that real quic
Obstacle 2
Ah, the tile that I added on that door didn't get saved... Okay, I can put that back in a second.
Obstacle 3
Man, it sure does take a minute to skip through text compared to Reborn, I've been meaning to fix that since before the demo. Doing so sooner rather than later will probably speed up my work significantly, but I'm not sure if that's a problem that's high enough level* for me to be capable of solving...
(*Not video game levels. "High level" in programming means, easy for humans but complicated for machines, as opposed to simple for machines but unreadable to humans)
It takes an hour but I eventually figure out that there was already support for text skip to zoom, it was just broken in one of our plugins. The fix is simply done and scenes now zoom.
Obstacle 4
Um, the game hangs at a certain part of the scene? Maybe this is like reborn where skipping text too fast can break event movement if it's not properly handled. Okay, so let's test without text skip to see if it still freezes.
It still freezes. Well, at least it's not text skip. I'm not sure what changed to make this start freezing-- maybe I moved an event one space to the right, so the coordinate position another event was assigned to overlapped and thus could never finish.
Well... I did just set up a bunch of code to handle event names more dynamically, let's just apply that here so that I don't have to worry about that in the future; I can just say This Character walks to That Character, Wherever They Are.
I apply the code and test. It works for my new case but it breaks other uses because when I made sanitizeEventId in my last post I didn't account for numbers as strings. In other words, the code considers The Number 7 to be different from a variable that had stored the text containing the number "7".
So in order to fix movement I now have to make sanitizeEventId process strings as numbers. This takes a bit of extra time but the scene is broken if I don't fix it so one more detour... and done. I get further in the scene.
Obstacle 5
I get further in the scene and the character portraits just don't load randomly. It's after a break point for skipping cutscenes, but only part way though because I need to stop to let the player make a choice. I think the graphics not loading is related to the skipping, so to confirm I test the cutscene manually again-- at least I have fast text skip this time.
They load this time. I take a look at why they might have not loaded when skipping. I don't understand why. I make a change and test skip again. This works. I test not skipping. My change has broken this.
Our current implementation of cutscene skips works by completely jumping over the processing of all of the skipped event. This means that whenever the skip finishes, I have to do a bunch of manual processing to 'catch up' the game to whatever would have happened in a scene. Did we flip a switch? We have to make sure to do that after the skip. Did a character move? We have to port them into place. So on.
This was how it worked in the demo too, and inconsistencies from skipping at various points during a scene were a huge source of cats. Aside from just catching up, we also have to account for-- did a character start walking in place for one message? What if the player skips during that message? We then have to add a check after the skip to make sure that the character is not just walking in page forever.
I realize this is untenable and I will wither and perish before accounting for all of the possibilities and skip issues in scenes I want to make. On my other monitor, I have cutscene skip code up and I see a comment from my past self:
### TODO: Wait, the code is just iterating through every event command here anyway while skipping? Can we set it up to only process some of them?
An olive branch.
So I set aside my hopes of making it to the scene I want to event and start taking a look at the cutscene system. My past self's idea proves fruitful; I can set it up so Cutscene Skip skips the skipping of everything that doesn't need to last and which will happen instantaneously-- controlling variables, switches, giving items, adjusting the party, script commands* etc.
The script commands are my magic monkeysauce. As you can see in the relevant obstacle, I have done a lot of things for the demo that were perhaps in poor foresight. One of the things I -did- do well was set up all management of portraits and character art through script commands so that they could easily be edited en masse. This has already proved clutch a number of times, but here as well-- if we process those mid-cutscene then hopefully they process fast enough that all the message art will Just Be In Place when it loads in. And if not, we can handle them however we need to work during cutscene skip.
Unfortunately I haven't actually had a chance to test how well this scales for a long cutscene yet.
Before testing script commands, I have to account for movement. Like with most event commands, it's easy to skim through and say "here are all the commands that can happen instantly and just need to be triggered". For everything else, there is not MasterCard. I set up the pathfinding Obstacle 4 to just detect where the event is going and pop it into place. Fine. For more direct movement (like Reborn uses) I make an additional case statement and tally up all the times it says "Move Left" "Move Up" etc... So X+1, Y-1, so on. My plans are smeckledorfed when I get to commands like "Move Forward", "Move Towards Player"-- things that are going to depend on past commands having succeeded. I write out a bunch of math to account for it all and pull facing into the list of commands which are processed harder. As far as I can tell so far this works, but it hasn't exactly been stress-tested.
Obstacle 6
We've overcome all of the above, but I still haven't even gotten to eventing the scene that I set out to in the first place. Only instead of Wednesday, now it's Friday morning, I haven't even tested to see if the message art works in cutscene skip, AND I still don't know how many of me it takes to screw in a lightbulb.
You know what, let's just test the big cutscene skip right nowm mid-post.
What could go wrong.




mm.
yeah, that sounds about right.
maybe next wednesday.
---
I have just been informed during the writing of this post that the team on Reborn is ready to take on more testers. So, if you are a Ruby Patron (level 5+) you should get access to the beta momentarily.
May testing treat you better than it does me.