Game Development Reference
In-Depth Information
￿
Private methods and variables are accessible only from inside
their class and are not inherited.
￿
Internal methods and variables are accessible from all classes
within their package.
There is one other attribute, known as static,whichcanwork
with any of the other four listed above. When a method or vari-
able is static, there is only one copy of that item ever created and
it is accessed through the class directly, not objects created from
the class. In other words, a static property called
of the
class Game would be accessed as Game.version. If you tried to
access it from an instance of the game class, you would get an
error.
version
Game-Specific Development Terms
Now, we move onto more interesting development terminology.
This section covers concepts that we will be directly applying as we
build games in future chapters.
Artificial Intelligence (AI)
AI refers generically to a set of logical decisions that a program can
make to mimic human decision making. AI can be very simple
(likehavingthecomputermovethepaddletowardtheballina
game of Pong) or extremely complex (like having enemies duck for
cover, understand when they
re in danger, and react accordingly in
Halo 2). For our purposes in this topic, and because Flash would
notbeabletohandleitotherwise,mostoftheAIwedevelopwill
be relatively uncomplicated.
'
Game Loop (or Main Loop)
This term generally refers to the main segment of code that deter-
mines the next course of action for a game based on input, AI, or
some other arbitrary logic. It usually is nothing more than function
calls to other pieces of logic and checking to see if certain conditions
have been met (such as whether or not a player has won).
Here is an example of pseudocode describing a simple main
loop from a game:
on enter frame
move player
move enemies
check for collisions
check for win or lose
Search Nedrilad ::




Custom Search