0.7.0
Ecsact SDK 0.7.0 Release
The New Stuff
0.7.0 is our biggest release yet. We've been hard at work improving the Ecsact language as well as improving tooling and performance.
Parameters
The Ecsact language added a new core concept - Parameters. All statements now can accept parameters. You'll see them mentioned in the features below.
statement Name(param_name: param_value)
More in-depth documentation to come
Parallel Systems
It's been long documented that Ecsact systms were meant to be ran in parallel. The Ecsact RT EnTT implementation has now implemented parallel systems #127 and systems will execute in parallel by default if they can.
A new API was introduced to control this feature. You can now mark a system to explicitly not run in parallel with ECSACT_PAR_EXEC_DENY
. See more options in ecsact/common.h. Of course you can also set this option in the Ecsact language.
system MySystem(parallel: deny) { /* ... */ }
- ecsact-dev/ecsact_rt_entt#127
- ecsact-dev/ecsact_rt_entt#124
- ecsact-dev/ecsact_runtime#249
- ecsact-dev/ecsact_interpret#227
Reactive Systems
Added the notify
keyword to specify conditions for a system to execute. These can be individually configured for every component in the system. The options currently available are:
oninit
,onupdate
, andonremove
onchange
when the component is updated and one or more of its internal values has been changed
system NotifySystemA {
readwrite ComponentA;
readonly ComponentB;
notify {
// System will execute when ComponentA is added to qualifying entity
oninit ComponentA;
// System will execute if ComponentB is removed from qualifying entity
onremove ComponentB;
}
}
system NotifySystemB {
readwrite ComponentA;
readonly ComponentB;
// Alternatively, you can do a notify without a body and it will apply to all components in the system
notify oninit;
}
More in-depth documentation to come
Lazy Systems
Having all qualifying entities for a system running on the same tick can be expensive. Now you can limit the amount of entities that get iterated in a system per tick by making it lazy
.
Lazy systems are sorted so accurate determinism is still at play, this is especially important for multiplayer games.
There is a new dynamic function to mark a system as lazy ecsact_set_system_lazy_iteration_rate
and an accompanying meta function to read if a system is lazy ecsact_meta_get_lazy_iteration_rate
, but the way you most likely will be using lazy
systems is via parameter in the Ecsact language.
system MyLazySystem(lazy: 25) { /* ... */ }
More in-depth documentation to come.
Ecsact CLI Build System
We've completely deprecated ecsact_rtb
and now instead have an ecsact build
command. There is a "recipe" system which allows you to pick and choose what runtime implementation you want. There's only one (Ecsact RT EnTT) right now, but it opens the gate for you to write your own and for more implementations to come.
ecsact build
also improves some quality of life things compared to ecsact_rtb
such as coloured output and reporting C++ build errors more nicely.
More in-depth documentation to come
- ecsact-dev/ecsact_rt_entt#100
- ecsact-dev/ecsact_rt_entt#105
- ecsact-dev/ecsact_cli#104
- ecsact-dev/ecsact_cli#102
- ecsact-dev/ecsact_cli#98
- ecsact-dev/ecsact_cli#84
- ecsact-dev/ecsact_cli#90
- ecsact-dev/ecsact_cli#91
- ecsact-dev/ecsact_cli#85
- ecsact-dev/ecsact_cli#71
- ecsact-dev/ecsact_cli#51
- ecsact-dev/ecsact_cli#76
- ecsact-dev/ecsact_cli#74
- ecsact-dev/ecsact_cli#72
Codegen Error Reporting
Ecsact Codegen plugins now can report errors and other information while generating code. This is a breaking change since the ecsact_codegen_plugin
now utilises a 3rd parameter. All official plugins have been updated in this release.
New Assoc API
The old association API has been completely re-done and we've introduced a new concept called "indxed fields". This feature isn't fully ready for prime time, but you can checkout the changes we've made here:
- ecsact-dev/ecsact_runtime#255
- ecsact-dev/ecsact_runtime#247
- ecsact-dev/ecsact_runtime#246
- ecsact-dev/ecsact_runtime#244
- ecsact-dev/ecsact_runtime#243
- ecsact-dev/ecsact_parse#153
- ecsact-dev/ecsact_interpret#224
- ecsact-dev/ecsact_lang_cpp#196
- ecsact-dev/ecsact_lang_cpp#194
- ecsact-dev/ecsact_lang_cpp#204
Bazel Support
We've added more bazel support to include building an Ecsact runtime directly via the ecsact
CLI. We use bazel a lot so expect more imrpovements to rules_ecsact
.
- ecsact-dev/rules_ecsact#56
- ecsact-dev/rules_ecsact#54
- ecsact-dev/rules_ecsact#53
- ecsact-dev/rules_ecsact#45
- ecsact-dev/rules_ecsact#43
Misc. Small Improvements
- ecsact-dev/ecsact_runtime#245
- ecsact-dev/ecsact_runtime#238
- ecsact-dev/ecsact_runtime#234
- ecsact-dev/ecsact_runtime#206
- ecsact-dev/ecsact_runtime#231
Internal Improvements
Ecsact codegen plugin for optimization #56
Metaprogramming compile times were taking longer and longer the bigger .ecsact files got. This is a refactor to use codegen instead.
System providers #126
It was getting more and more difficult to add features to systems. This is a refactor to add providers
to systems, allowing the separation of new features like lazy systems
while being more readable.
Bug Fixes
- Fixed generate add events not calling, parent trivial systems children systems not running ecsact-dev/ecsact_rt_entt#136
- Dynamic view gets used instead of accessing registry ecsact-dev/ecsact_rt_entt#123
- Proper internal comparer ecsact-dev/ecsact_rt_entt#121
- Generates missing internal sorting ecsact-dev/ecsact_rt_entt#115
- Update events were happening too often ecsact-dev/ecsact_rt_entt#119
- Generated entity having invalid callback ecsact-dev/ecsact_rt_entt#113
- Entity created callback called too often ecsact-dev/ecsact_rt_entt#111
- Check for created entity callback being nullptr ecsact-dev/ecsact_rt_entt#97
- (meta) c++ wrapper bad container access #252
- (meta) c++ wrapper using wrong assoc cap count #251
Other
- Association is currently disabled on Ecsact RT EnTT. It's a work-in-progress as we've overhauled the assocation api completely. For now, it will return an error when you try to use it. ecsact-dev/ecsact_rt_entt#139
- Ecsact CLI benchmark is temporarily disabled
- Ecsact SI Wasm recipe is not shipped with this release. To build with wasm you must utilise the recipe found at https://github.com/ecsact-dev/ecsact_si_wasm. This will be fixed next release.