Skip to content
Johnny edited this page Mar 21, 2022 · 117 revisions

Devlog

Examining prototype, game data structures | March 20

I was thinking maybe I should redo how the prototypes are structured, so I made some graphs. It turns out the prototypes and its data are actually arranged very nicely - for reference a prototype exists for each type, i.e., each level of assembly machine, each sprite, and a data is allocated for each prototype placed.

Prototype inheritance graph

Data inheritance graph

I am not happy with the data structures used to store conveyors and inserters to be updated. Conveyor data is currently stored per chunk, limiting maximum length of conveyor groups to 32 and making the logic for placement and removal more complex accounting for chunks. It would be better off being stored in a global table since it has to iterate through all of them anyways to update them, though it presents challenges on rendering the conveyors.

Conveyor placement

Conveyor removal

For fun, here are some scary graphs of project dependencies for the tile renderer and a commonly used header:

Include hierarchy of tile renderer

Include hierarchy of commonly used header

Clone this wiki locally