Game Engine Architecture
299 within each object. The locations of the pointers are stored into a simple table known as a pointer fi x-up table. This tabl ...
300 6. Resources and the File System The key to loading a multi-fi le composite resource is to load all of the interdependent fi ...
301 ented language like C, we can envision a look-up table that maps each type of resource to a pair of function pointers, one f ...
...
303 7 The Game Loop and Real-Time Simulation G ames are real-time, dynamic, interactive computer simulations. As such, time play ...
304 7. The Game Loop and Real-Time Simulation Real-time 3D computer graphics are implemented in an entirely diff erent way. As t ...
7.2. The Game Loop 305 (e.g., 120 Hz). Higher-level systems, like AI , might only need to be serviced once or twice per second, ...
306 7. The Game Loop and Real-Time Simulation collideAndBounceBall(); if (ballImpactedSide(LEFT_PLAYER)) { incremenentScore(RIGH ...
7.3. Game Loop Architectural Styles 307 7.3. Game Loop Architectural Styles Game loops can be implemented in a number of diff er ...
308 7. The Game Loop and Real-Time Simulation can be called in any way the application programmer sees fi t. Libraries pro- vide ...
309 A particular game’s frame listener implementation might look something like this. classGameFrameListener : public Ogre::Fram ...
310 7. The Game Loop and Real-Time Simulation ing by simply posting an event. In the event handler, the code can perform whateve ...
7.4. Abstract Timelines 311 advancing the game clock by one target frame interval (e.g., 1/30 of a second) each time a “single-s ...
312 7. The Game Loop and Real-Time Simulation 7.5 Measuring and Dealing with Time In this section, we’ll investigate some of the ...
313 of the world, games update at 50 FPS, because this is the natural refresh rate of a PAL or SECAM color television signal. Th ...
314 7. The Game Loop and Real-Time Simulation ignore Δt altogether and instead specify the speeds of objects directly in terms o ...
315 mistake of stepping the physics system twice on the next frame, presumably to “cover” the 57 ms that has passed. Those two s ...
316 7. The Game Loop and Real-Time Simulation frame rate also looks bett er, and as we’ll see in the next section, it can be use ...
317 7.5.3. Measuring Real Time with a High-Resolution Timer We’ve talked a lot about measuring the amount of real “wall clock” t ...
318 7. The Game Loop and Real-Time Simulation 7.5.3.1. High-Resolution Clock Drift Be aware that even timing measurements taken ...
«
12
13
14
15
16
17
18
19
20
21
»
Free download pdf