Getting back to games

It's been a while since I played many video games.  Not counting "casual games" on my phone, of course.  I'm talking about games that take more than ten minutes and that you can't necessarily put down at the drop of a hat.  But I've been getting back into PC games a bit in the last few months.

As I mentioned back in July, I've been playing some Halo.  Specifically, I played my way through the Master Chief Collection (MCC) on Steam.  For many people, playing the MCC is an exercise in nostalgia.  But I had never actually played any of the Halo games before (despite the first one coming out like 20 years ago), so this was all completely new to me.  And for the most part, I found them quite enjoyable.  (Now if only they'd port Halo 5 to PC, I'd be all set - I'll be damned if I'm going to buy an Xbox for one game.)

I actually picked that up from taking my son to the Strong Museum of Play.  You see, a while back they brought in a Halo: Fireteam Raven machine.  We tried it out and my son was immediately hooked.  He started wanting to play that every time we visited (which was pretty frequently, since we have a membership) and started to pretend to be using the weapons and fighting the aliens when he was playing around the house.  

IMG_20210822_112524-med.jpg

The game itself is nothing super special.  It's an on-rails shooter with cooperative multiplayer.  You get different weapons at pre-determined points in the gameplay and fight different enemies in different stages, but that's really the only variation there is.  However, unlike many arcade games, it does have an actual plot, with cut-scenes at the beginning and end of each level.  It's not a super-deep plot, but it's something, and it does tie into the larger Halo universe.  (Synopsis: It's set at the same time as the events of Halo: Combat Evolved.  You're a member of an ODST fireteam on the Pillar of Autumn and you have to fight off the Covenant and the Flood until the Master Chief can destroy the ring.)  So I ended up getting interested and playing the PC games.

As I said, I decided to install The Master Chief Collection via Steam.  I'd had a Steam account for many years, but never really used it much.  At one point I downloaded Railroad Tycoon from Steam (because I'd enjoyed playing Loki's Linux port of it years ago) and it didn't really work properly, so I wrote it off.  But it's very popular these days, and I already had a lot of unused Steam codes from Humble Bundle games, so I figured I'd give it a shot.  And you know what?  The Steam client is still buggy.  But it's usable and it's pretty good when it works correctly.  So I've been redeeming some of my codes and playing a few of those games via Steam.

My latest favorite is Stardew Valley.  I got a copy of it as part of a Humble Bundle at some point - I honestly don't even remember when.  I've seen plenty of ads for it, especially the mobile version, but never really gave it much attention.  I don't know what made me decide to try it, but since I already had a copy, I figured I'd give it a look.  Turns out it's actually surprisingly enjoyable.  It's a retro-style life simulation, where you play a farmer who moves to a valley with a small village and become part of the community.  There's no real plot that I can discern yet, or any real win or loss conditions.  You just build your farm and form relationships with the townspeople.  Yet it's oddly relaxing and just feels good to play.  It's also on lots of different platforms and it's pretty cheap, so if you're looking to unwind, it might be worth checking out.

Holiday mission

Last year, I gave my son an assignment for Christmas: help me assemble the RetroPie we got him.  He enjoyed that process and subsequently became a fan of Contra.  This year, we were a little at a loss as to what to get, and eventually decided on making the big family gift a Nintendo Switch.  Still video game themed, but not really amenable to being a DIY project.

But then, a few days before Christmas, we were talking about the vacation we took in Florida at the beginning of 2020, right before everything got locked down.  My son mentioned how much he enjoyed our trip to the science museum, which had a special exhibit on spies.  So I decided to make this year's "Christmas mission" a spy-themed scavenger hunt.  

I figured it would be nice to make it semi-educational, so I wrote a simple "encryption" program (just ROT13 in Python), commented it heavily, and e-mailed it to him.  Then I came up with four clues to lead him to, first, his stocking, and second, the Switch.  I wrote a short letter describing his mission and including the encrypted text for the first clue.  Then I encrypted the other three clues, printed them out, and hid them in the appropriate places.  I put the letter in an envelope and hid it semi-conspicuously in the Christmas tree.

Here's the program I sent him, in case anyone is interested:

# This program does a ROT13 encoding on a message to encrypt or decrypt it.
# ROT13 is a simple "substitution cipher", also called a "Caesar cipher" after
# Julius Caesar, who was one of the first people to use it.

# A substitution cipher means that you replace one character in the message with
# a different character according to certain rules.  ROT13 stands for "rotate by 13",
# because the rule is that you replace with the character that's 13 places farther in 
# the alphabet (when you get to "Z", you loop back around to "A" and keep going).

# One of the cool things about this is that, because there are 26 letters in the 
# alphabet, ROT13 can both encrypt and decrypt a message using the same method.
# You don't need to do anything different!

# Here's how the program works:

# We'll put the decryption in a function and pass it the message
def decrypt_message(message):

    # This is where we're going to store the decrypted message
    decrypted_message = ''

    # We decrypt by going through the message one character at a time.
    for character in message:
        # If the character is an upper-case or lower-case letter, let's rotate it.
        if character.islower() or character.isupper():
            # First we figure out the letter's position in the alphabet.  We can do
            # this by using it's ASCII code, which is the way we represent letters and
            # other printable characters in binary, see https://www.asciitable.com
            starting_ascii_code = ord('A') if character.isupper() else ord('a')
            # To get the position, we get the ASCII value of the letter and then subtract
            # the ASCII value for "A".  (Lower-case and upper case have different codes.)
            position_in_alphabet = ord(character) - starting_ascii_code
            # Then we add 13 and take the modulus with 26.  The "modulus" is the remainder
            # when you do division, so 30 / 26 is 1 with a remainder of 4, so the 30 % 26 is 4.
            new_position = (position_in_alphabet + 13) % 26
            # Now we add back the value we subtracted to get the position to make it
            # an ASCII code again.
            new_character = chr(new_position + starting_ascii_code)
            # Now we can add the the new letter to the decrypted message.
            decrypted_message += new_character
        else:
            # If the character isn't a letter (e.g. a space or punctuation), we'll
            # just leave it alone and add it to the decrypted message.
            decrypted_message += character

    # Now we can print out the result!
    print("The decrypted message is:")
    print(decrypted_message)
    print()


print('Ready to decrypt!  Type "exit" to quit.')
message = ''
while message != 'exit':
    print("Enter the message:")
    message = input()
    decrypt_message(message)

Zane actually found the letter on his own before I even had a chance to nudge him toward it.  He was really excited and immediately wanted to get started.  So we went and downloaded the ROT13 program and I showed him how to open it in IDLE.  He read some of the comments and then we ran it and he typed in the first message.  That led him to the second one hidden in the advent calendar, which in turn led him to his stocking in the basement.  Since we weren't doing presents until the extended family came over for lunch, the third message in his stocking told him to talk to his aunt, who I enlisted to deliver the last clue, which led to the Switch strategically hidden under the bed.

Apparently it was a good idea, because Zane was really into it and had a great time.  After finding the Switch, he even held a "debriefing" where he explained the entire mission in detail to his grandparents.  I count this as a very successful Christmas.