Game Engine Architecture
219 of memory. So if we are going to support memory defragmentation in our game engine, programmers must either carefully keep t ...
220 5. Engine Support Systems blocks to be shift ed each frame, for some small value of N like 8 or 16. If our game is running a ...
221 cache line from main RAM, or when the program explicitly requests a fl ush to occur. Obviously cache misses cannot be totall ...
222 5. Engine Support Systems A load-hit-store is a particularly bad kind of cache miss, prevalent on the PowerPC architectures ...
223 Therefore, functions in a single translation unit are always contiguous in memory. That is, the linker never splits up a co ...
224 5. Engine Support Systems Linked list. An ordered collection of elements not stored contiguously in memory but rather linke ...
225 5.3.1. Container Operations Game engines that make use of container classes inevitably make use of vari- ous commonplace alg ...
225 5.3.1. Container Operations Game engines that make use of container classes inevitably make use of vari- ous commonplace alg ...
226 5. Engine Support Systems for (int* p = pBegin; p != pEnd; ++p) { int element = *p; // process element... } } void processLi ...
228 5. Engine Support Systems tion. If an algorithm executes a subalgorithm n times, and the subalgorithm is O(log n), then the ...
229 Elimination of external dependencies. Since you built the soft ware your- self, you are not beholden to any other company o ...
230 5. Engine Support Systems However, the STL also has numerous drawbacks, including: STL has a steep learning curve. The docu ...
231 The Medal of Honor: Pacifi c Assault engine for the PC made heavy use of STL, and while MOHPA did have its share of frame ra ...
232 5. Engine Support Systems bug, it will ultimately be your team’s responsibility to work around it or fi x it. Backward comp ...
233 The easiest way to implement a dynamic array is to allocate an n-element buff er initially and then grow the list only if an ...
234 5. Engine Support Systems and previous pointers appropriately as well. There are four cases to handle when adding a node to ...
235 template< typename ELEMENT > struct Link { Link<ELEMENT>* m_pPrev; Link<ELEMENT>* m_pNext; ELEMENT* m_pEle ...
236 5. Engine Support Systems template< typename ELEMENT > struct Link { Link<ELEMENT>* m_pPrev; Link<ELEMENT> ...
237 turns out, there are some distinct benefi ts to using an instance of class Link to manage the head and tail of the list, lik ...
238 5. Engine Support Systems link.m_pPrev = link.m_pNext = NULL; } The code is a bit simpler when we use the m_root design: voi ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf