Homunculus - Rewriting 2018-07-13

By Max Woerner Chase

In this post:

To start with, I focused on redoing entities. I drew up the following list of entities defined in the code:

(Wait for it...)

The big concern I have with this rewrite is factoring game definition stuff out of the serialized data. For example, suppose I decided to change the color of the orcs. (Work with me here.) I'm currently writing the color data into the save file, which means that only newly-generated orcs would get the new color.

I wrote up the basic issues or lack thereof with each serializer, and found that the following needed to change:

(Wait for it...)

Because I'm too lazy to write code to reverse-engineer templates from instantiated values, I just added some failing assertions to the save and load paths, and deleted the current data.

Next, I wasn't really sure where in the project these "templates" should live, so I made a new file in my text editor. Making templates for the Fighter component wasn't hard. But then... Then I got to work on Entity templates, and... (There it is.) There's an entity missing from the list above. Three, nearly-identical entities, in fact. Every entity with a Fighter component can convert into a "corpse" form. The quick, easy, and relatively supported way to handle this would be to have some kind of flag on the entity that mediates access to its template. The thing I want to do is to get Structured Data working, so I can include it in this project and use it all over the place.

So, I had a look at getting Structured Data to work with Python 3.7. Getting Appveyor and Travis working was simple. Unfortunately, it turns out you can't make ReadTheDocs build with Python 3.7 currently, so my online docs went from "Built wrong but 'passing'" to "Totally broken on RTD, but at least it's honest about it." I can't figure out where to look for a roadmap on "building with 3.7 on RTD", so I have no idea when that'll work. But everything else works, so I'll just press on and focus on my local copy.

I think I'd like to iterate on Structured Data for a bit, get something worthy of another release. It also needs proper documentation, even if it's annoying to try to read, currently.

Next time, stuff from Structured Data's change log, I guess.

Note from writing this post: my reStructuredText theme, which is not interestingly different from the one in Sublime's GitHub, doesn't seem to detect italics inside parentheses. Need to figure out what's up with that.