What’s the best way to define game-wide constants/enums that are accessible to all scripts?
For example, scripts attached to a map game object, a player game object and a hud game object might all need to know the map’s tile size. Using Lua in the past I’ve put definitions such as TILE_SIZE = 32 or NORTH = {0, 1} in a ‘constants.lua’ file and 'require’d that file in each script as needed. Is that a sensible way to do things in Defold?
( I realize there aren’t really such things as constants in Lua but I my own convention of defining them in uppercase has never caused a problem )