Commit graph

68 commits

Author SHA1 Message Date
7b053a6abc Added better formating 2020-04-05 21:16:11 +02:00
d485824ab5 -better JUnit generation
-testing unittest failure
2020-04-05 21:11:38 +02:00
09633d1056 -removed not used code and testing (failure) unittest 2020-04-04 22:20:08 +02:00
c63f3a9727 -added some tests
-improved test runner
2020-04-04 22:11:52 +02:00
dcc48116c5 Merge branch 'WebAssembly' of https://gitlab.com/Mergul/bubel-ecs.git into WebAssembly 2020-03-21 23:14:39 +01:00
67a785f2dc Add betterC test runner 2020-03-21 23:13:08 +01:00
546b73c567 -fixed events bug with calls for unsupported systems
-now empty systems can't handle events and listeners
2020-03-07 13:21:29 +01:00
d6b53425dd -added EmptySystem supprort (called once per frame, sholud be once per jobs)
-EntitiesData can contain "thread_id" which is filled with ID of current thread
2020-03-06 14:01:46 +01:00
5399b584dd -IDManager reserve EntityID(0) as empty
-fixed bug with events called on destroyed entities (crash)
-don't call event on system for unsupported entity
-added "entity_id" property to EntitiesData
2020-03-06 10:12:52 +01:00
87e9a31d7f -PageSize and PagesInBlock values can be adjust in runtime (at initialization time)
-added support for calling custon delegate function for all entities supported by selected system
2020-02-09 21:53:17 +01:00
946fbf2934 -updated tests:
*updated build scripts
 *removed tls variables from code (needed to support WebAssembly)
 *some mmutils tweaks
 *some fixes
 *pthread TLS thread ID implementation
-added Atomic file (reimplementation of atomics templates for emscripten)
-added emscripten support to ecs.std
2019-11-25 20:06:16 +00:00
a8c74d5045 -make tests working on web
-WebAssembly now is compiled with emscripten use (stdc functions bindings only)
-added python script to build WASM version
2019-11-05 09:21:02 +01:00
015783bf5c -remove '-defaultlib' from dub.json
-start working with WebAssembly
-modified .gitignore
-added meson build file (WIP)
2019-11-02 18:51:03 +01:00
d8b01ee097 -working betterC 2019-10-11 19:15:01 +02:00
cde772c077 -betterC works on linux with DMD 2019-10-11 19:05:41 +02:00
633aad6cb7 -enabled handleEvent 2019-10-11 08:31:26 +02:00
41f1c6474b -fully working betterC for windows
*replaced array[..] = array[ .. ] sclice copy with mempcy
 *added own std library (allocator, alloca, Mutex)
 *changed tamplates for collecting components for systems
