Prototyping Snake Shapes

Snake Shapes prototype app icon

I don’t know that I have ever written a blog post about a game I’ve prototyped before. I mean, of course I prototype every game, but I don’t often talk about games that are in the early phase of development. In this case, I spent a non-trivial amount of time working on a game with the WIP title “Snake Shapes” in December 2021. I don’t think I’m going to spend any more time on it unless I have some big epiphany or something. I don’t know how many games I’ve worked on where I abandon them like this, but there have been a few over the years, I just don’t think I’ve done very much, if anything, to document one of them before.

First, what is Snake Shapes?

The original idea came from an entry in my game design journal on October 15th. Around the end of November, I knew I was going to have most of December to spend on some new game idea, and “Snake Shapes” was just one of many ideas that were competing for my attention. It wasn’t actually what I considered “the best idea”, but it was one that I thought would be “quick and easy” to prototype using a new written-in-swift version of my Generic Game Model (GGM) library.

Anyway, the idea for the game was a turn-based version of Snake, where you try and form shapes (initially just squares) with your tail. This evolved during development a bit to have less emphasis on the actual shapes created. I was going to have a pop-up every time you created a shape, saying how many of that shape you’d created, and giving extra points for shapes that hadn’t been created before. I did not implement that aspect. Every time the snake moves there is something new that gets added to the gameboard. The first 8 are fixed pickups of only two colors, but they are randomized after that, and every 4th thing added is a “wall” square that you cannot move into or through. The game as it is currently is just to get the highest score by eating things and making shapes with your tail until you run out of room to move.

I did spend a bit of time trying to brainstorm different names for the game. I might use the terms “Snake Shapes” and “Square Snake” interchangeably, because I’ve called the project both things, and frequently mix them up. I did also try to entice my 11 year old (who is getting quite good at making art in Procreate) to make artwork for the game, but without any luck.

At some point I had and latched onto an idea that each shape created would boost a counter for “number of power-ups” for a given type of collectible on the gameboard. I thought these would be fixed, one per type, but then I couldn’t decide what all the power-ups should do, so I decided to ask the player which one they’d like after each new square color. I implemented 6 power-ups in total, (which only took 3 days or so, including the popup, which took almost a whole day itself). They are:

  • sort your tail by color
  • remove half the walls on the board
  • convert half the pickups on the board to a random color
  • remove half the pickups on the board
  • clear out a 5×5 grid around your snake head
  • push every wall 1 square away from your current position

Unfortunately, one of the power-ups breaks the game by allowing the player to continue to play indefinitely. Can you guess which one?

Updates to Generic Game Model

I have written a bit a few times about Generic Game Model, but I’m especially proud of a talk I gave about the library to the MN Cocoaheads in 2014. That original version of the library was written in Objective-C, and for at least a year or so, I’ve been working periodically on a new version written in Swift.

Because I haven’t really had a specific project to use it on, I’ve mostly been trying out different things as the mood/whim strikes. For instance, at one point I really wanted it to be a swift package, and you can find a version of it on GitHub that kind of works, but I ran into so many problems using it that way (specifically for Square Snakes development, and while the package is “in flux” so to speak) that I just copied all the files in the project. (I still need to copy the files back out of the project into my package again, as there have been a ton of changes and improvements.)

Another thing I spent extensive time working on was deciding how much to embrace SwiftUI for this iteration of GGM. There’s another repository on Github where I decided to ONLY use SwiftUI, and I abandoned that idea too, after numerous headaches. I think I might know enough now to give that version another go, but I have some concerns (possibly unfounded) about performance, particularly in regards to animation. (SwiftUI does have animatable properties, including offsets and frames, but it was unclear how complex animations would be possible, and animations weren’t the only place I was seeing performance issues, but they may have been my fault entirely.)

What did I really accomplish here?

What am I proud of about working on this game? It’s not really the game idea, frankly. I proved it out, but sadly, I think it’s more fun to play without the power-ups. That said, there are a lot of different directions I could take it, and it could be that it just needs some tweaking in one direction or another to be fun. At this time, I just don’t think I’m going to spend the time necessary to figure that out.

