Asking for a dynamic constant is a bit of an oxymoron, it can not be both a constant and dynamic, I agree that the AppGameKit implementation is misleading but you seem to be adding unnecessary confusion
Quote: "You can use a constant in the function, but wouldn't be able to use it to define an array:"
Yes, because when defined like that is is not a constant, its a macro, again misleading I agree, arrays must be defined with a static value so AppGameKit can allocate enough memory, if you want a dynamic array define it empty [-1] use .insert
Quote: "So you're thinking, just make a global instead, right? Wrong. Global must be an integer literal or constant"
Quote: "And by constant, it really means literal because you can't assign a constant to a global, you'll get the same error still."
a global can be anything if you define it right, static values can be assigned off the bat but dynamic values must be defined after the declaration, maybe this is causing your unexpected behaviour?
global _screenWidth = 1024
global thing : thing = getVirtualWidth() / 64
^^ both are valid, but each use case differs
To assign a dynamic constant (which is not a constant, its a macro) to a global
#Constant MYConst GetDeviceWidth()
Global myGlobal : myGlobal = MYConst
to assign a static constant (which is indeed a constant) to a global
#Constant MYConst 1024
Global myGlobal = MYConst