The unfathomable mysteries of Murphy's Law and its influence on a mind on the verge of madness.
Haha, the title sounds dramatic, but I'm actually just messing around. I just wanna tell a dumb little anecdote xD
I need a break, and one of my stupid ways to unwind is writing... yeah, even if I've been doing it nonstop for days already (code, dialogue), but this is something else.
First things first, everything is still on track. It's 100% guaranteed to be finished by Wednesday at the latest.
I was testing not too long ago... and all of a sudden, I realized I'd made a stupid mistake. And Murphy's Law made its grand appearance in the process... but strangely enough, this time it actually helped me.
You guys know the evil Murphy's Law, I assume. It wasn't originally like that, but these days it's known as, "If something can go wrong, it will go wrong". And if you try to force it, make something happen yourself, then it never happens xD
While testing today, I realized that shortly after deploying the men's result notifications, the code was jumping to a completely different place than I had intended... I'm an idiot... All this time I'd been testing from a previous save after a very specific situation... But there are a lot of other situations that can also lead to the same thing in a very different context, and I hadn't tested those until now, and that's where the bug was.
At one point, I split certain things depending on that situation. If X happens while MC is first place, the code goes one way. If X happens while MC is not first, the code jumps somewhere else... Since situation X is usually very similar or even identical, there's no reason to program everything again. Copying part of the code and then tweaking a few things is enough... But I didn't copy all of it, and the code skipped an entire scene, a hugely important one that actually has 7 different variants. The stuff related to the 7 variants of the Tower scene.
What I forgot to copy was just a single line, damn, not even a quarter of a line xD
It鈥檚 just something like this:
$ torre1 = True
That means that later on, the scene shown is variant 1, instead of any of the other 6.
That same torre1 can also be torre2, torre3... up to torre7, and that鈥檚 how I know which scene the game is supposed to show.
Because this tiny part was missing, it turns out that later on, none of the scenes were supposed to play because none of the conditions were being met... and that鈥檚 why the code was completely skipping all the variants and jumping straight to a later scene.
If MC got to the girls without being in first place, the whole thing went to hell, just like that xD
Then I realized why the hell I hadn't just copied and pasted that little line. It was because the scene that needed to play wasn't the same as the original one (the part where MC reaches the girls while in first place). At some point I knew that, and that's why I didn't do it, but I forgot to write it down somewhere and ended up forgetting about it...
I couldn't just copy and paste it because it required analyzing the situation properly and figuring out which of the 7 scenes was actually supposed to play afterward.
And that's how a reverse Murphy's Law made me realize something so stupid that I ended up with a red forehead from the massive facepalm I gave myself... One of the scenarios required a scene that I never actually coded, an eighth variant.
And you know what's the worst part of all this?
I'm just incredibly, unbelievably dumb... At some point I had already noticed that situation, that eighth scenario or variant, and then I forgot about it too. In fact, I'd already rendered the version where MC's face was dirty, and I have no idea why I never made the clean face version... maybe I have Alzheimer's? xD
The image above is the last image of that eighth variant, which I never included in the code. Exactly 362 more images were created after that one. This wasn't something recent. It was completely planned out and then forgotten... so in a little while, while I'm asleep, I'll leave the clean face version of that same scene rendering. Recreating it was quick, I just removed the dirt stains.
I'll wake up in about 6 hours, do the post processing, and then integrate the scene into the code. After that, it's just a matter of adding a few missing sounds (most of them are already done) and running a couple more tests... which will go well... I think... ???
Sorry if I've bothered you guys, but I had to show you just how absurd this stuff can get sometimes... and the funny thing is that this isn't even advanced programming, and I always try to make the code as easy as possible for myself to understand xD
馃挅馃挅馃挅
Comments (7)
The branches can't get any bigger. I think the current limit is sufficient 馃珷. Otherwise, AllNatural's head will explode before reaching day 10 (out of 30! 馃槺). At least you realised it just in time and already know to leave little notes for your future self 馃槈.
Got notes all over the place, I even hid a little joke somewhere that probably nobody's ever gonna see xD But this time, I didn't leave a single note related to either of those two problems. Something as simple as a badly timed call can make every precaution go straight to hell... Anyway, I finished like 5 minutes ago, that's why I was checking things here before the final testing phase 馃槄
Its funny that even though IDEs are getting so much smarter these days, they still won't help you if you copy a snippet from one place and paste it in 3 places, and then make a change in place 1 and 2, but forget to do it in the third place....
I use VSC almost raw, though I've seriously been thinking about trying a plugin someday that, from what I understand, launches the game right at the spot where your cursor is... I even had to tone it down a bit because I hated when it kept showing command info while I was typing... I'm old school. Sometimes it's just about coding without distractions and then simply keeping an eye out for errors.
To err is human, to expect it to not happen again, ludicrous. But to have learned enough from each of those errors to nip the next one in the bud .... that's divinity, even if it's just for a minute until that rat bastard knocks on the door again with something new!
Errare humanum est (to err is human).
I served 12 years in the military in several different combat theaters and 8 years as a detective for a narcotics team. I know Murphy and his dumb ass law all to well. Always wanted to find Murphy and gorilla stomp on his nuts ... repeatedly!
