Michael is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Michael @drjeats

opinion: If you allow designers to specify IDs in your game, sanitize them to all lowercase/no special chars. Also might as well make the follow identifier naming rules in case you wanna do some codegen.

Do it from the very very beginning. You probably will save files with the ID in the filename, and people suck at keeping capitalization consistent, so NTFS and HFS and version control and your Dictionary/std::unordered_map/whatever will all disagree with each other. It's a bad time.

· Web · 2 · 0

Yeah, you could do all this internally at runtime, sanitize input at the edges and such, but why have that ambiguity instead of making the rules clearly visible to designers?

That's also the sort of runtime cost that might invisibly add up everywhere (like when they replaced all the float triples in Minecraft with Vector classes).

()

(I'm talking about this because I failed to do this early on with Dirtbags, I have rag rats)