Commit graph

93 commits

Author SHA1 Message Date
a6d92cb21b -change ecsID to becsID
-change component_id/system_id to becsID in demos
2021-02-27 17:25:13 +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
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
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
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
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
2f827a94db Fixed betterC compilation 2020-05-27 18:22:55 +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
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
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
5411e97cb1 Move ECS to Bubel module 2020-05-05 16:56:51 +02:00
7c263d3ed4 SimpleVector test improvement 2020-04-24 20:47:42 +02:00
f7a1e9bd05 More test and fixes:
-added test for addEntityCopy
-test order of onAddEntity, onRemoveEntity, onChangeEntity callbacks calls
-testing onAddEntity, onRemoveEntity, onChangeEntity callback
-test callEntityFunction call
-fixed bug with crashing ECS (setting callers for entity change callbacks)
-commented debug asserts conering duplicated components ids (to further consideration)
2020-04-22 16:23:42 +02:00
cb9eaad123 More tests:
-removed some unused code
-fixed bug with struct destructors (Mallocator called __dtor instead of __xdtor)
-added unittests for events
-addded _d_eh_personality null implementation as LDC betterC bug workaround
2020-04-18 19:16:45 +02:00
d0b7138f9f More tests:
-fixed bug in EntityManger.addComponents
-added many new tests
2020-04-17 17:17:37 +02:00
84e04191c8 Unittests and demos update
-fixed bug in EntityManager
-added better support for non-betterC unittests
-added many new unittests
-slightly improved JUnit xml output
-fixed WASM compile script
-added new textures
-fixed model texture coordinaes in demos
-some minor bug fixes in demo
TODO: demos cpu usage in non-betterC mode
2020-04-16 22:16:20 +02:00
14839b3765 Better assertion infos and formatted code 2020-04-14 17:39:52 +02:00
0670aed506 BetterC improvement
-fixed some bugs
-non betterC code has better assertion messages
-fixed limited count of components in system
-small dub.json fix
2020-04-14 17:29:49 +02:00
2aef76d75a Unitests update
-unittest runner works for non betterC build
-working unittest coverage generation
-unittest runner support for named tests. Simple regex is supported (* as any substring) and two list of expressions are used, one for include regex and one for exclude regex
2020-04-14 13:41:39 +02:00
998240f7be Template allocation update and some tests
-test runner support before/after everty test callback funcion
-added some basic tests for template allocation
-added function to allocate new template from different template and list of addition and removed components
2020-04-09 22:14:51 +02:00
8f5f2f3baf Removed unused code and failure test 2020-04-05 21:23:12 +02:00
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