I [made a semi-cache coherent container][ghWhippet] which provides an [Entity-Component-System][wikiECS]. These are the bones of [contemporary game-engines][wikiECSGame].
This post is a bit crude; I keep thinking about it then adding features to Whippet instead of writing this up.
[Whippet on GitHub][ghWhippet] [Google built CORGI][googleCorgi] which isn’t (yet?) [trying to act cache coherent][corgiCache]. It also is [more than trivial][corgiBuild] to build, and suffers from [NIH][wikiNIH] for me. Actually; that last bit isn’t likely to be a problem for most, but I didn’t like their license.
I [made a semi-cache coherent container][ghWhippet] which provides an [Entity-Component-System][wikiECS]. These are the bones of [modern game-engines][wikiECSGame].
This post is largely a gooey weasel opinion piece. It started as an introduction that grew out of control. So, for now, it’s just a bit of rambling while I clean-up the documentation for my tool.
Of Entity-Component-Systems Among other things, Jason Gregory’s book [Game Engine Architecture][bookGAE] discusses the concept of a data-driven architecture for game software.
I had an idea/desire for a “simple” template class that’d work as my OpenGL thread. A contemporary design for multi-threaded 3D games12 (or whatever) seems to be pooling work and processing it in whatever threads are available. IME OpenGL/GLFW are not re-entrant; Apple3 and GLFW4 explicitly states that it won’t work - so it seems safe to assume that I shouldn’t call functions from different threads. So to make a super-fast 3D game (or whatever) I need to do less work on the thread which is running OpenGL while allowing other threads to send it whatever work they please.
https://github.com/g-pechorin/bullet2stripped
What? I reduced Bullet 2.83 to a single C++ header file.
Why? Largely to see if I could … hey - SQLite saw a 5% - 10% speed boost when they did this right?
… oh - and to ease adoption I guess … maybe …
How? I used a slightly complicated Scala script that I’m not interested in examining again … for now …
Basically; I took the 2.
In which I pontificate on the subject of Hungarian Notation
Hungarian Notation is a contentious topic It boils down to an ambiguity for the word “type” within English / C++. MicroSfot’s modern style-guide says not to use “Abbreviations and Acronyms” or “Hungarian Notation” - originally Hungarian Notation was a style of abbreviation. I’m going to paraphrase a long blog post by Joel on Software and summarize my thoughts at the end.
You don’t need members when you’ve got SWAG!
Actually … you don’t get many members with this idea. By casting this I can pass around an immutable structure of up-to sizeof(void*) bytes.
Gist; https://gist.github.com/g-pechorin/d5eb8a1a770f783943a0
Can I use polymorphic-static-templates to automagically wire meta-functions into a Lua allocator?
Presently I’m using several “make—” functions to “decorate” objects after allocation and enable get/set/run meta-functions. I keep feeling the “smell” that some esoteric template thingies could be used to make these steps declarative (or maybe automatic!)