Commit graph

281 commits

Author SHA1 Message Date
073f91fc4a Update meson_options.txt 2021-02-25 18:49:39 +00:00
66b5807368 Improve meson build.
-Add all required packages as wrap dependencies
-Move source lsitnings to separate files
-Proper dependencies declarations
-Set global D compiler arguments
-Add few asserts
-Add test exe
-Other small improvements

Tested with dmd with betterC, demos executable has to be run from 'demos' directory to properly load assets.
2021-02-21 20:44:58 +01:00
00386ed529 -added missing meson.build files 2021-02-21 17:38:03 +01:00
3f01b96b76 Merge branch 'Demos' into 'master'
Demos

See merge request Mergul/bubel-ecs!8
2021-01-09 14:36:27 +00:00
9cef882faf -change targetName to "ecs" in order to fix CI guild (need to be renamed in CI in future) 2021-01-09 15:13:53 +01:00
edaa2286f4 -fix some memory leaks in unittests
-change name in dub.json ecs->bubel_ecs
-add dependeny in meson.build
2021-01-09 14:30:56 +01:00
84ba5f9eb5 -fixed emscripten compilation 2021-01-03 13:08:29 +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
64dc099e0a Demos big update
-Added some more math functions
-fixed many memory leaks
-added AABB and BVHTree support to collision.d
 *BVHTree has only incrementally adding entities implemented by now (and bad BottomUp algorithm)
 *ECS Systems use two trees, one for static and one for dynamic entities, dynamic BVH is builded every frame from scratch by now
