|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Flash Illustrating with Flash MX 2004
Game Techniques, from Chapter 9
By: Adobe News Desk
Oct. 18, 2004 12:00 AM
Graphics created for games published in Macromedia Flash cannot be illustrated or animated as usual. One must understand that most games developed in Flash can be processor-intensive, with quite a bit of user interaction and several animations playing at once, which means your graphics and animations must be optimized. Since most of these games are served up over the Internet, by keeping an optimized approach you will be able to deliver a more streamlined gaming experience. To streamline your game graphics creation several concepts have been developed, like formatting button creation and color change, making the production process more automated. We will also be reviewing how preparing your game graphics as many separate game pieces plays an important role in game creation. Game Pieces Hero Character Where Macromedia Flash comes into the picture is once you have scanned your drawings and they are imported into the program as raster graphics to be traced with the Line tool or Brush tool. In this case, the Brush tool was used to trace the sketch, yet the strokes of black color had to be optimized several times to the final drawing you see in Figure 9.2. Since this character graphic is quite small the Zoom tool was used to zoom up close to trace and zoom back out 100% to view exactly what the user will see. This has to be done since small intricate vector graphics appear clean and sharp up close but can look aliased and a bit different in shape if viewed at 100%. This is just one of the quirks of working with fills in Flash. Just remember, whatever you see at 100% is what the user will see, so that is what matters. Once the illustration is fully outlined, colors are chosen with the Color Mixer and the colors are applied with the Paint Bucket tool, as shown in Figure 9.3. Another rule of thumb is that with creating small graphics like this one linear and radial gradients are not noticeable. Plus the more gradient and alpha fills used, the more processor-intensive your graphic or animation can be to the gaming experience, so solid fills will work just fine. Villain Character Then the drawing was scanned in and imported into Flash where it was traced with the Brush tool and optimized to get a result as shown in Figure 9.5. Now that the character is fully outlined, colors are chosen and applied, as shown in Figure 9.6. Buttons Made Easy The basic concept is that a button is made up of three distinct parts, as shown in Figure 9.7. The three parts are the text, end piece, and body. The end piece and body are symbols so when they are used more than once we save on file size. The end piece is duplicated, flipped horizontally, and moved to the opposite side of the body of the button. The text is placed in the center of the body and changed to the appropriate color, as shown in Figure 9.8. The two end pieces are connected to the ends of the body by using the Selection tool with Snap to Objects feature on; that way the end pieces are connected precisely, as shown in Figure 9.9. Well, that takes care of one button, but what about the others you have to create? Using this first button as your template when making the others, just follow these two easy steps. Let us say the next button you need to make has to say "Character Selection." First, change the text from "Submit" to "Character Selection." If you are working with white text on a white background feel free for the time being to changing the color of the text to black. Make sure when you retype the text that it is justified left; that way we will be scaling the button in one direction, to the right. Now take the right side end piece and move it to the right, as shown in Figure 9.10. Use the Selection tool to select it and use the right arrow key on your keyboard while holding down the Shift key to move it quickly to the right. With the body of the button selected use the Free Transform tool to scale the body to the right. Make sure the center point of the Free Transform manipulator is snapped to the left side of the body, as shown in Figure 9.11. That way when you scale the body to the right, only the right side of the body will scale. After following those two quick steps you should have a similar result as shown in Figure 9.12. Color Change In Figure 9.14 we point out the second color symbol which we will set to the color of the character's eyes, teeth, and mouth. Analyze the layer setup as shown in Figure 9.15, which shows how the alien symbol is architected, to better understand the setup of how this color change works. Notice at the bottom of the symbol you have the COLOR skin layer which sets the color the skin will be. If you set the graphic on this layer to blue the character will look blue. The skin layer contains the different alpha fills which define the light and dark shades of the character. The COLOR eyes and teeth layer contains the symbol which sets the color the eyes and teeth will be. On the eyes, teeth layer you have the different alpha fills which define the light and dark shades of the character. The black lines layer contains the black outlines of the character. These graphics are not affected by any of the color changes. Another way to visualize the setup is through a visual diagram of how the layers and graphics are compiled, as shown in Figure 9.16. For better understanding the black outlines have been placed in the back of this diagram. Notice how the alpha graphics are placed on top of the colored graphics. That way, when we change the color of the colored graphics you still have the alpha graphics defining the lightness and darkness of the color. See how the alpha skin layer has two different values of alpha black fills, making the feelers of the alien a darker shade of color than the tentacles of the character. By setting the Color Styles drop-down menu to Advanced and manipulating the color settings you can come up with many different variations of the same character. The Color Style drop-down box is located in the Properties panel once the color symbol is selected. Background and Graphics Build From Pieces Change the color of the pasted lines and move them over with the right arrow key and connect it to the right side, as shown in Figure 9.20. We changed the color of these lines so when we decide to delete them all we have to do is double-click on them and only those lines will be selected because they are a different color from the rest. Now finish the texture on the right and make sure to connect the new line to the lines we pasted from the left and we should have something similar to Figure 9.21. To color your texture just create a simple radial gradient and apply it with the Paint Bucket tool. Make sure the gradients on the left side of the texture will match up with the textures on the right side. To make sure they all match up use the same technique as used with the line drawing, but apply it with gradient fills. You should have a final colored graphic as shown in Figure 9.22. To show how this texture tiles across several pieces snap together several of them, as shown in Figure 9.23. If you can notice where they connect from viewing the textures at 100%, go back and make the minor adjustments needed. To create the platforms and prepare them so they can be scaled horizontally without much distortion we will be using a technique similar to what we used on the buttons earlier in this chapter. The problem is in a game many different-sized platforms are needed and to create a new platform for every size will increase your file size and we do not want that. So the technique is to create a center piece which can be scaled horizontally and an end piece which is duplicated and repositioned horizontally based on the length of the platform, as shown in Figure 9.24. The end piece is duplicated and repositioned to the left, as shown in Figure 9.25. Select the left end piece and flip it horizontally by selecting the following menu items: Modify > Transform > Flip Horizontal. Then select each end with the Selection tool and snap them to each end of the center platform piece, as shown in Figure 9.26. By scaling the center graphic horizontally and repositioning the end pieces you can create any size platform you desire. As shown in Figure 9.27 many different sizes are possible and since we are only using two different symbols you can create many platforms without increasing the file size much. Large Backgrounds To create the horn graphic you should start by using the Line tool to draw the outline of the object, shown in Figure 9.28. Notice extra lines are drawn in the center of the horn; these lines will divide where the different gradient fills will be placed to define the curvature of the horn. Create two radial gradients, both the opposite of each other; one has the darker color on the inside and the other has the darker color on the outside. Apply the radial gradients with the Paint Bucket tool and position them as they are shown in Figure 9.29 with the Fill Transform tool. Figure 9.29 Two radial gradients are created and applied. To add a final touch to make the graphic look a bit scary, you could add some red light coming from the bottom of the object. To do that, select the fills we just finished coloring and copy and paste them in place on a new layer above the previous one we were just working on. Select the new graphic and change the color to an alpha red linear gradient. That way we can see through it, as shown in Figure 9.30. A detailed description of this new linear gradient is as follows: the left color swatch's HEX value is #990000, alpha 75% and the right color swatch's HEX value is #990000, alpha 0%, as shown in Figure 9.31. Optimized Animations Character Animation Of course, by reusing the different body pieces many times because they are symbols we save on file size, versus if each frame of animation was a completely new graphic. As shown in Figure 9.33, the key frames of the character shooting require the body pieces to be used many different times. Special Effects Summary
ISBN: 1584503157 Reprinted with permission of publisher Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||