Starter Town Logo

Starter Town Ep. 5: You May Not Pass

June 28th, 2025

With your Bento neatly packed and your coin pouch feeling a little light, you’re ready to explore beyond the safety of Starter Town.

Maybe we should look for a detour…
Maybe we should look for a detour…

A crooked sign swings in the wind above a very sketchy cobblestone bridge over a river.

“This way to unsafely leave safety. Goodbye home sweet home.”
and underneath is a hunched over figure.

“You may not pass.” He growls, “Unless…”

Let’s talk logic

You’ve made decisions all day. Should you cross the street? Drink that suspicious milk? Say “hi” to that NPC with a weird mustache?

Well, our games make decisions too. You just have to teach it how. We lay out the conditions using if and writing what has to be true:

# one = is for variable assignments, two == is for comparisons

monies = 3
toll = 5

if monies == 5:
    print("You may pass.")  # (this won’t print, not enough monies!)

You look at your coin pouch and see you accidentally packed bananas… sigh…

So if the condition is false? We need a different path, an intentional decision is still being made.

if monies == 5:
    print("You may pass.")
else:
    print("Bananas? Do I look like a Tuesday troll to yous? Scram.")

Looks like bananas only work on Tuesdays.

Our else statement (also known as our default) will always happen if our first condition is false. But, we can check for other conditions first by chaining them together with else if:

if monies == 5:
    print("You may pass.")
else if has_sandwich == True:
    print("...Fine. But better not be tuna.")
else:
    print("Scram. Go back to Starter Town.")

Sometimes the troll checks your name, your wallet, or if you’re carrying a snack. As long as there’s a yes or no answer, you’ve got yourself a condition.

Same Same… or Different?

We have a few symbols we can use to express comparisons:

  • Exactly equal to : == — Left side must have the same value as the right
  • Not equal to : != — Left side is not the same value as the right
  • Less than / More than : < / > — Left side is less/more than the right
  • Less / Greater or equal : <= / => — Left side is less/more/equal to the right
age = 12
requirement = 13

if age < requirement:
    print("Too young to pass.")

And If the toll is for a troll?

Sometimes one rule isn’t enough. What if the toll is 5, and the gatekeeper is a troll? We can throw in a little sass.

We check to see if multiple things are happening at the same time with and and or operators.

monies = 3
monies += 2  # Now we have 5 monies in total!

if monies == 5 and troll == True:
    print("Here's your lousy toll, troll.")

Hmmph The troll grunts, unimpressed.

“Your departure awaits... Enjoy misery outside of Starter Town.” scoffed the non-Tuesday troll.

Quest Log Updated.

  • if, else, and elif statements help your code make decisions
  • Use comparison operators like ==, <, !=, and >=
  • Combine conditions with and / or

Episodes

© 2025 Blackcat School of Interactive Arts. All rights reserved.