Should you reset game_time counter?

kupo15

Member
I'm sure most are familiar with the practice of keeping track of game time since the start of the game and also using that variable for game behaviors. For example, some enemies in games use the global game time for spawning and things like that instead of proximity to player which is why some speedruns are tricky.

Anyway, should you be manually resetting this counter at some point? What will happen if you endlessly allow the game time variable to tick up and a player keeps the game on for a long time?
 

NightFrost

Member
I would assume it behaves like any other variable that reaches its maximum value and flips over back to zero. Or if it is treated as being allowed negative values, it flips to negative maximum halfway through (when the highest bit gets set).
 

kupo15

Member
That's what I was thinking that it would overflow at some number. So then set it and forget it? Or maybe manually resetting it at an appropriate time would give more control against unintended things
 
Top