ImmutableOctet / glare

Glare: Open Source Game Engine written in Modern C++
MIT License
0 stars 0 forks source link

Review current file path/import requirements for archetypes -- Determine what needs to change for single-file instantiation to work #48

Open ImmutableOctet opened 1 year ago

ImmutableOctet commented 1 year ago

We currently assume filesystem access when processing archetypes. This means we always expect imports and state references to be the proper method of entity-descriptor construction. In a theoretical scenario where we would want to embed all logic data of an entity in a single file, this would not be sufficient.

Take for example an entity description sent to a game client from a server. In this example, we would need to send multiple files from the server in order to construct a single entity factory and descriptor. This becomes wildly inefficient compared to a single (possibly space-optimized) JSON object or string stored in memory.