Mostly, the tech was fun to build, and I’ll list some aspects of that here:

  • SwiftUI – It was surprisingly quick to build out new screens with SwiftUI. I used it to build essentially everything outside of the game grid itself, including a bunch of tutorial screens, and a popup that asks you to choose which power-up you want to associate with the color of square you just made. I’m not sure it would work in a “real” app, but I was pretty happy with the structure of the State object that controls all of what is displayed in the Application.
  • Xcode Cloud Build – This was one of the last things I did on the project, but it’s a fun one. It was only a day or so of work to set up the project so that when I push to the GitHub repository, Xcode Cloud will create a new TestFlight build for me using the new changes. It’s kind of amazing that, as a solo-indie developer, I can get continuous integration working on a project in an afternoon.
  • A-star pathfinding – This was actually something that came out of doing Advent of Code (adventofcode.com) in December as opposed to the Square Snake project, but if I hadn’t been working on the project, I am certain I wouldn’t have been as excited about the pathfinding problem. I essentially followed the A-Star tutorial over at Red Blob Games, and had it working in only a few hours. I didn’t really have a use for it in Snake Shapes, but did the work to integrate it with my library anyway, and that work paid off a few days later when I implemented the “push every wall 1 square away” power-up. I didn’t use the A-star itself, but used the PriorityQueue struct that was part of the code written for it.

What could I have done better or differently

This wouldn’t be a good retrospective if I didn’t think about what I could have done differently on this project. To be honest, even though I’m abandoning development, I’m fairly happy with how it turned out. Not happy enough with the game itself that I want to spend any more time on it, but happy with the things I learned and my progress toward making my GGM-swift library a usable tool for native iOS game development. I felt pretty “focused”, and even though what I was building meandered around a bit, I’m pretty happy with how on-task I stayed and the personal growth as a result of the project.

Here’s a few (minor) regrets:

  • I would like to have spent more time on the Tetronimo aspect of the game. As previously mentioned, at some point I decided it would be “too easy” to make shapes other than squares in your tail, and abandoned that aspect of the game idea. That meant I could be exceedingly lazy with the code to detect “shapes” in your tail, and allowed me to abandon one of the aspects of the game I was looking forward to developing. (I have several Unity prototypes that do Tetronimo shape detection, and I was kind of looking forward to porting that code to GGM.)
  • Also previously mentioned, I abandoned SwiftUI for drawing the game squares themselves. Because the library relies on UIKit for this aspect, it means it’s limited to iOS. If I really embraced SwiftUI, it would support iOS, MacOS, tvOS, and possibly watchOS. This is an area I’d still like to spend more time experimenting.
  • I had a TODO in the project to flush out the tutorial views in the app with examples. I didn’t do it because it felt like “work” (in a way that working on the game itself didn’t), but also because I wasn’t sure if I was going to change to using images for the game states themselves at some point, and that might have necessitated re-work. Anyway, the tutorial as it exists now is pretty much the worst kind of tutorial in that it’s just a bunch of text you have to read.

Demo

Demo time. Here’s a video of a couple of play-throughs of the last version of the game, so you can get a sense of it.

2021 in games Played and Created

In 2021 I wrote 73 game design journal entries. Of those, I think I made (or started making) 6 board game prototypes (most notably for Blither, I think), and worked on at least 2 new digital game prototypes. There were 28 entries for game ideas I’d already had or worked on in some previous capacity.

I did only one game jam in 2021, the Global Game Jam.

I also released one game on two platforms in 2021, Thrive Digital, for both iOS and Android.

The played log

This was my third year keeping track of all the games I played. (You can also read my previous year’s posts about 2019 and 2020 if you’re curious.)

I played 319 different games in 2021.

My “played log” boils down to a list of entries per day, with a comma separated list of games, and each game has an associated platform (iOS, Switch, tabletop, etc.). This is the epitome of manual data collection, so I’m just trying to remember to add to the log whenever I play something. Usually after I get done, but sometimes in a batch at some point later in the day.

I added a totally new type of entry this year after last year’s resolution, which is just a single line with a name of a game and a (mini) review. I think in every case it was about something I’d played earlier that day. Before I parsed the log, I was certain I would be disappointed in the number of reviews I wrote because I could only remember writing a few of them, but I’m happy to say that I ended up with 38 reviews!

Top Played Games

I’ll write about some of these individually below, but here’s the top 10 list of games:

  1. Good Sudoku: 365 days
  2. Stone Age: 319 days (33 games, 18 won)
  3. Innovation: 293 days (70 games, 40 won)
  4. Splendor: 215 days (42 games, 26 won)
  5. Race for the Galaxy: 212 days (53 games, 36 won)
  6. 7 Wonders: 200 days (45 games, 15 won)
  7. Flow Fit: Sudoku: 128 days
  8. Roll for the Galaxy: 128 days (43 games, 27 won)
  9. New Frontiers: 119 days (25 games, 19 won)
  10. Picross S6: 106 days

