novelrt / NovelRT

A cross-platform 2D game engine accompanied by a strong toolset for visual novels.
MIT License
185 stars 42 forks source link

Added some ECS API sugar - new configurator type and a new place for us to define default systems when the time comes. #357

Closed RubyNova closed 3 years ago

RubyNova commented 3 years ago

resolves #351

RubyNova commented 3 years ago

Please note this PR now also fixes the race condition introduced with a previous fix.

capnkenny commented 3 years ago

Just need an explanation of what tanner pointed out as well as updated attribution before I shall approve

RubyNova commented 3 years ago

In essence, the DeBruijn table provides a set of values for a table lookup which makes finding Log2 of the provided value faster as it takes less operations to perform.

In the future we'll be switching to the hardware intrinsic/asm instruction, but that is fiddly in C++, and so this software implementation was created.