Commit graph

35 commits

Author SHA1 Message Date
bbb8144f34 -fixed DMD release compilation 2021-04-26 17:04:39 +02:00
24ef63d505 -added '-pthread' to arguments in 'meson.build' for GDC 2021-03-24 19:29:04 +01:00
70a5388820 -move code from templates to ECS side:
*sendEvent - using EventRef (alias to ComponentRef)
 *ListenerCallData now contain entities count and pointer to EntityInfo
 *Remove system_pointer from SystemCallData (use context instead)
 *Register event
-Now all BECS functinality can be used without templates
-clean code
2021-03-24 18:35:03 +01:00
0d08b8532a -remove "SIMD" option from "compile_wasm.py" (new Emscripten hasn't that option)
-removed some unnecessary variables
-started C-API implemantation:
 * added C-API option to Meson (build included to main library)
 * refactored some code (moved some code form templates to final code, removed delegates from system)
 * moved templates outside EntityManager to make it possible to use in different functions
2021-03-18 19:56:25 +01:00
fa0c196c60 -code cleanup
-some documentation improvements
-README update
2021-03-06 22:02:49 +01:00
3b954b732b -update README code example (to one that compile)
-remove Entity.instance and gEM, global manager is now gEntityManager
2021-03-02 19:44:18 +01:00
8b2793fc57 Merge branch 'master' of https://gitlab.com/Mergul/bubel-ecs.git into remove_structure_top_mixin
# Conflicts:
#	tests/basic.d
2021-02-27 17:30:31 +01:00
a6d92cb21b -change ecsID to becsID
-change component_id/system_id to becsID in demos
2021-02-27 17:25:13 +01:00
3c1c67efd0 -added filterEntity callback (used to filter EntityInfos for system, better control than simply @optional)
-removed some redundant code (two times same code)
-added some common functions
2021-01-03 13:05:48 +01:00
a926b79223 -add ecsID template function (get Component/System/Event ID, passes tests)
-removed some ECS mixins code
2020-09-29 18:41:31 +02:00
13c82acad4 -removed some unused code 2020-09-25 10:50:11 +02:00
8960423935 ECS fixes
-fixed bug with addEntityCopy (on create was called for bad entity, and incorrect block was added to update)
-added function to retrieve Component pointer from Entity (not  template function)
-fixed thread_pool bug
2020-08-22 11:37:23 +02:00
96bbcb9956 Fixed issues and bugs
-moved system destroy functionality to System structure "destroy()" function
-now arrays are properly destroyed (with destructor calling (__xdtor))
-fixed bug which makes BlockAllocator crashing after freeing it's memory
-fixed many smaller memory leaks
2020-07-17 13:34:08 +02:00
a0efa4e67d Fixed unittests and betterC compilation (after adding fullyQualifiedName instead of simple stringof)
-added new trait to get full name of structure (witho module and package, not tested on more nested packages)
-some small improvements (like adding const to function which need it)
2020-07-08 22:04:13 +02:00
ef4faf2755 Changed Components/System/Events names to full name (with module) and fixed bug with flag 2020-07-01 19:26:47 +02:00
ffc19d4723 Better multithread jobs generation tests 2020-06-15 22:28:55 +02:00
3e7575c4b2 Bug fixes
-fix: UnittestRunner don't catch RangeError
-fix: sometimes onUpdate was called with empty array of entities
2020-06-15 17:21:29 +02:00
8cba2626be Added entity filering support and fixed minor bug 2020-06-10 15:35:42 +02:00
13e6ed8fd5 ECS core imprevement
-Adedd function to resize array to Mallocator
-significant speed up for first time ID allocation by using resizeArray instead of makeArray
-fix: onUpdate called with zero length arrays
-call updateBlocks before updateEvents (it's more accurate behaviour)
-some minore fixes
-fixed meson.build for GDC
2020-06-06 22:26:59 +02:00
66860b9042 Android update and small improvements
-fixed code do cross compiling to android
-fixed build with GCC (workaround)
-added little benchmark
-several small fixes
-updated meson build (demos building, working with GCC, LDC and DMD)
-added some meson options
-added ImGUI bind for OpenGL3
2020-06-01 11:24:50 +02:00
7a0ddf7494 Bugfix update
-fixed critical bug with adding entities
-fixed small bug with adding entity with replacement components which entity hasn't
-added multiple asserts to faster bug detection in future
2020-05-28 15:53:05 +02:00
3719cdaee0 Some small fixes 2020-05-28 09:39:17 +02:00
f964d7bf85 Added more tests
-added Vector test
-added HashMap test
-added EntityMeta test
-added default hashing function to hashmap
2020-05-27 19:46:11 +02:00
6929f5a748 Mostly bugfix update + empty components support and remove EntityID from Event structure
-empty components now take no memory, so flag components is now far better
-added test for critical bug
-fixed critical bug with adding/removing entities form inside events
-fixed small bug with TestRunner
-improve basic tests
-fixed betterC compilation on DMD
-remove EntityID form Event structure
-added "return" attribute to some functions
-moved some code from Tempalte side to actual implementation
-fixed bug with EntityTemplate copying
-commented out some possibliy unused code
-use code formatter
2020-05-27 17:03:44 +02:00
15cd57dbcb Basic update, multithreading emplate support, fixed
-Added possibility to add entity form template + components to replace template data
-basic tests for new functionality
-small performance improvement for events
-added ComponentRef structure which contain data pointer and component ID
-now events are called before entities removing
2020-05-24 21:57:48 +02:00
233f4abd47 Added job_id parameter to EntitiesData (index of currently executing job) 2020-05-23 10:53:36 +02:00
43f8755a39 Fixed ECS bug related to adding/removing entities inside onAdd/onRemove entity callback
Now whole committing process is called in specific order:
 - UpdateBlocks
 - ChangeEntities
 - RemoveEntities
 - HandleEvents
Whole process is repeated until there will be no more changes to commit
2020-05-22 15:44:31 +02:00
9589a5cb2d FIxed GDC compilation (basic betterC WIP) and some improvements
-fixed issue with adding/removing entities inside events handling
-fixed EntityMeta.getComponent() (added check if component_id is valid)
-added function hasComponent to entity to check if component exists
2020-05-14 22:18:57 +02:00
dd491302af Fixed system reregistration issue and added funtion to allocate EntityTEmplate as copy of different teamplte 2020-05-13 15:31:26 +02:00
1b925b7ab1 Change component name from "modified" to "writable" 2020-05-12 17:30:57 +02:00
5e884352ba Add support for external depencencies 2020-05-12 17:28:31 +02:00
f6e7af1014 Some preformance tests and added EntityMeta structure 2020-05-07 21:58:34 +02:00
4bd5a37b5d Demo update and start counting tests times
-Fixed performance issue with multithreading and rendering
-start making better shaders (by using many macros)
-speed up rendeing when maximum objects count was reached
-remove map rendering form Snake demo, and render entities by themself
-start adding depth and color rendering parameters
-added properly names to jobs (for debugging purpses)
-starts adding multithreaded rendering
-added some math to vectors
-changes execute() to willExecute(). Probably should have different name.
2020-05-07 14:07:07 +02:00
46aba822d0 Improved documentation and removed some old code 2020-05-06 10:55:40 +02:00
5411e97cb1 Move ECS to Bubel module 2020-05-05 16:56:51 +02:00