This list includes games I played on Board Game Arena, some of which span multiple days. I think this year I’m going to log games on BGA slightly differently, and only include the names of games that I complete that day. This will reduce some of the tedium of figuring out which turns I just played on BGA (I don’t usually log them until after), but of course at the expense of being able to figure out which days I thought about each individual game, however briefly. Also worth noting that BGA collects extensive statistics itself, and that’s how I was able to see how many of each game I played (as well as the number of victories).

Here’s a list of the top 10 games not on BGA:

  1. Good Sudoku: iOS, 365 days
  2. Flow Fit: Sudoku: iOS, 128 days
  3. Picross S6: Switch, 106 days
  4. AM2: iOS, 102 days
  5. Picross S4: Switch, 84 days
  6. Picross S5: Switch, 63 days
  7. Picross S: Switch, 40 days
  8. Cozy Grove: Switch, 21 days
  9. Genshin Impact: PS5, 19 days
  10. God of War: PS5, 19 days

I’m happy to say I’m no longer playing AM2, and I’m hopeful that next year there will be no clicker or idle games on my top 10 list. (Though I’m not ashamed of checking them out now and then.)

Daily Routine

It’s obviously worth noting I played more games this year than last year. 319 unique games versus last year’s 297. I think one reason for this may be that among the many changes the global (COVID-19) pandemic has wrought on my life is a new and more-regimented daily routine. More so than at any other time that I can recall, I now have a set pattern to my life. (Maybe this is as much attributable to age as it is to the pandemic, I truly don’t know.)

In the morning, I drink coffee and usually catch up on my Board Game Arena games before starting my workday, with breaks for lunch, picking up my kid from middle school, and sometimes a walk with my wife or (rarely) the whole family. Around 6 is dinner, and by around 9:30 or 10 my wife goes to bed and I begin my daily workout. (Don’t worry, this is when my evening games routine begins.)

My workout involves my Apple Watch (the completion of my “fitness circles” is a game in itself), and also a fitness/physical therapy tracking app called PT Timer. The PT Timer app tells me which “routines” need completion. Currently this is: a floor stretch, standing neck stretch, some upper-body strength stuff on M-W-F, and finally a 20-minute-minimum cardio that I don’t use the app to complete, but enjoy “marking completed” at the end. During my cardio (which has a variable length because I try not to stop until the Apple Watch tells me I’ve burned enough calories for the day) I jog in place on a small trampoline in front of the TV… while playing something on the Nintendo Switch. Almost always, it’s some form of Picross.

After my workout, I read a book or some poetry, sometimes play another video game, sometimes do some writing, and somewhere between 11:30 and 1:30, I brush my teeth and head to bed. While I’m brushing my teeth, if it’s past midnight (and it usually is), I do the daily Sudoku problem in Good Sudoku. And recently (well, for the last 125 days) I also do the daily puzzle in Flow Fit: Sudoku.

Good Sudoku

There is an achievement for a full year of Good Sudoku. I should have it, but I don’t. About halfway through the year an update lost my current streak. This was 182 days ago. (My current streak.) I actually emailed the developers about it, and they offered to fix it for me, which I definitely indicated I would be happy about, but then I never heard back from them again. I get it. I’m not great about supporting my apps either. Anyway, this is the only game I actually played all 365 days in 2021. I’m 100% sure Good Sudoku is the first and only game that I’ve ever played every day for a year. Mostly I consider using the hint button cheating, but the Sunday puzzles are sometimes really hard, and if I’ve spent more than a half-hour on it, and am still having problems, I’ll do it anyway. Usually one hint is all I need.

Flow Fit: Sudoku

Flow Fit: Sudoku feels a lot like Sudoku. It’s got tetrominos with numbers in them, and you have to fit them onto a grid such that no number occurs more than once in any row or column. It’s a really engaging game for me, and if the daily puzzle is too easy or quick, I will pretty frequently do some of the other puzzles to fill out my toothbrushing routine. It’s also a frequent go-to if I’ve got some time to kill. So far I’ve done 410 of the 2625 puzzles bundled with the app.

Platforms

