Closed ShikenNuggets closed 4 months ago
StringID is an adequate implementation of this concept. Currently it is not possible to generate StringIDs at compile time, but the core implementation is complete, so that will be done as part of a separate task: https://github.com/ShikenNuggets/GadgetEngine/issues/11
Game engines need lots of strings, but comparing and passing around raw char arrays or std::string's can be very inefficient. Instead, we can hash the string to a 64-bit integer (32-bit also works but 64-bit significantly reduces the chance of a conflict) and use that as a reference, only getting the raw string when it's actually needed (displaying to user, debug ouput, etc).