-BrickBreaker now uses BVHTree to collision detection
 *balls only use tree for checks (they aren't adding to tree)
-fixed bug leading to crash
2020-07-17 13:38:41 +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
74179b4fc8 Demo update
-added 'dot' function to vector math
-fixed Circle tool rendering
-fixed some potentiall memory leaks
-added 'collision' module which now separates ShootGrid from SpaceInvaders demo
-separate some systems from demos to 'basic' module to better demos functionality sharing
-slow down snake
-added new graphics
-BrickBreaker demo now works (without blocks breaking and with bugged collision detection)

-some bug fixes
2020-07-08 22:09:10 +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
b0b64b965f Demos update
-added some new types to gui manager + some fixes
-TexCoordsManager now working (probably)
-added CRenderDefault components which makes entities without texcoords possible to draw
-makes better way of binding demos to launcher
-moved some registration related to rendering to one function (basic components + draw system)
-added Sandbox demo (demo which takes all demos to one demo)
-extends ParticlesDemo play area
-added BirckBreaker demo (WIP)
-added special material to additive particles
-added whole bunch of rendering code to rendering module
-added ability to show filtered entities (blinking)
2020-07-01 19:45:53 +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
d733bb514c Make common draw system, moved some components to basic components and fixed bug with GUI for signed short integers 2020-06-12 20:51:05 +02:00
3a7a5b2a21 Slightly changed rendering code
-renderer draw function now takes struct instead of multiple parameters
2020-06-12 14:53:59 +02:00
8cba2626be Added entity filering support and fixed minor bug 2020-06-10 15:35:42 +02:00
5018464a41 Demo GUI fixes and improvements plus some shortcuts
-added option to override components (by remove them before adding)
-added shortcuts for tools
-fixed mouse scroll on WASM
-addding entity filtering option (WIP)
-added some tooltips
-remove Components duplicates in ComponentManipulator menu
-fixed ImGUI controls IDs
-added possibility to change values of component to add
2020-06-10 14:13:01 +02:00
e76c5ccdb2 Huge demos update
-moved C stdlib function definitions to ecs_utils.utils
-added function to calculate mix(linear interpolation) and rsqrt(fast inverse sqrt)
-added some math to vec2 (length, normalize...)
-improved renderer with possibility to use multiple materials (one per block, not perfect solution for parallel compute, but works with some requirements)
-added blending support for material (opaque, additive, mixed)
-added Android support
-added gprahical representation for mouse tools (tool_circle.d)
-added initial support for editing template components variables
-better Component and Templates listing
-added possibility to add/removes components using mouse
-move CLocation to game_core.basic and reuse in every test
-moved tools code from demos to App (now code is fully separated from demos!)
-some improvement and fixes in Snake demo, with additional systems to handle adding and removing entities
-added new demo: Particles. By now demo has several particles to spawn and support for attractors and vortexes (calculation is made as every attractor with every entity)
-fixed bug with window hover and tools
-improved tool behaviour
-added new material
-now window is always opened as maximized windowed mode
-some minor fixes and improvements
2020-06-06 22:46:29 +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
86edfa4a57 Merge branch 'master' of https://gitlab.com/Mergul/bubel-ecs.git into Demos 2020-05-28 18:51:07 +02:00
eb15a8ac7f Merge branch 'Demos' into 'master'
Demos

See merge request Mergul/bubel-ecs!7
2020-05-28 16:48:43 +00:00
024356df9b Common update:
-added multiple new function to allocate template and add entity
-updated README.md (complete initial version)
-empty components now don't take memory
-fixedd small bug with TestRunner
-added many new tests (HashMap, Vector, EntityMeta, ...)
-added default hashing function to HashMap
-fixed critical bug with adding entities
-fixed small bug with adding entity with remplacement components
-added asserts into code to better bug detection
-small performance improvement for events
-added ComponentRef structure which contain data pointer and componentID
-remove EntityID from Event structure
-now events are handled before removing entiteis
-fixed GDC compilation
-fixed rendering of rotated sprites
-added weapons as separate entities to space ship and others
-added Tower enemy to SpaceInvaders demo
-added Boss to SpaceInvaders demo (boss has four tower attached to it)
-Boss towers shoot multiple bullets upon death
-fixed critical bug with demos switching
-fixed critical bug related to adding/removing entities form inside onAdd/onRemove entity callback
-added animation support
-added particles sypport and particles for firing and explostions, and more
-multithreaded rendering now has same rendering order as singlethreaded
-application automaticallu detect host CPU threads count
-added upgrades to SPaceInvaders demo
-fixed texture memory freeing
-improved documentation
-improved multithreaded performance
-improve shader code
-fixed registration issue
-some additional performance improvements
-added depth and colors to rendering parameters
-jobs now has names corresponding to their systems
-change execute() -> willExecute()
-added EntityMeta structure to speedup getting fetching components form entity
-improved multithreading rendering
-added possibility tio change number of threads runtime
-added bullets collision detection in SpaceInvaders demo
-some CI changes
-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
-added many new sprites to atlas
-fixed critical bug with CPU usage in multithreaded mode
-snake render tile coresponding to body part
-snake is destroyed after collision and emit some particles
-added some functionality to vectors
-fixed documentation issue in Manager.d
-more minor code changes and cleanup
2020-05-28 16:48:42 +00:00
2ad238841b Fixed .gitlab-ci.yml emscripten build 2020-05-28 16:41:58 +02:00
9af1cee60b SpaceShip demo update
-added wave shooted upon death of boss tower
-cleanup code a little bit
-moved to new entityAdding method
-fixed bug with changeing demos
2020-05-28 16:11:27 +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
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
3d98b0ee5e Demos update
-fixed critical bug with demos switching
-change multithreaded rendering method (now draw order is keeped even witch multithreading there is no popping)
-added particle emitter components and systems (WIP)
-bullets (laser) now sending EBullet event insead of EDamage which gives possibility to not destroy bullet if shooted entity is already killed
2020-05-23 10:55:31 +02:00
233f4abd47 Added job_id parameter to EntitiesData (index of currently executing job) 2020-05-23 10:53:36 +02:00
bfc0da47e4 SpaceShip demo updage
-Update sprites texture atlas
-added support for separate collider and graphical scale
-weapon now can be located on specific sprite relative position
-SpaceShip has two lasers which are separate entities
-added following parent system
-added Boss
-parent destroy children after being destroyed
-added towers (Tower consist of 3 entities, parent take damage and one is weapon)
- added targeting system which rotate entity to target
2020-05-22 15:58:35 +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
d89df28f85 Fixed rendering of rotated entities 2020-05-22 15:41:28 +02:00
abc4d0c509 Modified codecov.yml 2020-05-22 15:40:53 +02:00
0b924ae77c Demos update (SpaceInvaders demo)
-added new sprites
-added new functions to vectors
-fixed rendering rotated sprites
-small performance improvement and some bug fixes
-added animations support
-bullets get initial velocity from parent
-added partiles for fire from gun and explosion of enemies
2020-05-19 20:27:18 +02:00
6c3c803d1e SpaceShip demo update
-fixed issue with firing lasers in multithreaded mode
-fix: enies can't grab upgrade anymore
-there is a change that enemy drop bonus upon death
2020-05-14 22:20:41 +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
f731b4cedb Added Upgrade bonuses to SpaceInvaders demo 2020-05-13 21:51:38 +02:00
d26c940b80 Fixed shader compilation on GLES 2020-05-13 21:30:56 +02:00
c29ace661b Added laser collision response to SpaceInvaders 2020-05-13 21:27:09 +02:00
d257a6c9f8 Updated codecov.yml 2020-05-13 16:24:32 +02:00