Commit graph

32 commits

Author SHA1 Message Date
54a6d5dec2 CI and common update:
-added webpage deploymnet stage
-added separate build stage which build all binaries and generate documentation
-added Emscripten build stage for merge to master only
-added VBO batch rendering (current default, no render mode switch yet)
-fixed camera positioning calculation
-fixed buffer issue with WebGL
-added viewport scalling (at least 300 pixels height). Pixels are scalled if screen is bigger.
-center demos gameplay area
-added fullpage html template for Emscripten build
2020-05-01 19:26:21 +00:00
845f468d59 -added more documentation
-remove update() function from entity
-currently max supported components count is 64 per type
2020-03-21 13:27:14 +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
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
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
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
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
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
d118adc028 -code foramtted with dfmt 2019-03-28 17:57:28 +01: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
a82ca1e659 -some documentation changes
-added Component onCreate callback which is called after allocating entity from template
2019-03-21 13:19:03 +01: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
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
2004909642 -sorting components ids in systems
-changed callUpdate() prototype
2018-10-01 22:11:27 +02:00
437c672478 -documentation 2018-10-01 19:40:24 +02:00
125c9e7d40 -support for 'length' parameter in EntitiesData (for convenience) 2018-10-01 15:08:14 +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
d0fcdba6cd -registering same system multiple times only replace pointer for callback
-added export attributes (required by windows to make DLL library, not work at now due to DMD bugs)
-interface D files to import
2018-09-18 13:28:04 +02:00
b3dce6560a -suport system callback: onCreate, onDestroy, onBegin, onEnd
-support for optional Components for System
-Components IDs in Systems are now stored as ushorts
2018-09-16 22:40:55 +02:00
4b19907c03 -formatted all files with dfmt
-more messy tests
-some documentation
-some useful code moved to functions
-adding components to existing entity
-opportunity to get entity by ID
-fixed calculating deltas
-sorting IDs arrays for allocating Templates
-fixed alignment caluclation
-added compile-time checks for "component_id" member existing in component
2018-09-13 00:10:48 +02:00
d3222eefbb -some usefull functions for IDManager
-added EntityManager.removeEntity(EntityID)
-EntitiesBlock now has ID usefull for updating first_free_block in EntityInfo
2018-09-12 17:38:41 +02:00
ae53e13d42 -add systemCaller to entity only if their components matches
-System onEnable() and onDisable() callbacks
2018-09-12 15:28:10 +02:00
86e4e57f74 Format files with dfmt 2018-09-10 21:48:33 +02:00
a61a54b43f -components and infos are now stored in hash maps
-adding entities
-Template allocating and freeing
-Deltas calulating for components in EntityType
-Updating for every EntityType and System
-Generate deltas, components list, and functions callers for Systems
2018-09-09 23:28:18 +02:00
6217aec6be -changed README
-license changed to BSD (maybe temporary)
-added configurations to dub.json
-initial ECS implementation (WIP):
	-Manager, System, Entity, Component
	-registering components
	-registering systems
	-calling update
2018-09-07 20:54:29 +02:00