I modified the script that parses my game log a bit this year to count number of days played per platform. Last year’s platform numbers were all the games multiplied by all the days they were played. This year’s can tell me both number of unique games played as well as number of unique days. Here’s the full list:

  • BGA – 96 unique games on 346 days
  • iOS – 74 unique games on 365 days
  • Xbox – 40 unique games on 93 days
  • Switch – 34 unique games on 329 days
  • PS5 – 22 unique games on 82 days
  • tabletop – 10 unique games on 12 days
  • steam – 13 unique games on 15 days
  • AiAi – 19 unique games on 2 days
  • web – 8 unique games on 7 days
  • Tabletop Simulator – 5 unique games on 6 days
  • pc – 5 unique games on 11 days
  • Ludii – 3 unique games on 2 days
  • Quest – 2 unique games on 2 days
  • tvOS – 2 unique games on 1 days
  • Blinks – 2 unique games on 1 days
  • Oculus – 2 unique games on 3 days
  • Itch – 1 game on 1 day
  • Mac – 1 game on 1 day

A few observations:

It’s interesting that no Xbox games made it onto my top 10 games list. I managed to find an Xbox Series X even before I got a PS5, and I definitely played a lot of games on it. I subscribe to Microsoft’s Game Pass, which is fantastic for someone like me who likes to try and sample a lot of different games.

My top played game that was definitely on the Xbox was Astroneer (13 days), which I was playing at the beginning of the year. I also played a bit of Deep Rock Galactic (11 days) with my friend Angela, as well and Path of Exile and Sable tied for 10 days playtime each. I finished Sable, and really enjoyed the experience. I’m surprised it was only 10 days, because I became a bit of a completionist about it, not wanting the experience to end.

It’s also interesting to me that BGA and iOS are kind of both leaders, since I played games on iOS more consistently than BGA. Frankly, I’m rather surprised there were 19 whole days I didn’t play any turns on BGA.

I like calling out Stephen Tavener’s AiAi. 10 of the 19 games in the log were the ones I reviewed for the BEST COMBINATORIAL 2-PLAYER GAME OF 2020 competition, but I know I opened up AiAi more than just a couple of times this year to try out various games I saw show up in his announcement thread. AiAi has become an incredible resource for playing abstract strategy games, and Stephen is able to add them at a simply incredible pace.

I called AiAi the platform when I could have just said I played these games on “PC” or desktop. I did already manually “roll up” a bunch of different ways of saying “web” into that category (as opposed to “browser”, “puzzlescript”, or just a plain URL.) If I add up: Steam, AiAi, pc, Ludii, Itch and Mac, I get 42 games & days, 47 if you include Tabletop Simulator. But that’s not quite right because of course some of those days might have been the same between the different platforms.

I’m pretty convinced I forgot to log some VR plays. There’s no way that I only used my Quest 2 on 3 days last year. I can actually think of 3 days off the top of my head, and I’m sure there were some days I used it in my living room as opposed to getting together with my friend Nate in the park, or the only in-person VR meetup of the year (also outdoors) where we played the new Space Pirate Trainer “Arena Scale”. Still, it’s worth noting that I didn’t use VR very much in 2021.

I was surprised to see that I played 15 different tabletop games across 18 days, so I decided to dig into the data. Turns out, I am deliberately only taking the first word when I parse the data for platform, and I had a bunch of entries where the platform was “tabletop simulator”. I fixed those entries manually and the actual numbers are displayed above. I did play more tabletop games than expected, given how seldom I went anywhere outside of my apartment this year.

Reviews

As mentioned previously, I wrote 38 game reviews, but they were all very short and casual, and several of them (3 to be exact) were second reviews of games I’d already written about before. Those games were Astroneer, which I wrote about twice in January, Ori and the Will O’ the Wisps (in February), and Shapez (in August). Also, it’s worth noting that 10 of those reviews were written over two days for the previously mentioned Best Combinatorial Game of 2020 competition. I can’t really decide if I want to publish these anywhere. They’re written a lot like my goodreads reviews, which is to say that the audience is definitely “future me”, as opposed to “anyone else”. I usually just say something short about what I felt the game was about, as well as anything unique or interesting I observed while playing. And of course I say something about whether I enjoyed the experience.

Wrap-up

I sometimes do wonder if there’s any point to the game log. It feels… kind of narcissistic to keep track of all my game playing. But being able to write this post (and have these introspective insights) definitely feels “worth it” to me, so I have no plan to stop. (And feel a renewed vigor for the project as I write this.)

I’d like to do more releasing of games in 2022, but I’m not going to hold myself to that too strictly. It’s more important that I continue to enjoy creating games as much as I enjoy playing them.

Happy new year everyone!!! Here’s to playing (and making) all the games in 2022!