Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better query syntax, observers, performance improvements #101

Merged
merged 51 commits into from
May 31, 2024
Merged

Conversation

0ffz
Copy link
Member

@0ffz 0ffz commented Mar 17, 2024

TODO

  • Have up to 5 type parameters for shorthand queries (add this for observer builder too)
  • Nullable type parameters in shorthands
  • Be consistent with serializable sealed classes, check if they do work or not?
  • Be consistent with this or it parameter for query operations, some currently use both for backwards compat but this is quite odd.
  • Update readme

0ffz added 30 commits March 12, 2024 20:19
- Add syntax for declaring repeating systems
… default name extracted from the creator function

Fix: Autoscanning methods not working
chore: Clear out some unused classes, suppress some IDE warnings where needed
chore: Clean out some more empty classes or small missed things since main branch
…yOf (#102)

perf: Use array implementation of CompId2ArchetypeMap, avoid null boxing using getOrElse
perf: Fully remove Record references (unnecessary memory allocs)
perf: Use BucketedULongArray to avoid array.copyOf when in ArrayTypeMap, useful when creating many entities at once
… modifications when calling multiple listeners
fix: Error when instantiating prefab that gets modified as it's being created
test: Add test for a component set listener running while an entity instantiates
test: Add tests for component removal event
…sing function signatures without default values back for now
chore: Use inner serializer for InheritPrefabs
fix: not resetting delegated status in forEach call, resulting in incorrect entities returned in queries.
0ffz added 18 commits March 30, 2024 18:22
…tPrefabs component instead.

We also now use a query to determine what prefabs need to be inherited, so these instances will be included too!
chore: Move PolymorphicListAsMapSerializer vars into a Config glass
refactor: Move YamlFileProperties out of YamlFormat, abstract away some logic to let it work with any format
feat: Add deepInstanceOf, collectPrefabs functions on Entity for getting info about the full entity inheritance chain
chore: Move namespaces reading to PolymorphicListAsMapSerializer.Config, make some helper functions for providing the config
tests: Add benchmarks for getting KType and KClass from a reified type to compare componentId overhead
* chore: Cleanup build.gradle js target, add relevant todo

* feat: Revamp event listener system to use flecs-style observer pattern

* refactor: Tidy up syntax for observers
refactor: Reorganize and clean up observer tests

* refactor: Remove support for delegating component accessors when using unsafeEntity

* perf: Run forEach directly in ArchetypeEventRunner

* perf: Memory allocation improvements for observers
refactor: Remove no longer needed code from family

* refactor: Remove commented out code and some unnecessary class inheritance with accessors

* refactor: Fix some IDE inspection issues, removing more unused code

* refactor: Replace some manually created datatypes with androidx-collection
feat: Add cacheGroupedBy query
fix: Don't double count entities in cacheGrouped/AssociatedBy by observing correct events, and limiting to involved components
fix: OnRemove not firing when entity removed
feat(prefabs): Defining entity observers via config
…, not inheriting observers to instances when created before tracking observer

tests(observers): Add entity scoped observer tests
tests(prefabs): Add test for EntityObservers component in config
refactor: Rename CachedQueryRunner -> CachedQuery
@0ffz 0ffz changed the title Better query syntax, performance improvements Better query syntax, observers, performance improvements May 30, 2024
0ffz added 3 commits May 30, 2024 22:32
chore: Add shorthand queries up to size 5
chore: Add family filter to any size query
feat: Nullable types in shorthand queries
…t queries

perf: Avoid going through delegate entirely in shorthand queries
feat: Add some helper init phase blocks in GearyConfiguration
@0ffz 0ffz merged commit 6171681 into master May 31, 2024
2 checks passed
@0ffz 0ffz deleted the develop branch May 31, 2024 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant