The reasoning comes from place where games do an inordinate amount of string based stuff.
Stuff that isn’t easy to optimize at the end of the project.
Therefore, we try to keep that gate closed unless absolutely necessary (or the situation is well defined and small enough).
There is care about performance of strings, but much of the SDK uses Lua api calls (vmath a classic example) where if you call alot of vmath functions you will create the same “string” styled issue
There are many areas in the engine that could use more care and probably some optimizations. I hope we can get to work on those areas too.
[ additional q ] What would be the appropriate method for “getting” text associated with a game object that has been generated in the game object (not for display btw - for data reasons). How would you attempt this via a message? ( req → resp? )
For text associated with a script, I’d use hash properties, e.g. go.property(“TEXT_ID”, hash(“TEXT_ID_BOSS_NAME”)).
That way I can look up the localisation in another Lua module depending on currently selected language.
E.g. something like this:
local go_text_key = hash("TEXT_ID")
...
local text_key = go.get("#script", go_text_key)
local text = localization.current_language.texts[text_key]