Game Development Reference
In-Depth Information
9 . The state design pattern allows the behavior of one specific state to be en-
capsulated in its own separate class. This allows states to become reusable
and/or interchangeable. It also means that the “controller” class can be far
more clean than in the alternative enumeration implementation.
10 . A strategy is the overall vision for an AI player. A common approach is to
break down the strategy into several goals that, when prioritized, can then
be achieved by the AI through discrete plans.
Chapter 10: User Interfaces
1 . A menu stack provides a couple different benefits. First of all, it ensures
that the user can easily return back to a previous menu by popping the
current menu off of the stack. Furthermore, it allows multiple UI elements
to be drawn on top of each other, such as when a dialog box pops up to
confirm/reject a particular action.
2 . Letter key codes are typically sequential, so the key code for C is one after
the key code for B, which is one after the key code for A, and so on. This
property is helpful because you can check whether a key code is within
the range of A through Z and then simply subtract the key code for A
from it. This gives the letter offset in the alphabet and can then be added
to the character “A” to get the appropriate character.
Search WWH ::




Custom Search