Diary 2019-05-03
Hm. Yes. Wow. I think I will try to avoid that in future. I had an adverse reaction to medication, but I believe it's worn off by now. I was still exhausted all day.
That said, I was able to plug away at the tutorial, currently midway through part 8. I don't feel like I have anything specific to say about where I'm at. I mean, I'm still rewriting stuff on the fly because the idea of using the code as presented offends me. And there are some decisions I've made that I know aren't quite right. And I haven't written tests. I feel like that should come after I've broken the biggest function in the game into separate things. Looking ahead in the tutorial, I think I'll finish part 9, and then, once again, go really off-the-rails for part 10.
Thoughts on tests... The rendering functions look like excellent candidates for mocks.
Thoughts on serialization (the subject of part 10)... I implemented inventories somewhat differently this time, and I kind of have to decide if I want to change my mind, or otherwise really commit to the particular way I'm doing ECS. Or maybe I just need to have a post-processing step following deserialization. Or... Hm. I think what I want is to have a registry of components. That can be added to the unique objects, and serialized. Move the "components" dict out of the entities, move the entity list into the registry, use WeakKeyDictionaries... I'd say this idea is shaping up well, and I'll give it a go after part 9.
For now, I've been trying way too hard, and I think I'm not all the way to recovered. I should stop. Good night.