Game Engine Architecture
359 m_dtMax(dtMax), m_eventId(eventIdToSend), // event to send when // complete m_iButton(0), // start of sequence m_tStart(0) / ...
360 8. Human Interface Devices (HID) ++m_iButton; // advance to next button // Is the sequence complete? if (m_iButton == m_butt ...
361 8.5.5. Managing Multiple HIDs for Multiple Players Most game machines allow two or more HIDs to be att ached for multiplayer ...
362 8. Human Interface Devices (HID) ids. For example, if our game is to ship on Xbox 360 and PS3, the layout of the controls (b ...
363 Our abstraction layer can translate between the raw control ids on the cur- rent target hardware into our abstract control i ...
364 8. Human Interface Devices (HID) ever the game wishes to determine whether a particular logical game function should be acti ...
365 Context-sensitive controls are reasonably straightforward to imple- ment via a state machine. Depending on what state we’re ...
366 8. Human Interface Devices (HID) player or camera code itself. That way, if the camera decides to ignore the deflection of t ...
367 9 Tools for Debugging and Development D eveloping game soft ware is a complex, intricate, math-intensive, and er- ror-prone ...
368 9. Tools for Debugging and Development of bugs using breakpoints and watch windows. Some bugs are timing-depen- dent; they o ...
9.1. Logging and Tracing 369 int charsWritten = vsnprintf(s_buffer, MAX_CHARS, format, argList); s_buffer[MAX_CHARS] = ‘\0’; // ...
370 9. Tools for Debugging and Development int g_verbosity = 0; voidVerboseDebugPrintF(intverbosity, const char* format, ...) { ...
371 id. The printing function can simply consult the list of active channels and only print the message if the specifi ed channe ...
372 9. Tools for Debugging and Development z Gameplay script(s) that were running at the time of the crash. (This can be especia ...
373 Figure 9.1. Visualizing the line of sight from an NPC to the player. 9.2. Debug Drawing Facilities also notice some debug te ...
374 9. Tools for Debugging and Development Figure 9.2. Visualizing the expanding blast sphere of an explosion. Figure 9.3. Spher ...
375 off , and the developer is given full control over the character’s move- ments and actions via a simple heads-up menu. The d ...
376 9. Tools for Debugging and Development □ coordinate axes (typically the x-axis is drawn in red, y in green and z in blue), □ ...
377 that draws the primitive is called rarely or intermitt ently (e.g., a func- tion that calculates the initial velocity of a p ...
378 9. Tools for Debugging and Development // Adds a set of coordinate axes depicting the // position and orientation of the giv ...
«
15
16
17
18
19
20
21
22
23
24
»
Free download pdf