Game Development Reference
In-Depth Information
6 . Input lag is the time delay between pressing a button and seeing the result
of that button press onscreen. The multithreaded game loop increases in-
put lag because the rendering must be one frame behind the gameplay,
which adds one additional frame of lag.
7 . Real time is the amount of time that has elapsed in the real world, whereas
game time measures time elapsed in the game world. There are many in-
stances where game time might diverge—for instance “bullet time” slow-
mo would have game time be slower than real time.
8 . Here is the code as a function of delta time:
Click here to view code image
position.x += 90 * deltaTime
position.y += 210 * deltaTime
9 . To force a 30 FPS frame rate, at the end of each iteration of the loop,
check how much time has elapsed for the iteration. If it's less than
33.3ms, then the code should wait until 33.3ms has elapsed before con-
tinuing to the next iteration. If the elapsed time is greater than 33.3ms,
then one option is to try to skip rendering on the next frame, in an attempt
to catch up.
10 . The three primary categories are objects that are drawn and updated, ob-
jects that are only updated, and objects that are only drawn. Objects that
are drawn and updated covers most objects in the game, including the
player, characters, enemies, and so on. Objects that are only updated in-
clude the camera and invisible design triggers. Objects that are only
drawn include static meshes, such as trees in the background.
Chapter 2: 2D Graphics
1 . The electron gun starts aiming at the top-left corner of the screen and
draws across one scan line. It then aims down one line and starts at the left
again, repeating this process until all the scan lines have been drawn.
VBLANK is the amount of time it takes for the electron gun to reposition
its aim from the bottom-right corner all the way back to the top-left
corner.
Search WWH ::




Custom Search