Breaking the Barriers with Flash
The main focus for any game is rich game play. Game players are now too comfortable with games developed for Microsoft's Xbox, Sony's PlayStation 2, and Nintendo's GameCube. Games such a Pong (shown in Figure 3) just don't cut it.
Figure 3 A basic version of Pong allows you to bounce a ball around the screen.
Flash MX brings developers the tools they need to build games for online audiences. To successfully achieve this, Flash needs to support the following:
Rich, engaging graphics
Files that can be easily and smoothly downloaded over the Internet
A playback device that can interpret the download movies
The first, and arguably most important, asset any games program must have is the capability to deliver rich and compelling graphics. Players want and expect to be transported to worlds such as those played in Myst, EverQuest, and Halo. These worlds are, for want of any other word, gorgeous.
From the first version back in 1996, Flash was developed to deliver broadcast-quality graphics over slow Internet connections. Flash allows for a huge number of graphic formats to be imported directly into it. Designers working in Photoshop, Illustrator, Freehand, or Fireworks can keep working with the tools they are comfortable with, knowing that their work will be usable in Flash.
However, Flash does have a favorite format. The core foundation of Flash's graphics engine is vector based. Vector graphics differ from the traditional graphics found on the Internet. When you arrive at a Web site and view an ad banner, you are interacting with either GIF or JPEG graphics. These two file formats were the first to be used extensively on the Internet. They are raster graphics, images built up pixel by pixel. Vector graphics are created mathematically.
The quality of the graphics created within Flash has prompted many cable and television studios to create their broadcast animations using Flash. This is a strong statement about the quality that you can expect with Flash graphics; Flash truly delivers broadcast-quality images over the Internet.
Small File Size
Inherently, the Internet is slow. Flash MX addresses this with compressed movies that can be easily slowed down through dial-up connections (see Figure 4).
Figure 4 The collision detection used in this games utilizes very little ActionScriptthe final file is only 10Kb.
Typically, a game consists of a number of components: the core Flash movie, sound clips, video clips, code, additional Flash movies, and graphics. Packaging all of these components into a single file makes for a large movie. A way around this problem in Flash 35 was to build a lot of Flash movies with chunks of the game embedded. These additional Flash movies then could be programmatically imported directly into the main Flash movie. The concept was good but not very efficient.
Flash MX allows you to chunk out not only the main movies, but also the different media types for your game. This means that each file can be downloaded on demand. The end result is a more efficient game designed for an online community.
The types of files that can be downloaded on demand within your Flash movies are as follows:
SoundMP3, AU, and AUF audio files can now be loaded into a Flash movie through ActionScript.
VideoVideo, such as Shock Video and DAT video, can also be loaded directly into Flash.
JPEG graphicsArguably the most important improvement to the Flash Player (the tool that does all of the loading and unloading of files on the client's computer) is the capability to pull in JPEG graphics. Unless you have been using Generator, a server tool that creates dynamic Flash movies from database content, you previously had no way of dynamically linking JPEG graphics into a Flash movie.
CodeYou can break up your code so that you can reused it repeatedly as files that can be downloaded off your Web site. This makes it easier to work with code (see Figure 5).
Figure 5 These are just some of the files you will use to construct a Web site.
Compact graphics, movies, and components are all great, but they would all fall on their knees if the playback device could not play all this great material. The Flash Player is the guts that does all of the donkey work for the client. It is often referred to as a plug-in, a device that extends the performance of the users' Web browser.
The success of the Flash Player goes completely down to the player's small file size. If your users are running Microsoft's Internet Explorer, the Flash Player can be downloaded and installed for less than 500Kb; Netscape Navigator users have only a 750Kb file to download. Typically this takes less than a minute to download over a standard dial-up connection, and it is almost instantaneous for faster connections.
The staggering speed at which the Flash 5 Player has penetrated Web users is an example of how effortless it is to download and install. More than 414 million people today have the Flash Player installed. Remarkably, it went from 0 installs to more than 200 million installs within 6 months of Flash 5 being released. The Flash 6 Player did the same results in three months. This means that more than 98% of all Internet users can access the games you create. If they are using Netscape Navigator 26 or Internet Explorer 26, they will be able to view your content (see Figure 6).
Figure 6 Shockwave.com is a great place to find out about new online Flash and Shockwave games.
The Flash Player also is not just for PC users. In England, nearly 50% of the country was projected to be accessing the Web through digital TV systems by the end of 2002 (Forrester Research). Each of these systems is Web-enabled with, you guessed it, a Flash Player.
PDAs, the side companions of executives everywhere, now also support the Flash Player. Several versions of Windows PocketPC have the Flash Player embedded as a standard feature. The list of potentials seems to go on and on.
Flash games can be developed for Web sites, interactive TV, and handheld devicesno need to learn multiple languages.
Consistent User Interface
Being comfortable with the tools you use is paramount to the success of any project. This is largely why Macromedia has a consistent user interface among all of its products. Online games are developed not only in Flash; you will need to move among a series of tools, such as Freehand, Dreamweaver, and Fireworks, to execute the complete online solution. The types of tools you will use fall into the three main areas of game development:
- Game design
- Game development
- Game hosting
Figure 7 The construction of the jigsaw game.
Most of the game development you will be doing will take place in Flash. This is because Flash has the tools that enable you to import graphics created with Freehand and Fireworks and then place them into a movie.
Flash movies themselves can also be imported directly into Director, which in many ways is a parent tool to Flash. What Flash cannot do, Director generally can. There is a price to this, however: Director files tend to be much large than Flash movies, the Shockwave Player (the device used to play back Director movies) plays on only a limited number of platforms, and the player itself is much larger to download. With this said, Director can be leveraged to build impressive interactive presentations (see Figure 8).
Figure 8 Director uses a cast instead of a library to manage assets in a game.
The final stage in the development of a game is hosting. With a CD-ROM or console game, the game is run from the system. With Flash-enabled games, your system is a Web server.
Dreamweaver MX is the definitive tool you will need to create the Web pages that will host your games. Again, as with Freehand and Fireworks, you will see that the interface is similar to Flash (see Figure 9)panels and tools cross over. Here, the focus of the product is to build Web sites.
Figure 9 Here you can see Dreamweaver being used to edit ActionScript.