UNIT 7 Flashcards
Game code ad-hoc structure is more suitable for 2-D and board games than for any other small game.
False, Ad hoc architecture is fine for projects with very small code bases (a few dozen files) but is very limiting in large projects.
Layered code architecture is a modular architecture, a DAG architecture, and an ad-hoc architecture.
False, while the DAG architecture allowed a module to access any other module underneath itself, here modules are arranged in rigid layers, and a module can only interact with modules in the layer directly below
Memory leakage could occur if a game phase initialization took place but there was no shutdown.
True
The Resource Aquisition Is Initialization (RAII) concept indicates that a game phase must wait for resources to be released by other phases before starting.
False, creating an object will acquire and initialize all the necessary resources, and destroying it will take care of destroying and shutting down all those resources.
Game phase shutdown might take a long time because it includes resetting or destroying data structures with many nodes and edges, and doing a lot of general cleanup.
True
To allow a game to run on different video frequencies for PAL and NTSC, time steps should not use the main game loop CPU clock.
False, using a clock allows different CPU speeds and frequencies to play the game at the same speed.
We should sample the input device once every 33.3 seconds, rather than once every frame.
False, sample the input once per frame for “instantaneous” responses.
Either the collision task or the simulation task in the main game loop is responsible for running the AI behaviour code.
False, the simulation task is responsible for the AI behaviour code.
For the sake of improving debugging, we should decouple the rendering step from the simulation step.
False, this technique actually allows a game to run the simulation at a fixed rate (e.g. 20 times per second)