Game Development Reference
In-Depth Information
Going further
Now, you are probably thinking at this point, "What about the rest of the battle?" Put
simply, I leave that up to you.
You are now armed with everything you need to know to be able to complete the rest of the
battle scene. You should not just stop there, however, and you should see just how far along
you can get.
Try expanding the battle to include various states using the following steps:
1. Add an onscreen GUI to inform that the control is now changing hands in the
Change Control battle state.
2. Loop through the Goblins and let them attack the player; rough him or her up a bit.
3. Check whether the battle is complete, and accordingly, either transition back to the
Player Move state or set the BattleReady state variable to false to transition
to the Battle Result state.
4. Display a 2D GUI to summarize the battle results and grant the user some experi-
ence, perhaps with some gold, each time an enemy is slain.
5. Transition back to the map when the battle is over.
Search WWH ::




Custom Search