Friday, August 14, 2020

I Made A Thing

I started a little hobby project that turned into a midsized hobby project, and now it's done! Probably!

Lexencrypt is a word jumble, kind of. The letters in the grid constantly shift and cycle, and the initial impression is probably a bit disorienting. But as time progresses, a pattern eventually emerges, and the hidden word will begin to reveal itself. Find the word, type it in, and advance to the next board.

Or something like that! I've had a hard time describing the game when I write the summaries for the app stores, which is always a great sign. Personally I find the experience of playing it a little like solving one of those "magic eye" pictures, where it can help to relax and unfocus your eyes. Or you can take a more methodical approach, sweeping your eyes across row by row until you find a string of letters that form a word.

I slapped together a bare-bones version of the game for my birthday party earlier this summer, and have just pushed out the first update, which turns it into more of a proper game. It now has simple sound effects, tracks your game stats, and, most importantly, saves your game as you progress. There are some new surprises to find for people who make it deep enough inside.

Lexencrypt is available for free on Google Play and the App Store! Below, some typical ramblings on how I got here.

The origin of Lexencrypt was the title screen for a game called "Something Strange" that I wrote back in high school. That was a QBasic game, and like almost all of my games of that era it was a text adventure. I wanted to do something fun for the title screen, though, so I made a little text thing that would randomly fill the screen with letters, constantly cycling between them; but when a letter in the right position randomly rotated to the right character, it would turn white and freeze in place. So you would be left with the words "SOMETHING STRANGE" standing still in the center of the screen, while all around it the alphabet roiled and pulsed.

Many years later, when I was first learning Android development, I whipped up a game called "Nonsense" based around the same concept. I would pull a random word from the dictionary, pick a random place on the screen to place it, and then start flipping characters. Over time the tiles would land on the right letter, and you would then type it in to win. I added a sense of progression to it; I forget now what all I did, but I think I started using different colors or something, and would also start playing music (from MediaStore!) once you got deep enough.

The first physical Android device was the G1, which was a terrible device to develop for: it had a touchscreen and a trackball and a slide-out keyboard. But Nonsense was, I think, pretty fun to play on that phone; the keyboard made it feel natural to tap out the answer once you found it.

This would have been back in... 2008 or 2009, maybe? I'd completely forgotten about it until a friend recently reminded me of it back in the spring, so it's one of the things that I thought of when pulling things together for my birthday party.

I decided to use the game as an excuse to learn Flutter, a newish development platform. I'm generally highly skeptical of "write once run everywhere" systems, but in this particular case it made a lot of sense: my party guests were a mix of Android and iPhone folks, and while I could have taken the opportunity to finally learn Swift, I instead opted to pick up Dart (my micro-review: I would like it a lot more if I didn't already know Kotlin) and add the possibility of making a web app version.

Like most times I've learned a new platform, I started off with the sample app and then just kept adding things and changing stuff. I'm sure that my code style is garbage, and I wouldn't ever use it as a showcase, but it is a lot of fun and feels gratifying to just hack around and make something new.

While working on it, I mercilessly cut out all features that didn't feel absolutely essential to my core delivery for the party: multiple boards to advance, and eventually launching a new URL to continue the scavenger hunt. Even with that minimal portfolio, it took a ridiculous amount of time to make. I kept a list of things that I wanted to do if I ever wanted to polish this up.

It was pretty interesting to think about all the differences between this app and the much older one. A surprising difference is that this one feels slower, despite today's chips being significantly more powerful than in 2008. Part of that might be the Flutter runtime, part might be the significantly larger screen resolutions pushing more pixels. I might have been drawing on a raw Canvas back in 2008 but I honestly can't remember. Anyways, I got it to a point that I was pretty happy with, using some tricks that I almost definitely wasn't using over a decade ago.

Releasing the app was pretty fun, and went a heck of a lot smoother than I expected. I'd heard horror stories about the Apple app review process, but it wasn't too bad at all for me. I did get held up pretty early on by a request for a video demonstrating how my app was used; that definitely makes sense, as it's (somewhat intentionally) kind of disorienting when you first open it. I used the built-in iPhone screen recorder to make a movie of using the app, with the microphone turned on to capture my voice talking through what it was doing, then uploaded that to an unlisted YouTube video and included a link in my Test Flight submission. Once that was in, I was approved for beta testing in less than a day, and once I applied for release to the app store, I think it took less than 12 hours.

Google Play is, as always, a different beast, run by implacable robots instead of humans. This submission actually took quite a bit longer than before; back in the day Google was (in)famous for being the Wild West and letting any random app up, but these days they run tons of automated tests and malware scans and stuff. It's still just a couple of hours, though.

After taking a break to digest all the sausage and cake I ate on my birthday, I've been continuing to work on the game over nights and weekends, running down that list of deferred features from before. I'm getting (slightly) better at grokking the Flutter-y way of doing things and can phrase my Google searches more effectively, which has significantly sped up my progress.

There's still more that I could do, of course - there are an infinite number of Ideas in the world - but I'm pretty satisfied with where things are at now: simplicity can be good, and there's a nice variety of things happening up through level 50, which feels like enough to keep people busy for a good while. This seems like a good stopping point for development, barring any bugs or other unexpected events.

This was a fun little one-off experiment, a far cry from both my usual personal game projects and my usual professional app projects. I doubt I'll do much like this in the future, but it was good to stretch some muscles that I haven't used in a while and make a thing. And, heck, maybe I'll revisit this concept again in 2032 and make yet another version!

No comments:

Post a Comment