2 ms·
How so? Unless you plan to have multiple windows, of different resolutions (exceedingly rare in a video game), then WIDTH and HEIGHT simply are pieces of global
by dTal 7y ago
How so? Unless you plan to have multiple windows, of different resolutions (exceedingly rare in a video game), then WIDTH and HEIGHT simply are pieces of global state. Whether you like it or not, global state exists, and if you need access to it in many places, then passing it up and down the call stack becomes an exercise in pointless book-keeping.
- _carl_jung 7y agoGame programming is an area in which I feel benefits greatly from the use of global state.