|
General Game Programming: All Articles
Custom Tool Design for Game AI |
Abstract: Artificial intelligence systems in games have become so complex that often one engineer cannot write the entire structure alone. Using the Basketball Artificial Intelligence Tool (BAiT) we were able to integrate the artificial intelligence for NBA 2007 based entirely upon designer data entry and manipulation. While this approach has many positives there are also some drawbacks to implementing a system like this. There are also some necessary precautions that one should take before even attempting this process.
Using STL and Patterns for Game AI | |
Abstract: Game AI programmers are notorious for reinventing the wheel. But many of the data structures, algorithms and architectures they need have already been done in flexible and reusable ways. This article is intended to serve as a reference for a variety of patterns. While entire volumes have been written to discuss the STL and design patterns in general, this article will provide an introductory overview of the STL and inspect those specific design patterns that have proven the most useful in game AI development. We need to talk about the STL because it provides a series of pre-defined data structures that will not only make life simpler, but which take much of the burden of nuts and bolts implementation away and allow the AI developer to focus on what's really interesting anywaythe AI.
Strategies for Multi-Processor AI |
Abstract: With multi-processor hardware becoming commonplace, it is necessary to develop a new architecture that allows the AI engine to execute in parallel in multiple threads. We describe several approaches that try to minimize dependencies and avoid locking, in order to build an efficient concurrent system, while keeping productivity high and preventing threading bugs.
Scripting Language Survey |
Binding C/C++ Objects to Lua |
| |
Waldemar Celes (PUC-Rio), Luiz Henrique de Figueiredo (Institute for Pure and Applied Mathematics), Roberto Ierusalimschy (PUC-Rio) Game Programming Gems 6 |
Programming Advanced Control Mechanisms with Lua Coroutines |
| |
Waldemar Celes (PUC-Rio), Luiz Henrique de Figueiredo (Institute for Pure and Applied Mathematics), Roberto Ierusalimschy (PUC-Rio) Game Programming Gems 6 |
Managing High-Level Script Execution Within Multithreaded Environments |
Utilizing Multicore Processors with OpenMP |
Computer Vision in Games Using the OpenCV Library |
| |
Arnau Ramisa (Institut d�Investigaci� en Intellig�ncia Artificial), Enric Vergara (Universitat Polit�cnica de Catalunya), Enric Mart� (Universitat Aut�noma de Barcelona) Game Programming Gems 6 |
Geographic Grid Registration of Game Objects |
Closest-String Matching Algorithm |
Using CppUnit To Implement Unit Testing |
Fingerprinting Pre-Release Builds To Deter and Detect Piracy |
Faster File Loading with Access-Based File Reordering |
Stay in the Game: Asset Hotloading for Fast Iteration |
Using Templates for Reflection in C++ |
Sphere Trees for Speedy BSPs |
CSG Construction Using BSP Trees |
An Effective Cache-Oblivious Implementation of the ABT Tree |
A Generic Component Library |
A Real-Time Remote Debug Message Logger |
Improving Freelists with Policy Based Design |
Parsing Text Data in Games |
Component Based Object Management |
A Transparent Class Saving and Loading Trick |
Visual Design of State Machines |
Context-Sensitive HUDs for Editors |
Choose Your Path - A Menu System |
Designing a Vulgarity Filtering System |
Batching 4EVA (GDC2005 D3D Tutorial) |
Massively Multiplayer Scripting Systems |
Real-World MMO Object Sharing |
Automated Testing for Online Games |
Metrics Collection and Analysis |
Creating an Audio Scripting System |
A System for Managing Game Entities |
A Flexible, On-the-Fly Object Manager |
Using Custom RTTI Properties to Stream and Edit Objects |
Using XML without Sacrificing Speed |
The Science of Debugging Games |
Fight Memory Fragmentation with Templated Freelists |
An HTML-Based Logging and Debugging System |
The Clock: Keeping Your Finger on the Pulse of the Game |
Desiging and Maintaining Large Cross-Platform Libraries |
The Beauty of Weak References and Null Objects |
A Generic Tree Container in C++ |
Address-Space Managed Dynamic Arrays for Windows and the Xbox |
Zobrist Hash Using Mersenne Twister |
Shader Visualization Systems for the Art Pipeline |
| |
Homam Bahnassi and Wessam Bahnassi ShaderX3 |
An Extensible Direct3D Resource Management System |
Optimized Script Execution |
Abstract: The slow speed with which script languages are executed (compared to native code) places many limitations on a script language's potential applications. Previously only infrequently executed code placed outside of the game's inner loops has been deemed suitable for scripting, and for this reason script languages have typically only been used for story telling or customizable event-handling purposes.
Using optimization techniques presented in this article, it possible to increase script execution efficiency to near-native performance levels, enabling the use of scripting in the game's core logic, or even in a high performance 3D rendering system. The flexibility gained from switching to script-based logic means that even modifying a program's innermost mechanics is trivial, and does not come with the performance penalties one would expect.
Three stages of script execution are individually examined, and optimizations for each are presented. The techniques and principles presented can be easily applied to any existing scripting engine.
Advanced Script Debugging |
Abstract: Poor or missing script debugging facilities are among the principal reasons for scripts not being fully exploited in a development environment. Often, errors encountered during script execution result in crashes of the game or a "screen of death" style representation of the virtual machine's internal state just after the crash has occured.
In-depth knowledge of the virtual machine is required to interpret such information, and often the virtual machine's source code needs to be examined in order to identify the problem, which may have been caused by a virtual machine command executed long before the crash. Because all external developers (including the mod community) and most in-house script programmers lack this in-depth information, they will restrict their programming style to simple constructs that can be fixed using a trial and error process in case of a problem. Therefore even the most powerful script languages are doomed to be misused if they do not support proper debugging mechanisms.
This article shows how to incorporate known debugging capabilities from common development environments into your script system, giving your script designers and the mod community the ability to create complex scripts and use the language to its full extent, while also shortening the development period because of improved debugging capabilities for scripts.
Adding Error Reporting to Scripting Languages |
Abstract: Custom scripting languages are a controversial game development tool. Scripting languages empower non-programmers by moving game AI logic out of the C++ code. While this empowerment certainly comes with some risks, the benefits are that additional team members can create behaviors, designers can tweak AI more directly, and the AI logic is more accessible to the mod community. The most common complaint about scripting languages is that they are difficult to debug. This concern is exacerbated if non-programmers intend to write scripts. If the scripting language compiler or interpreter only gives feedback like "syntax error," non-programmers are not going to get very far. Fortunately, this problem is easily solved. The same techniques used to define the grammar of valid syntax can be used to identify and report scripting errors in plain English. This article describes how to harness the power of Lex and Yacc to generate meaningful errors when compiling scripts. The article includes C++, Lex, and Yacc code for a simplistic language called Simple.
Empowering Designers: Defining Fuzzy Logic Behavior through Excel-Based Spreadsheets |
Abstract: Putting game development back into the hands of the game's designers is critical to keeping a project on schedule. How does that happen? What is the easiest way to let a game designer work on their own with a minimum amount of interaction from a technical source? Using Visual Basic for Applications and some basic applications, it is possible to design an interface which does both of these things, as well as having the added benefit of letting finished code stay finished.
A Modular Camera Architecture for Intelligent Control |
Abstract: Cameras play a vital role in the user experience of any game. A robust camera solution can make the difference between a game that is awkward to play and a game that plays smoothly and feels great. Unfortunately, cameras tend to be a low priority item in many game development schedules and the effort is limited to the point where the cameras stop being a nuisance. One of the reasons that the efforts stop early is the lack of a solid architecture that allows rapid, data driven experimentation with camera behaviors.
This article presents a component based camera architecture that allows non-programmers to take over the development of cameras at the point where they make the transition between technical coding and creative effort. The architecture will demonstrate the use of common AI techniques to enhance the robustness and creativity of the camera solution for any game. The techniques presented in the article will primarily benefit games that have a third-person perspective, but will also provide useful tips for other types of games.
Unit Testing for Massively Multiplayer Games |
Writing a Fast, Efficient, Fixed-Size Object Allocator |
Creating a �Safe Sandbox� for Game Scripting |
Precise Game Event Broadcasting with Python |
Relational Database Management Systems Primer |
Leveraging Relational Database Management Systems to Data-Drive MMP Gameplay |
Data-Driven Systems for MMP Games |
Managing Game State Data Using a Database |
A General Purpose Trigger System |
Abstract: This article describes the implementation of a general-purpose centralized Trigger System. A Trigger System is used to keep track of events in the game world, and to optimize processing agents need to perform to recognize these events. Centralizing the Trigger System allows for culling by priority and proximity before delivering Trigger events to agents. The article and companion CD include working code for a stimulus-response Trigger System. Enhancements are discussed to extend the system to handle processing a grouping hierarchy of agents, in addition to individual agents.
Scripting: Overview and Code Generation |
Scripting: The Interpreter Engine |
Scripting: System Integration |
Creating Scripting Languages for Non-Programmers |
Scripting for Undefined Circumstances |
Abstract: Games are increasingly allowing the player to set the agenda. Want to while away hours mucking around with the game physics by throwing rocks into crowds of villagers? No problem! On the other hand, a strong storyline helps to inform the player of their goals, and provides a context for their actions. Traditionally, storylines in games have been advanced via cinematic sequences, and it is common for these to be displayed using the game engine. Can we resolve the conflict that occurs when we simultaneously afford the player the freedom to set the agenda and the game designers the ability to impose a storyline? What if a crucial moment in the story depends on the presence of the harmless little villager that the player unthinkingly threw into the ocean at the beginning of the game? Even worse, what if a non-player character under AI control intrudes into a cinematic sequence and begins to wreak havoc? In this article we discuss the features that were implemented in the game "Black & White" to allow the game designers to create storyline-advancing "Challenges" without compromising the unpredictable nature of the game.
The Perils of AI Scripting |
Abstract: Scripting is an enormously popular technique for developing game AI systems, but it can also be enormously dangerous. This article describes some of the considerations that you should think about very carefully before you jump on the scripting bandwagon, many of which you might not otherwise discover until it's too late. We also describe a number of the things that can go wrong when your lofty scripting language ambitions collide with the realities of game development.
How Not To Implement a Basic Scripting Language |
Abstract: This paper goes into some of the mistakes that were made while writing the scripting languages for Baldur's Gate and Neverwinter Nights. The four major points, which are covered with anecdotes: the lack of up-front design, ignoring early-adopter feedback, believing the code will only be used for one project, and believing the language will be used for one specific task.
Building an AI Diagnostic Toolset |
Abstract: This article describes invaluable techniques that real developers use to tweak, test, and diagnose their AI during the development cycle. We describe literally dozens of specific ways you can instrument your AI to help you tweak and test it more quickly and figure out what's wrong when your AI breaks.
Testing Undefined Behavior as a Result of Learning |
Abstract: We consider learning to be the essence of Artificial Intelligence. Non-player characters, when granted the ability to learn, are given the potential to surprise and entertain the player in completely unexpected ways. This is very reinforcing from the player's point of view, but a nightmare for a testing department. How can they assure the quality of a game that may behave completely differently depending on the who's playing it? In this article we show, via a case study of the computer game "Black & White", exactly how a testing department can achieve their goals when the product they're testing features unpredictable learning AI.
Platform-Independent, Function-Binding Code Generator |
Using Lex and Yacc to Parse Custom Data Files |
Lightweight, Policy-Based Logging |
Real-Time Hierarchical Profiling |
An Object-Composition Game Framework |
Programming a Game Design-Compliant Engine Using UML |
Developming Games for a World Market |
Finding Redeeming Value in C-Style Macros |
Handle-Based Smart Pointers |
Floating-Point Exception Handling |
Real-Time Input and UI in 3D Games |
Natural Selection: The Evolution of Pie Menus |
A Flexible Text Parsing System |
File Management Using Resource Files |
A Drop-in Debug Memory Manager |
A Built-in Game Profiling Module |
Game Input Recording and Playback |
Optimization for C++ Games |
Inline Functions Versus Macros |
Programming with Abstract Interfaces |
Exporting C++ Classes from DLLs |
Protect Yourself from DLL Hell and Missing OS Functions |
A Property Class for Generic C++ Member Access |
Adding Deprecation Facilities to C++ |
Linear Programming Model for Windows-based Games |
Using Web Cameras in Video Games |
Classic Super Mario 64 Third-Person Control and Animation |
Abstract: This article will deal with the basic issues of controlling and animating a character from a third-person perspective. While it seems straightforward enough (just copy Super Mario 64), it's not as trivial as it first appears. There are many small nuggets of wisdom that can often take weeks of trial and error to discover.
A Generic Handle-Based Resource Manager |
Resource and Memory Management |
Frame-Based Memory Allocation |
Object-Oriented Programming and Design Techniques |
Fast Math Using Template Metaprogramming |
An Automatic Singleton Utility |
Using the STL in Game Programming |
A Generic Function-Binding Interface |
Stats: Real-Time Statistics and In-Game Debugging |
Real-Time In-Game Profiling |
The Magic of Data-Driven Design |
Squeezing More Out of Assert |
|
|
|