Update 'Step 0: ECS Architecture'

master
sadpmpk 2022-12-30 04:30:02 -05:00
parent f207e1c83f
commit 0a3198317c
1 changed files with 3 additions and 1 deletions

@ -74,3 +74,5 @@ typedef struct MemPool
``` ```
The first three fields are generic fields about the memory pool. The `use_list` and the `free_list` are used to keep track of which elements are free and in use. The first three fields are generic fields about the memory pool. The `use_list` and the `free_list` are used to keep track of which elements are free and in use.
A queue is used for the free list so that each element can be used evenly. A boolean array is used to keep track of whether an element is in use. It's a bit easier on the mind doing this way although it is not as memory efficient. A queue is used for the free list so that each element can be used evenly. A boolean array is used to keep track of whether an element is in use. It's a bit easier on the mind doing this way although it is not as memory efficient.
For this implementation, the buffer is _statically allocated_. This imposes a **hard limit** on the number of entities and components in the game.