Game Development Reference
In-Depth Information
If you
re already familiar with PHP, I would highly recommend looking
into AMFPHP; it allows you to send binary data in Flash
rather than name/value strings. Because of this, it allows you to send and
receive typed results (i.e., a number comes back as a number, not as a
string), and the chunks of data are much smaller and faster. There are
examples of using AMFPHP in Chapter 15 and Appendix D.
Step 6 (Optional)
Diagram your classes using a UML Modeler. UML stands for Unified
Modeling Language and is the standard for planning complex soft-
ware through a visual process. Basically, it involves visually showing
the hierarchy of the classes you intend to create alongside each other,
with all the publicly available properties and methods listed along
with what they accept and return. You may be wondering,
would I want to do that? Why can
t I just get started typing code and
build it as I go?
The answer is simple; a UML diagram takes your
whole project into account in a single document. It is much easier to
make changes and correct inconsistencies and confusion in naming
conventions from this bird
s-eye view than once you
ve got a dozen
ActionScript files open and you
re trying to remember what the name
of the method you
re trying to call from one to the next. You can keep
the diagram handy as you work, and there are programs available,
which will take your completed diagram and turn it into actual
ActionScript class files complete with all the methods and properties
ready to be used! Figures 3.2 and 3.3 demonstrate how a visual layout
can become a set of ready-to-use class templates.
Now you
tant and helpful, why do you have it listed at the end as optional?
re probably wondering,
There are a couple of reasons for this. One reason is that for very
simple games on a tight timeline, a full-blown UML diagram may
yield low returns on time that could be better spent just knocking
out the code. If you
re pretty certain your game will only rely on a
couple of class files, UML is probably overkill. I very rarely use it in
my day-to-day work, but on occasion, it has been helpful. Second,
although many UML tool options exist, with a large number of free
offerings, I have yet to find one that I wholeheartedly recommend
for Flash development. Well, I take that back. The best UML tool
for ActionScript I
streamlined especially for this use; it was created in Flash so it will
run on any OS that supports the Flash player, and it will generate
code, as well as documentation. Unfortunately, it is several years
old and will only generate up to ActionScript 2 code, leaving AS3
developers like us in the cold. If you
ve ever used is Grant Skinner
re still doing work in AS2,
I highly recommend using it to model your classes.
Search Nedrilad ::

Custom Search