dmlary / morrow

Ruby ECS-based MUD server
MIT License
4 stars 1 forks source link

WIP: System rewrite/Entity subscription #3

Closed dmlary closed 4 years ago

dmlary commented 4 years ago

We have a performance problem with World.update() when there are hundreds of thousands of entities. We need to improve the performance for individual systems, and generally establish how we're going to call systems.

Types of Entities & Components

API

# SpawnSystem needs SpawnPoints, but not those that are templates
SpawnSystem.update(registry[SpawnPointComponent])
ConnectionSystem.update(registry[ConnectionComponent])

Open questions

Entity grouping options

Per-Component Arrays

Update Options

Static updates

World.update() explicitly calls each System update method. This makes it easier to manage the component/entty

Dynamic

dmlary commented 4 years ago

Resolved with new EntityView implementation.