Skip to main content

Game breaking bug #1.

My adoring husband has done 3 playthroughs in as many days, and I ended up telling my alpha testers to hold off for a minute while I fixed some of the bugs he found. Husband and I managed to get through the entire game without it crashing, and I fixed about a dozen bugs, several of them pretty glaring. Now 1.04 is done, and I sit back and wait for my testers to test and find all the bugs that probably remain.

I'm going to do something crazy. I am going to actually talk about coding in this dev blog for a moment.

This was the worst bug.

During a cinematic, the scene would fade out, and then fade in on the same scene and repeat itself. The game could not continue past this point.

Here is how it is done correctly.

If Self-esteem >16:

These are best outcomes.

If player is Anxious, go to worst outcomes.

Else: 

If Confidence > 90, say this dialogue, proceed to next city.

Else:

If Confidence > 75, say that dialogue, proceed to next city.

Else:

If Confidence > 50, say yet another dialogue, proceed to next city.

Else: 

These are worst outcomes.

If player has Medication, delete Medication from inventory, raise Esteem by one point, remove Anxiety, and proceed to next city.

Else:

Say really bad dialogue and proceed to hospital.

Else:

If Confidence >50, go to best outcomes.

Else:

Go to worst outcomes.


Whose brilliant idea was this game, anyway?! Who wanted to nest all of these if-elses?!

Here it is done incorrectly.

 

If Self-esteem >16:

These are best outcomes.

If player is Anxious, go to worst outcomes.

Else: 

If Confidence > 90, say this dialogue, proceed to next city.

Else:

If Confidence > 75, say that dialogue, proceed to next city.

Else:

If Confidence > 50, say different dialogue, proceed to next city.

Else: 

These are the worst outcomes.

If player has Medication, delete Medication from inventory, raise Esteem by one point, remove Anxiety, and proceed to next city.

Else:

Say really bad dialogue and proceed to hospital.

Else: 

If Confidence >50, go to best outcomes.

 

Find the difference!

... 

So here it is.

We're missing a very important "else" at the end. 

This is checking your self-esteem (permanent stat) against your confidence (temporary stat that fluctuates depending on character choices). If either, or both, are too low, and you don't have medication, you're going to the hospital. Not a game over in Rorasuketo, but still an unhappy time.

Most everything nests under "If self-esteem is greater than sixteen." No matter how many ifs or elses we have tangled in this mess, the program is assuming that everything we're doing, we're doing if self-esteem is high. But what if self-esteem is low? The only condition we have for that is checking if confidence is greater than 50, and then we have directions. What if self-esteem is 15 and confidence is 49? In that case, it skips over 100% of this and blasts to the end of the script, which, here, restarts the entire scene from the beginning, and loops infinitely.

This is one event I recently altered because it wasn't nested correctly the first time, and I apparently forgot to test it with a low esteem and a low confidence. I've definitely been getting sloppier the last few months, and this is one instance of a time where you need to slow down and test the first time you put something in. There are places I have been painfully careful (like making sure no dialogue bleeds off the end of the dialog box), but stunningly, places where I have not been even at a baseline of thoroughness. Thoroughocity. Thoroughvolity.

This 👏 is 👏 why 👏 we 👏 test. 

Comments