Game Development Reference
In-Depth Information
size. ''Overwhelming'' will mean different things to different programmers, and
it will change for the same programmer in different parts of his or her career. An
evaluation of what is too complex should be made in real time by the people who
have to deal with the code. Hard and fast rules in this area are suspect, but in
general you should take pains to organize your code and be wiling to refactor it
Refactoring means that you improve the internal structure of the code without changing its
external function. It's saying ''knowing what I know now, and knowing what I have to change in this
code today, I should have written it differently,'' and then taking the time to rewrite it accordingly.
Refactoring might not get rid of complexity, but it should make it more
manageable. The ability to visualize complex software is a very saleable skill.
Companies seek and attempt to retain programmers who can keep a clear picture
of a large and complex program in their heads and reason about it, but all people
have limits.
The projects for this chapter are based on the AI for a series of household
thermostats. While the simplest of thermostats hardly requires a computer, the
most sophisticated thermostats certainly depend on the tiny computers inside
If you are new to using Visual Studio, you may want to review the projects in Chapter 1 before
At first blush, a thermostat may seem to be far removed from game AI. But
although it may not seem like it does, a thermostat does meet our definition of an
AI insofar as it reacts intelligently to changing conditions. Yes, game AI tends to
bring to mind images of the clever, hard-to-overcome bosses found on the last
level of a 40-hour game. It is worth noting, however, that such games do not start
with the boss level—and for good reason. So it is with learning to program AI.
AI game programmers are responsible for turning what would otherwise be a
museum walkthrough into an entertainment experience. Their tasks include
programming many small, less obvious decision-making capabilities, such as
camera AI.
Search Nedrilad ::

Custom Search