Integrating the Example into a Real Game

We do not claim that the example is fast for game engines, but rather that it has a better set of techniques to speed up a game engine. Although implementing these techniques in a real game will take time, it will also require applying these techniques and perhaps some others. We want to do two things to validate the example:

  • Review the source structure of the game to determine which techniques we can apply and whether there are gaps in the techniques we need. The review must determine how much code restructuring is needed and the step-by-step sequence such that the game can be tested at each step.

  • Update the example code to model the structure of the game at each step, plus the performance modeling needed to see whether the expected performance and scalability will be attained if the code is transformed.

Spatially decomposing a k-d data structure may be appropriate for physics and scene management, but how can you provide good scalability for other game components? The answer is not clear. Let’s do a thought exercise. Suppose, for example, that online players only interact with players in the current neighborhood. Although they may see other players moving at a distance in other spatial domains, the group of players nearby have much more game play to be executed. It will be necessary to spread these closer players’ game-play structures across tasks to get speedup.

To achieve this, it would be necessary for:

  • The player’s space structure to be ...

Get Intel Threading Building Blocks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.