Feeling Inspired by a Changelog

In what is material for another post, I recently decided to take another class in Django. And, in lesson two of Django for Everybody, I thought “I should start a project to practice on.”

That lead to me thinking it wouldn’t be all that much work to get a barebones version of Governors and Generals going. How hard could it be, right?

Turns out, it’s not super-hard–the literate programming preparation I did really helped–but it’s hard to know where to stop.

Enter the eldest son. He’s been looking over my shoulder as I do these things and I try to always have time to explain what’s going on. Some of his suggestions are our of my league (“there should be a 3D version to download”) but on suggestion changed the way I’ve been working: He said I should put a version number at the bottom.

So, I did. It was simply a matter of altering the footer template. And then I thought: “this could be a link to a changelog page that lists the stuff added. Then, I could look back to see the work I did.”

That was done pretty quickly.

Today is my third day of working on the project and I’ve found it to be quieting to finish the day’s portion of work by writing short, bullet-point entries about what I did that day. It’s nice to think “yeah, I got some stuff done.”

What’s more, starting at version 0.0.1 I’ve decided that version 0.0.2 will be reached when I’ve made something to put on PythonAnywhere and ask people to have a look at it. Initially, it’ll just be the framework on which the game mechanics will be built. Using that, I’ll start putting game mechanics together, though I expect there will only be intermittent days of intense coding after that. (At least until I start learning new stuff and updating the front end.)

Literate Programming

To be clear, I don’t think I’ve written a line of code yet this year, at least, not that was for a legitimate project and not for FreeCodeCamp.org.

Still, I work with people who code and, when I was thinking about the Governors and Generals thing, I asked about how to plan a program. One of my colleagues–fresh out of college–talked about using UML to model stuff. Then, one of the more experienced programmers heard us talking about it and told me to Google Literate Programming.

Short aside on Google suggestions

There was a time when I thought people telling me to Google something were just saying “you’re not worth my time.”

Getting older, I realize they’re saying “you seem to be teaching yourself this stuff, but here’s a concept you may not know to learn about. Have a look.” And I appreciate that.

Now, as a rule, when I have the idea something is possible and I don’t know what to search for (I want to update a website dynamically in a certain way) I tend to ask “do you know what I need to Google to figure this out?” It respects the other person’s time and makes it clear that I’m not looking for them to do the work for me.

So what is it?

The idea is that, before you write a line of code, you write out your program in English. The guy who pointed me towards it said that, eventually, nothing should be a mystery: you just have to translate English into code.

That means that you write “here, the cards in the user’s hand are selected and passed through to the Django template to be displayed,” because that’s something I’m confident I can do in straightforward code without having to figure out how it’s done.

The way he sold it to me was that you construct the entire program in plain English before writing anything, so you know what you need to get done and then you just translate it into code.

I’m giving it a try with Governors and Generals

I like the idea. But then, I can be sold on “literate” anything. Because I’m tired of pandemic stagnation, I’ve decided to kick myself in the butt and get an MVP going.

Now, sitting down and pounding out what needs to get done… I’m realizing that there’s a sense to it and I’m excited to see where it takes me. I would like to get back to being a person who makes things.

Governors and Generals

A resource sharing game

My first foray into programming was because I liked the idea of making a game that would force players into two-player teams with different roles. It would be a sort of mix between StarCraft and SimCity. The idea can be expressed simply–the two players share resources while doing their best to pursue their various roles, both independently and in support of each other–but it quickly becomes complicated.

The players would be either a General, a military leader, tasked with defense and able to secure additional resources by raiding, or a Governor, responsible for development of the civilian infrastructure.

The idea is that each player would have an engaging activity on it’s own which would be made unpredictable and more challenging by the need to both share resources with their teammate and support them. The General would need to provide defense–and could raid other teams or the NPCs for resources–and would be reliant on the Governor to establish food, education, and other infrastructure.

The idea is that there would be insufficient resources to do both optimally and that there would be forced communication and cooperation–as well as frustration–between the two players. It could be both fun and frustrating and the sort of thing that might eventually feel like overcoming a challenge together.

As a card game?

I can’t program it in the form that I imagine it–something of a top-down RTS/city sim. However, realizing that the RR18XX games are a thing, I had the idea that there might be potential to make a slightly nerdier version of the game.

At the moment I’m obsessed with making something that will be purely online with algorithmic mechanics, but involving virtual cards and dice. My idea is that each player would have cards in their hands, but also be able to “play” cards in front of them, visible for the other players to see. The computer would keep track of the resources and perform some of the game mechanics.

Next steps

I guess the next thing to do is to try and map out–perhaps in sketches–the game play for the various roles and to try and see how they would interact, as well as thinking of how the environment would work.