data-oriented-pyglet
data-oriented-pyglet copied to clipboard
Accessor generation
for an OOP interface when you want it (ie, the hero of the game should have components and be subect to systems, but also it should be convinient to check their health and update their velocity individually)
def generate_accessor(guid): '''returns an Accessorinstance that has properties that are actually pointers to the slices of components related to this guid'''
checkout accessors.py back in commit b6e467890bb9e74730934703a97b4f3372d84b82
That was working but much has changed since then. Basic idea is the same