Six Factory System Tricks for Extensibility and Library Reuse
5.3 Trick #1: Abstracting the Data Format
5.4 Trick #2: Encapsulating the Initialization Inputs
5.5 Trick #3: Consistent Object Construction and Initialization
5.6 Trick #4: Injecting External Code into the AI
5.7 Trick #5: Using Templates and Macros to Standardize Factory Definitions
5.1 Introduction
These days, many games employ a data-driven AI. In other words, the decision-making logic for the AI is not hardcoded in C++ but instead is placed in a configuration file (generally using XML or some similar format) and loaded at runtime. This ...
Get Game AI Pro 3 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.