Game Development Reference
In-Depth Information
6 - Dragon Realm
We went through the source code from top to bottom. If you would like to go through the
source code in the order that the execution flows, then check out the online tracing web site
for this program at the URL http://inventwithpython.com/traces/dragon.html.
Designing the Program
Dragon Realm was a pretty simple game. The other games in this topic will be a bit more
complicated. It sometimes helps to write down everything you want your game or program
to do before you start writing code. This is called "designing the program."
For example, it may help to draw a flow chart . A flow chart is a picture that shows
every possible action that can happen in our game, and in what order. Normally we would
create a flow chart before writing our program, so that we remember to write code for each
thing that happens in the game. Figure 6-2 is a flow chart for Dragon Realm.
Figure 6-2: Flow chart for the Dragon Realm game.
To see what happens in the game, put your finger on the "Start" box and follow one
Search WWH ::




Custom Search