From ab80137c149b1107ccd34904049649ce586a80f0 Mon Sep 17 00:00:00 2001 From: Eric Hebert Date: Mon, 16 Apr 2018 20:15:15 -0400 Subject: [PATCH 1/2] Updated documentation to be less misleading about time complexities --- README.md | 16 ++++++++++------ docs/index.html | 20 ++++++++++++++------ docs/index.json | 2 +- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 19c51af..2ff0bd4 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,19 @@ This entity system is designed to be as simple as possible, while still having u ### Features -* High performance, memoized entity queries - * O(1) average time -* All definitions are optional +* **High performance indexing options** + * SimpleIndex (Default): O(1) component add/remove, O(m) query time + * Where `m` is the smallest size component index + * MemoizedQueryIndex: O(q) component add/remove, O(1) average query time (memoized), O(n) worst query time (initial) + * Where `q` is the total number of memoized queries + * *Note: Above time complexities are amortized assuming the number of components used is a known constant* +* **No formal declarations required** * Can create components and entities in a world and query on them, without needing to define structured systems and components -* Strings as component keys +* **Strings as component keys** * No need to manually track component keys like many libraries -* JSON serialization +* **JSON serialization** * Useful for save data and networked applications -* Prototypes +* **Prototypes** * Allows entity definitions to be data-driven, outside of code ### Terminology diff --git a/docs/index.html b/docs/index.html index 220da61..64f948b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -57,23 +57,31 @@

About

Pico Entity System for JavaScript (ES6+).

Read up on what an ECS is here: https://en.wikipedia.org/wiki/Entity_component_system

This entity system is designed to be as simple as possible, while still having useful features.

Features