Payton.Codes

Musings on life, games, and code

Payton’s Blog

  • Refunding linked subscriptions

    Refunding linked subscriptions

    Today I wanted to write about another work project that’s taken up a lot of my time: how to properly refund subscriptions that were paid for over multiple transactions. Refunding an upgraded subscription Let’s say you sign up for a subscription at a service’s Basic tier for $10, and then later upgrade that subscription to…

  • The Receipt Item Tag Trick

    The Receipt Item Tag Trick

    I’m not sure I should be proud of this solution, but I wanted to discuss a technique I invented to solve a tricky problem at work. Our billing receipt database records have a separate table called “receipt tags” which are just simple strings that can be associated with a receipt. These are useful for all…

  • Commas and periods make cents

    Commas and periods make cents

    A long time ago (relatively speaking), all prices displayed to users on my company’s website were rendered from their numeric data (like 10.25) into a formatted string in PHP (like £10.25) and then passed along to the client. As our frontend began to have more complex requirements for the way prices were displayed, this was…

  • Thirty days hath September

    Thirty days hath September

    Here’s a riddle for you: what’s one month past January 31? Is it February 28, the end of the month? Or is it March 2, thirty days ahead? Or March 3, thirty-one days ahead? There’s no correct answer. So if you signed up for a monthly subscription on January 31, or on October 31, or…

  • Mask of the Many

    Mask of the Many

    As per tradition, I’ve written another D&D one-shot adventure for my friends. I recently had the pleasure (or displeasure?) to watch the Mystery Science Theater 3000 episode, The Pumaman. It was hilariously bad (good?) and I wanted to somehow capture its glory into an adventure. This is what came from it. I hope you enjoy……

  • Music for The Lost Card

    Music for The Lost Card

    When I was working on my game, The Lost Card, this summer, I had never planned on having sound effects, let alone music. But as the game’s final touches came together, I found the time to do both. I wanted to write a little about the process. The sound effects came together pretty quickly, thanks…

  • Notable changes in 2024 D&D

    Notable changes in 2024 D&D

    There’s no shortage of hot takes and reviews of the recently released 2024 Player’s Handbook for Dungeons & Dragons, but I figured I’d add to the pile with my own views. Caveat lector: I’ve only just started using these rules in my own games so these are just hot takes. We’ll see how it goes!…

  • Using Tiled editor for The Lost Card

    Using Tiled editor for The Lost Card

    It’s still amazing to me that I managed to finish an actual game for the first time. A lot of my success with The Lost Card I owe to the Tiled editor. I wanted to write a little blog post to explain all the ways in which I was able to leverage it to make…

  • Enemy State Machines in Lost Card

    Enemy State Machines in Lost Card

    This summer I made a simple game called The Lost Card using TypeScript and the Phaser framework. I wanted to write a little about some of the things I learned during that process. This post is about enemy behavior. Once I had a character I could move around my world, I needed to have enemies…