Commit graph

107 commits

Author SHA1 Message Date
Ukendio
1dd108401f Merge Archetype with its node interface 2024-11-22 23:06:17 +01:00
Ukendio
5de3f7dd15 Remove typeof 2024-11-16 18:07:12 +01:00
metrowaii
03389e5189
Removed redundant guard (#157) 2024-11-15 06:29:13 +01:00
Ukendio
9066611373 Fix ECS_GENERATION_INC 2024-11-14 03:39:46 +01:00
Ukendio
b40af9fe9d Fix generation increment overflowing id 2024-11-14 03:38:27 +01:00
Marcus
303bd4ed16
Entity recycling (#156)
* Merge

* Initial commit

* Fix indentations

* Remove sparse_count

* Add whiteline

* return 0 instead

* Add check for friend existing

* Force inlining

* Manual inlining
2024-11-13 20:05:01 +01:00
Christopher Buss
0eb288e057
style: fix inconsistent project formatting (#144)
Closes #138
2024-10-12 22:18:11 +02:00
Ukendio
f82318c642 Merge to main branch 2024-10-12 22:06:31 +02:00
Ukendio
d4be55ead0 Add tests for hooks 2024-10-12 22:01:08 +02:00
Marcus
c5e20aaf50
Reuse archetype_delete on world:clear (#141)
* Reuse archetype_delete on world:clear

* Add tests
2024-10-12 21:55:24 +02:00
Marcus
c80bb0e2fd
Add tests for archetypes (#139)
* Add stylua

* Align HI_COMPONENT_ID
2024-10-06 03:36:36 +02:00
Marcus
c288a5fab5
Remove drain and next (#136) 2024-10-04 23:55:22 +02:00
Ukendio
ca3cc06400 Traverse refs for deletion 2024-10-01 17:30:51 +02:00
EncodedVenom
16e8055983
Allow nil indexing in world:target (#131)
* Allow nil index in world:target

* Fix the fun type at the bottom

* Update tests
2024-09-23 14:29:53 +02:00
Ukendio
5d6c2e8d42 Fix unit tests and debug mode to enforce OnRemove rules 2024-09-21 20:53:12 +02:00
Marcus
b3da0745bc
Fix cycles (#129) 2024-09-20 21:58:18 +02:00
Marcus
2ed869ba93
Archetype deletion (#126)
* initial commit

* cleanup edges

* rename ptr to edge
2024-09-20 21:29:50 +02:00
Marcus
bd187e69ad
Call entity_move before invoke_hook (#124) 2024-09-17 16:39:28 +02:00
alicesaidhi
2b1122e073
Implement testkit FOCUS() (#87)
* add focus to testkit

* show amount of focus cases passed
2024-09-17 03:18:52 +02:00
Marcus
62ac6e62c0
Iter should not drain by default (#123) 2024-09-16 21:33:12 +02:00
Marcus
244d799cec
Add nth parameter to world:target (#116)
* Add nth parameter to world:target

* Put archetype record creation into function

* Fix docs and comments
2024-09-10 23:56:42 +02:00
Ukendio
8c28cab792 Add tests for hooks cache 2024-09-09 03:22:55 +02:00
Marcus
c37bc3c440
Add EcsOnDelete support (#111)
* Add EcsOnDelete support

* Shrink mask

* Add indentation for flags

* Rename page

* Add page to items

* IDs should be plural

* Polish changelog

* Cleanup action Remove is default
2024-08-30 19:19:20 +02:00
Marcus
3dd0bd30cd
Add EcsTag (#108)
* Add EcsTag

* Add tests
2024-08-28 19:26:57 +02:00
Marcus
f220b95d2f
Add scheduler to demo (#106)
* Add example to make scheduler with phases

* Add more builtin phases
2024-08-21 17:57:40 +02:00
Ukendio
012779eb08 Remove dead code in Scheduler example 2024-08-21 02:15:10 +02:00
Ukendio
ecdbe2d8ed Add tests for scheduler example 2024-08-21 01:59:25 +02:00
Marcus
4e5a40f75b
Fix hooks not notifying (#103)
* Fix world_has_any checking for inverse statement

* invoke onAdd for set
2024-08-17 01:10:35 +02:00
Marcus
6d45af93f0
Add OnDeleteTarget (#102) 2024-08-16 19:13:30 +02:00
Ukendio
33f359a150 Handle cycles in deletion 2024-08-14 01:15:04 +02:00
Ukendio
8dd53b8c2a optimize deletion 2024-08-13 20:58:07 +02:00
Ukendio
735eb01526 Initial commit 2024-08-13 20:08:58 +02:00
Ukendio
3175d5e94c Add back multret ;C 2024-08-11 15:03:05 +02:00
Ukendio
7c6184daae OnRemove invoked before remove 2024-08-11 04:19:42 +02:00
Ukendio
b57239fac2 optimize hook calls and add tests 2024-08-11 04:03:18 +02:00
Marcus
e6983a3356
Remove multret (#99)
* Initial commit

* Move functions for get and has

* Update docs
2024-08-11 03:27:29 +02:00
Ukendio
a2dedf128a Change pair function names 2024-08-10 04:55:04 +02:00
Marcus
a9f449b3fb
Example (#93)
* Initial commit

* Return static function

* Fix upvalues conflict

* Add examples to luau

* rename example folder

* Add queries example

* Add changetracking example

* Add wildcards example

* Delete example.project.json
2024-08-03 05:48:48 +02:00
Ukendio
6b465d1ed1 Change param 2024-08-02 22:24:05 +02:00
Ukendio
ce1ec63304 Fix regression with multiple change trackers 2024-08-01 20:02:57 +02:00
Ukendio
7476952f89 Specialize iterator 2024-07-31 18:48:34 +02:00
Marcus
51ed9e2173
Add pages to docs (#92)
* Explicit error for query:next

* Add drain to docs

* Fix next call

* Add relationships page
2024-07-31 02:43:24 +02:00
Ukendio
24f9f5868b Add test for querying more than 8 components 2024-07-30 20:58:48 +02:00
Ukendio
023e7ace5b Save column indexing 2024-07-30 19:36:53 +02:00
Ukendio
e9d2154988 Query Rework 2024-07-30 17:17:18 +02:00
Ukendio
0f7cb78a59 Unit tests 2024-07-30 01:11:22 +02:00
Ukendio
b79bbb5bfa Change variable names 2024-07-28 21:02:05 +02:00
Ukendio
5fd7e19a30 Fix type of ChangeTracker 2024-07-28 14:27:52 +02:00
Ukendio
ab3023b57b Put world back to constructor 2024-07-28 14:23:29 +02:00
Ukendio
d5de1ad425 Self contained changetracker 2024-07-28 14:17:44 +02:00
Ukendio
1844b0cfd8 Amend test 2024-07-26 04:45:07 +02:00
Ukendio
059a3f9bed Fix world:remove 2024-07-26 04:36:30 +02:00
Marcus
0f8f9348f5
Fix column pointers invalidated by upvalues (#88)
* Initial commit

* Add types to world:has()
2024-07-26 02:55:36 +02:00
Marcus
76d1ff91c0
Add has function (#85) 2024-07-23 04:44:56 +02:00
Ukendio
459e670ce9 Change casing 2024-07-15 20:29:06 +02:00
Ukendio
85a970e9ff Less memory footprint 2024-07-14 05:38:44 +02:00
Marcus
134c41014c
Rework tests (#78)
* Return empty query when Without removes all archetypes

* Type replace callback as Any

* Add test with ChangeTracker

* Rename tests files

* Fix indentation

* Change CI
2024-07-14 02:45:49 +02:00