Working on something

I wasn’t planning on talking about this project until I was ready to release it. But I’ve been working on it all day, so it’s top of mind. So this isn’t the official announcement, and who knows if I’ll even finish it, but here’s some background on what I’m working on.

Back when I joined Ctrl-C, I was checking out all the cool small web stuff, both on here or elsewhere. I was soon introduced to the world of Gemini, a simplified alternative to HTTP. Most Gemini sites are static, but one really cool interactive project I found was astrobotany.

Astrobotany is based on the command line game botany, which I haven’t played. You raise a plant by watering it regularly, and you can do other things like visit other users’ plants, collect petals, write on the community message board, and buy badges. I had fun playing it regularly for quite a while.

The second inspiration that drove my idea for a game was iris, a forum software by calamitous, the admin of Ctrl-C. I like iris because it’s rare to find software that really takes advantage of a multi-user system in a fun way. On top of that, it adds a reason to log into the Ctrl-C server regularly and fosters our sense of community. It also feels kind of exclusive because it’s only accessible from the server, not on the general web.

The third thing I had in mind was web rings. I think most people interested in the small web understand the charm of web rings. They make small websites more discoverable, and they make the web feel more lively and interconnected. Since I’m such a big proponent of personal web pages, I’ve thought for a while it would be nice to have something like a web ring on Ctrl-C encouraging visitors to browse around the more actively maintained user pages.

The words サーバーのペッツ in pixel art bubble lettering.
Mock title screen I made for the game

So with all this in mind, I put together an idea for a multiplayer maintenance game like astrobotany, but local to one tilde server. Specifically, I wanted to make a digital pet game, like Tomagotchi. Players run a command in the shell to interact with their pets. The game also provides a snippet of HTML to include on your site that displays the state of your pets.

The kicker is that when your pets are well cared-for, they travel to other users’ profiles, showing up on their HTML snippet. Each pet links back to its owner, and the owner’s profile would link to the users their pets are visiting. So you effectively have a web ring, but it’s somewhat stochastic and based on a user’s participation in the game.

I had this idea three years ago now, and I’ve always wanted to come back and finish it. Early on, I wrote some C code that could handle the transport layer. I released that separately as localserv.

I decided pretty early on I didn’t want to write the game code in C. I found out Deno had a nice setup for calling C, so I put together some glue code and tried writing the core logic in Typescript. But I got kind of bogged down in the whole client-server application layer, and eventually I got tired of it and abandoned the project for a while.

Recently, I decided to try writing the project again in Zig. I’ve had situations where I’ve gotten bogged down writing Zig programs before too, so I’m not exactly sure why I thought that was a good idea. But I keep wanting to come back to it, so here we are.

Fortunately, my approach to coding has changed since I last attempted this project. I used to get stuck on trying to write really good abstractions when I coded. Zig encourages you to write less abstractly and instead deal more directly with what you want the program to do. There are still ways to avoid repeating yourself, but sometimes they might not be as pretty as other languages. But I think the code ends up being more intelligible because it’s usually straightforward.

So, no word on when this will come out or whether I’ll just get bogged down and abandon it again, but I’d really love to finish it this time. As a final word, I will say: in an ideal world, I’d love for the game to feature really cute pet sprites in a Game Boy Color pixel art style (maybe somewhat like this), inspired by my memories of playing the Tamagotchi Game Boy game. But that would be a whole other effort on top of all this code.

Let me know your thoughts at my Ctrl-C email: gome ​@ ​ctrl-c.club.