anaselmi / Puzzler

Roguelike
1 stars 0 forks source link

figure out ecs #24

Open anaselmi opened 6 years ago

anaselmi commented 6 years ago

reduce spaghetti code and optimize code by passing component references instead of entities, split processes along logical lines, and possibly splitting some components

anaselmi commented 6 years ago

Add original events system and decouple game wide processors and processors that act on individual entities. Also consider treating messages almost like entities. And store them in different filo priority stacks divided my event type.

anaselmi commented 6 years ago

Use a two dimensional array of strings to codify possible event status. Different children classes can implement this property in different ways. Getter could simply store index and return value

anaselmi commented 6 years ago

Event queue should not be able to manipulate events

anaselmi commented 6 years ago

Probe should accept a type and try and access a dictionary of type names abd return priority returning None if an indexerror is raised

anaselmi commented 6 years ago

Just use a lot of processors and temporary components. Processors that are responsible for creating temporary components must delete them. As long as special care is taken in ordering processors, and cleaning temporary components, almost all features can be implemented within the current Esper system.

anaselmi commented 6 years ago

Worth considering having multiple World instances with custom processors that are called depending on state/context. Examples could include an A.I World and a GameState world.

anaselmi commented 6 years ago

Development should begin after porting Puzzler to Python 3.7, as dataclasses are very useful for writing components.