Skip to content

Releases: ayebear/picoes

PicoES v1.1.1

23 Feb 04:24
Compare
Choose a tag to compare

Added entity key to entity data object, to allow a more consistent each() syntax:
world.each('comp', ({ comp }, entity) => { entity.remove(comp) })
now becomes:
world.each('comp', ({ entity, comp }) => { entity.remove(comp) })
Internally, a reference to the parent entity is inside entity.data, so you cannot have components named 'entity' anymore.

PicoES v1.1.0

11 May 00:33
a1ec2eb
Compare
Choose a tag to compare
  • Improved world.each() performance by skipping first entity in component has() checks.
  • Updated package versions
  • Migrated travis CI to github actions
  • Updated internal documentation to reach 100% documentation coverage

PicoES v1.1.0-rc0

19 Oct 04:58
145a5eb
Compare
Choose a tag to compare
PicoES v1.1.0-rc0 Pre-release
Pre-release

Updated World interface

  • Removed context() method, replaced with context getter/setter (replaces)
  • Added systems getter/setter (merges)
  • Added components getter/setter (merges)

PicoES v1.0.0

12 Apr 06:26
Compare
Choose a tag to compare

After many design iterations, PicoES 1.0.0 is finally here!

  • Further performance optimizations
    • Improved performance of Entity methods remove and destroy
    • Improved performance of internal index management, which affects many operations
    • Improved performance of each query performance by sorting component names based on index size, to help reduce the average time of short-circuiting if an entity has all the components in the query.
  • Removed components getter from Entity (for getting list of current component keys)
  • Updated documentation and README
  • Continued 100% test code coverage

PicoES v1.0.0-alpha8

11 Apr 07:09
Compare
Choose a tag to compare
PicoES v1.0.0-alpha8 Pre-release
Pre-release
  • An additional 1-3x performance boost all around
    • This is mostly from the has() changes affecting query performance
    • Also from simpler set() logic
  • Cleaned up Entity interface
    • New has() with single-key check. This is a breaking change.
      • This decision was made based on performance, as well as very low usage of has[Any/All] in production.
      • It is more typical to combine .has() checks with &&, ||, and ! operators
      • In the few cases of libraries - like PicoES itself, or something like an EntitySet in a real project - a simple .some() or .every() call will still work great for whichever custom case you need.
    • Removed methods (setRaw, setWithFallback, hasAny, has[All], and removeAll)
    • Made some methods private (cloneComponentTo, removeAll - moved to destroy)
    • Added new replace based on old setRaw
  • Cleaned up tests (removed assert)
  • Updated documentation, fixed args, and updated examples

PicoES v1.0.0-alpha7

10 Apr 07:28
00a41ca
Compare
Choose a tag to compare
PicoES v1.0.0-alpha7 Pre-release
Pre-release
  • ~3x query performance boost
    • This was achieved by using callbacks instead of yield which seems to be very slow
  • World initialization
    • Added new options object to World constructor, to register systems, components, and context all at once
  • Simplified system context
    • Now just one object
    • Can simulate old keyed context by passing an object with one key
  • Big code refactor
    • Removed indexers, but preserved concept of SimpleIndex. The memoized one was very slow in real world cases, and the interface was limiting for other types of performance improvements, while adding unnecessary complexity.
    • Split World code into SystemStorage and EntityStorage
    • More standard test code with regular jest callbacks, some more uses of expect instead of assert.
    • Deleted lots of old, unused methods throughout the code, such as prototypes, and redundant entity methods
    • Updated to use new import/export module syntax
    • Moved tests into separate directory, and made use of "files" array in package.json to shrink installed bundle size significantly.
    • Setup prettier for automated formatting

This covers fixing part of #43 , but there are still many potential improvements to make.

PicoES v1.0.0-alpha4

04 Feb 04:46
Compare
Choose a tag to compare
PicoES v1.0.0-alpha4 Pre-release
Pre-release
  • Added hasAny() to Entity

PicoES v1.0.0-alpha3

05 Nov 10:50
3bd7f1f
Compare
Choose a tag to compare
PicoES v1.0.0-alpha3 Pre-release
Pre-release
  • Added entity and component cloning support
    • Custom implementations of cloneArgs() and/or clone() can be provided for each registered component.
    • Fallback implementation of a simple shallow clone will be used in other cases
  • Default component values now get set to first argument, or undefined
  • Added a setWithFallback() to have some more control over how unregistered components get set
  • Additional tests and code cleanup

PicoES v1.0.0-alpha2

14 Oct 05:36
Compare
Choose a tag to compare
PicoES v1.0.0-alpha2 Pre-release
Pre-release

Fixed issue where context was unavailable in system constructors, by adding an init() method to systems. This gets called automatically when registering systems, which works differently than initialize() did in the past.

PicoES v1.0.0-alpha1

13 Oct 09:07
2afae6d
Compare
Choose a tag to compare
PicoES v1.0.0-alpha1 Pre-release
Pre-release

This is the first alpha release of PicoES v1.0.0. While it has 100% test coverage, it has not been thoroughly tested or integrated into a large project yet.

  • Major system interface cleanup
    • Removed initialize(), pre(), every(), post() from systems
    • Added run() to systems
    • System creation is now much simpler without components
  • Added new world.each() with simpler and more powerful query syntax
    • Queries can be mixed with arrays/strings for some backwards compatibility, and to support more developer preferences
    • Callback uses destructuring syntax from raw entity data
      • This has improved performance, over the previous version with a bunch of internal map() and get() calls
      • This helps prevent passing the wrong components to the wrong parameters. It doesn't require specifying unused components, and it allows getting optional components that weren't part of the query.
  • Added automatic dependency injection
    • Systems can use world.context() with keys or keyless
    • Registered components now get their parent entity injected