Diary 2019-05-17
I made some good progress today. I finished moving the bulk of the serialization code into the relevant modules, made some much-needed simplifications to the ecs code, consolidated some other code into a relevant module, and then started work on one of the big improvements I've been eager to get to.
Previously, there was a single game map, so it was stored as a de-facto global on the Game object. I'm laying the groundwork for having multiple dungeon floors, and it seems to me that "which map the coordinates apply to" should be an aspect of the position component, which means I need to pull the maps into the ecs. I've done that, and fixed most but not all of the code that needs to change. One of the things that interests me is what comes next, since the Game object won't need to track the map explicitly any more: the active map is just the map referred to by the player's position. This means I get to get rid of a bunch of explicit handling of the game map. It might also mean that some of the "can/cannot walk there" sanity checking might get to move into the "MappedView" component, which, again, reduces explicit handling.
Once this is done, my priorities are getting logging in everywhere and correctly, possibly tweaking some of the processing or output. Then, reworking the usage of random numbers. Then, I can try to put together replay support. After that, I'm going to start looking at the tutorial again.
Well, however much of that happens soon, it happens tomorrow. Good night.