Diary 2019-05-15
So, the good news is, I came up with a bunch of simplifications that enhance correctness and type coverage, though probably not, like, speed. The bad news is, when I was testing them out, I discovered that I somehow broke a completely unrelated code path. I chose to focus on getting the code to work, which in this case meant replacing some math and a library function call with a different library function call.
Now that I've got those changes done, here's some high-priority ones:
- Use the GameMap component
- Make the randomness controllable
- Create a replay format
- See if the replays can be used to work with tests
I'll probably put other stuff above the last one, once I get to it. In part because it'll allow me to do my own version of some of the part 11 stuff. Let's see what that looks like:
- Use the GameMap component
- Add game_map field to the Position component
- Add integer dungeon_level to GameMap
- Create Teleporter component, which has either a target entity, or a callback to create a target entity. (Maybe create TeleporterUp and TeleporterDown?)
- Create Stairs sprites
- Create events for stairs
- Finally do the method-extraction rewrite of the Game class
- Write handlers for stairs actions
- Add stairs to RenderOrder
- Various tweaks to rendering
- Add wait command
There's also level-related stuff, but I want to take care of this half of the part first.
Looking over the remaining tutorial, I believe I can finish things up relatively quickly, do some code polish, and then start figuring out what I want to adapt this code into.