Chapter 15. Ice World: A Platform Game


graphics/15infig01.gif

Game Overview

The XML and the Level Editor

Game Structure and Resource Files

Game Code

Possible Game Enhancements

Points to Remember

You are probably familiar with Super Mario Brothers one of the most popular games ever created. While Super Mario Brothers was not the first platform game, it is certainly the one on which most platform games are based. Even though advancements in game technology allow for fully interactive 3D multiplayer games, this basic style of 2D side-view game is still very popular. In this chapter we dissect Ice World, a platform game whose rules were inspired by those of Super Mario Brothers. A platform is an object on which a character can stand, and a platform game is a game that features many such objects. You will get an inside look at the ActionScript used for a game like this. There is a lot of ActionScript, but for the most part it is organized into several very simple functions. I have also created a level editor for this game, with which you can easily create levels for Ice World. We will not discuss the ActionScript in the editor, but we will look at how to use the editor.

Prerequisites

Chapter 4, "Basic Physics." The main character in this game runs, jumps, and slides. You need an understanding of velocity, "good-enough" gravity, and "good-enough" friction to fully understand the ActionScript in this game.

Chapter 5, "Collision Detection." In this game the character can run and jump onto floating platforms, run into or jump onto enemies, and collect ice cubes. You need collision detection to perform these tasks. In reviewing Chapter 5, pay attention to the most simple collision-detection techniques, such as hitTest() and rectangle-rectangle, since those are the only ones used here.

Chapter 11, "Graphics in Games." This chapter is important if you want to understand how the graphics for this game were created. However, it is not necessary for understanding the ActionScript.

Appendix D, "XML Basics in Flash." For complete flexibility, each level in Ice World is stored as XML-formatted data in individual XML files. Knowing how the XML is formatted and parsed by the game is not crucial to understanding the game itself, but it is important for understanding how you can easily make dozens of levels for a game.



Macromedia Flash MX Game Design Demystified(c) The Official Guide to Creating Games with Flash
Macromedia Flash MX Game Design Demystified: The Official Guide to Creating Games with Flash -- First 1st Printing -- CD Included
ISBN: B003HP4RW2
EAN: N/A
Year: 2005
Pages: 163
Authors: Jobe Makar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net