Algorithms and Networking for Computer Games

Jouni Smed, Harri Hakonen




Algorithms and Networking for Computer Games is an essential guide to solving the algorithmic and networking problems of modern commercial computer games, written from the perspective of a computer scientist. Combining algorithmic knowledge and game-related problems, the authors discuss all the common difficulties encountered in game programming.

The first part of the book tackles algorithmic problems by presenting how they can be solved practically. As well as "classical" topics such as random numbers, tournaments and game trees, the authors focus on how to find a path in, create the terrain of, and make decisions in the game world. Part two introduces networking related problems in computer games and focuses on three key questions: how to hide the inherent communication delay, how to utilize limited network resources, and how to cope with cheating.

Algorithms and Networking for Computer Games provides a comprehensive resource that offers deeper algorithmic insight into game programming and explains game-specific network considerations. Read on for...
* Algorithmic solutions in pseudo code format, which not only emphasizes the idea behind the solution, but also can easily be written into the programming language of your choice.
* A section on the Synthetic player, covering decision-making, influence maps, finite-state machines, flocking, fuzzy sets and probabilistic reasoning.
* In-depth treatment of network communication including dead reckoning, local perception filters and cheating prevention.
* 51 ready-to-use algorithms and 178 illustrative exercises.

Algorithms and Networking for Computer Games is a must-read text for advanced undergraduate and graduate students on computer game-related courses, postgraduate researchers in game-related topics, and game developers interested in new approaches and the theoretical background to games.


Table of Contents

List of Figures.

List of Tables.

List of Algorithms.



1. Introduction.

1.1 Anatomy of Computer Games.

1.2 Synthetic Players.

1.3 Multi-playing.

1.4 Games and Storytelling.

1.5 Other Game Design Considerations.

1.6 Outline of the Book.

1.7 Summary.


I: Algorithms.

2. Random Numbers.

2.1 Linear Congruential Method.

2.2 Discrete Finite Distributions.

2.3 Random Shuffling.

2.4 Creating GameWorlds.

2.5 Summary.


3. Tournaments.

3.1 Rank Adjustment Tournaments.

3.2 Elimination Tournaments.

3.3 Scoring Tournaments.

3.4 Summary.


4. Game Trees.

4.1 Minimax.

4.2 Alpha-Beta Pruning.

4.3 Games of Chance.

4.4 Summary.


5. Path Finding.

5.1 Discretization of the GameWorld.

5.2 Finding theMinimum Path.

5.3 Realizing theMovement.

5.4 Summary.


6. Decision-making.

6.1 Background.

6.2 Finite StateMachines.

6.3 Flocking.

6.4 InfluenceMaps.

6.5 Summary.


7. Modelling Uncertainty.

7.1 Statistical Reasoning.

7.2 Fuzzy Sets.

7.3 Fuzzy Constraint Satisfaction Problem.

7.4 Summary.


II: Networking.

8. Communication Layers.

8.1 Physical Platform.

8.2 Logical Platform.

8.3 Networked Application.

8.4 Summary.


9. Compensating Resource Limitations.

9.1 Aspects of Compensation.

9.2 Protocol Optimization.

9.3 Dead Reckoning.

9.4 Local Perception Filters.

9.5 Synchronized Simulation.

9.6 Area-of-interest Filtering.

9.7 Summary.


10. Cheating Prevention.

10.1 Technical Exploitations.

10.2 Rule Violations.

10.3 Summary.


A. Pseudo-code Conventions.

A.1 Changing the Flow of Control.

A.2 Data Structures.

A.3 Format of Algorithms.

A.4 Conversion to Existing Programming Languages.