-fixed issue with multiple optional components registering for system
2019-10-10 22:08:22 +02:00
beab56033c -events are simplified to handleEvent(Entity*,Event) (use entity.getComponent to get entity components) 2019-08-13 11:13:26 +00:00
9402e917f2 -added function to create EntityTemplate form Entity 2019-08-10 16:32:57 +00:00
1be08eb534 -added pure annotation for some functions
-addEntity now returns pointer instead of reference (it's has more sense)
-added function addEntityCopy(EntityID) which adds copy of entity with it's whole data
2019-08-10 16:20:50 +00:00
dfdb56d501 -system name getter
-added error checking for event handling in registerSystem
-now only valid handleEvent() functions are taken by system during register
2019-08-10 15:35:36 +00:00
b04ab77e0c -added components change caching (no HashMap searching during components adding or removing) 2019-06-18 17:49:51 +02:00
235bbb49f2 -block allocator now track allocated blocks and is able to free memory
-jobs data is now allocated in System struct
-written memory cleanup (AddressSanitizer don't show any leak)
2019-06-18 16:45:38 +02:00
9824b587fb -fixed stack-overflow error 2019-06-18 13:57:31 +02:00
9220a28f7c -fixed issue with ExcludedComponents as enum or alias
-removed way to add excluded component by adding attribiute @excluded (it's very stupid way)
2019-04-06 20:27:28 +00:00
eaf2d1581c -removed next two mixins:
*catchFunc
*catchEntityFunc
2019-04-06 16:28:59 +00:00
f39d5ab403 -removed next mixin genParamsChecking() 2019-04-06 15:30:49 +00:00
0608fe6e89 -added new listener callback: onChangeEntity. Callback is called when entity optional components are changed. There is no info about which components are changed (added/removed), but should be in the future).This is probably slowest callback. 2019-03-28 20:25:08 +01:00
7a33e4f94f -renamed callbacks:
*onAdd -> onAddEntity
*onRemove -> onRemoveEntity
*update -> onUpdate
2019-03-28 18:01:43 +01:00
280d7b8ec4 -onAdd/onRemove order is determined by system priority
-fixed many bug with onAdd/onRemove
-onAdd/onRemove now works even when system haven't update callback
2019-03-28 12:19:30 +01:00
4ac80d7025 -onAdd/onRemove called when components are changed 2019-03-24 14:42:21 +00:00
e4be23ee96 -onRemove() called when entity is removed from EntityManager 2019-03-23 21:47:39 +00:00
1841c9c244 -working onAdd listener when new Entity is added to EntityManager 2019-03-23 20:34:50 +00:00
3aad89fc56 -fillInputData created as local function in register process
-call onAdd (WIP)
2019-03-23 20:18:26 +00:00
6bbc8b5152 -git now should ignore .dub/dub.json
-added onAdd/onRemove to test
-added onAdd/onRemove callbacks for system
-generating onAdd/onRemove listeners
2019-03-23 19:48:24 +00:00
204ce9dc79 -almost every funtion is marked as @nogc and nothrow (only problem with HashMap) 2018-11-02 16:36:38 +01:00
3bc5ff2423 -changes in gitignore
-changed "absent" to "excluded" everywhere
-added Events support:
 *systems are scanned by handleEvent() function
 *generate system callers for events
 *event sending have (untested) multithreaded support
 *EventInput structure in System has input components for event
2018-11-02 15:39:46 +01:00
16a5696840 -removed UpdateBySystems version switch (it's now default behaviour)
-beginRegister() and endRegister() was added (every register functions must be called between this calls, update calls can't be called there)
-SystemCallers and Systems dependecies is rebuild always in endRegister();
-beginRegister() clear all SystemCallers and Systems dependencies
-possibility to get System ID and execution state
-JobGroup has now pointer to it's parent (SystemCaller)
-SystemCaller clean up destructor
2018-10-27 17:34:27 +02:00
f666dfd1d5 -onBegin() return type was changed from void to bool
-disabling system execution in onBegin() funciton
2018-10-26 17:43:51 +02:00
d3f7593afc -BlockAllocator is no longer template
-Multithreaded IDManager.getNewID()
 *use implementation with free IDs stack (instead of classic pool)
-support for multiple UpdatePasses. Passes are added by name, and must be called between begin() end() functions.
-removed mutex from addEntity()
-commit() function added. Used to commit all changes made while update() call. Called automatically by begin() end() functions.
2018-10-25 11:46:08 +02:00
430ce8074c -multithreading jobs dependencies:
*system has arrays of read only and modified components
 *new attribute "readonly" usable for variables which should be visible as read only. Const can be used instead for enable checks by compiler.
 *JobGroup was added. JobGroup contain array of jobs and array of dependencies (JobGroups)
 *new function generateDependencies() generate exclusion between systems, and then generate dependencies for SystemCallers and JobGroups
-fixed issue with jobs generating (empty blocks with only newly added entities was used, and led to crash)
-fixed small typo mistake
2018-10-20 11:42:29 +02:00
5dd24b6462 -Systems, Components and Events now must have proper mixin. Mixins are located in ecs.core module. (i.e. mixin ECS.Component)
-Multithreading support:
 *multithreaded update - updateMT(), function generates jobs to execute
 *added dispatch callback function to dispatch generated jobs (setJobDispachFunc)
 *added getID callback for get thread ID by EntityManager
-added Job structure. Job has one function "execute()".
-calling partial info update (required to multithreading)
-multithreaded removeEntity, addCompoenents, removeComponents. Every thread has own data and remove/change lists.
-multithreaded addEntity (WIP)
-fixed issue with duplicating components
-simpler and faster "findBlockWithFreeSpace" function
-CallDataAllocator, allocator for CallDatas (used for Jobs)
-fixed some bugs/issues
2018-10-14 17:00:53 +02:00
3a767babc0 -call update by Systems instead of EntityTypes (version UpdateBySystems)
-memory packing (every block in EntityType except last one are always full)
2018-10-10 18:35:20 +02:00
fddfc78ec1 -removed system components sorting due to fact that it's make an issue
-workaround for DMD phobos issues
2018-10-02 15:36:00 +02:00
e4573f1ec7 -better compile time code generation
-support for AbsenComponents. Absen components can't exist in entity which are
	used by system. There are three possibilities to add absen component. Add
	'@absen' property to EntitiesData mebmer, create AbsenComponents enum with fields
	names corresponding to components names, or create AbsenComponents AliasSeq
	with strings expressions corresponding to components names.
2018-10-01 17:17:40 +02:00
125c9e7d40 -support for 'length' parameter in EntitiesData (for convenience) 2018-10-01 15:08:14 +02:00
0e13fafefd -removed 'InputStruct' version switch (now it's default behaviour)
-checking if System struct has valid update(EntitiesData) prototype
2018-10-01 13:17:31 +02:00
d5780a6252 -working update() with EntitiesData structure input
-added support for 'const' components input (read only, future usage)
2018-09-30 23:12:20 +02:00
ed589bbd71 -added absen components list to system
-added ECS uda attributes
-added InputStruct version switch (gets update() input as structure of arrays)
-initial (WIP) EntitiesData update() input structure compile time parsing
2018-09-29 23:10:31 +02:00
c18ac54265 -LinearLayout proggress:
*EntityTemplate.getComponent
 *Adding/removing components for Entitites
-better code for adding components
2018-09-26 10:57:42 +02:00