Homunculus Devlog 2018-04-21

By Max Woerner Chase

In this post:


Before I mess with the code, I want to document all of the responsibilities it has.

The code is accessed through a console entry point. The main function:

The play_game function:

The way I want to cope with this is to turn the collection of variables that represent the game state into a cohesive object, and have the game loop coordinate between different methods:

Ideally later, the details of rendering get pulled out into another function, and the event loop then pipelines messages into abstract render events, then yields render events to a concrete render process. So at a high level, the loop would go: apply render events, render with the renderer, populate render events from the game logic.


Next week, I try to execute on the above plan. Also, I should look at the rest of the code, but the main() function is distractingly huge.