Read Foundation Game Design with ActionScript 3.0, Second Edition Online
Authors: Rex van der Spuy
Figure 7-42.
Add a spark to the fuse with the Star Tool.
You could improve this effect by adding a Gaussian Blur from the Effects
Blur menu, but in this case the graphic is going to be so small it won't make any difference in the way that it appears on the stage in the final game.
Because it is such a small image, you need to make sure that that all the pixels are staying within the artboard's borders and that everything is properly aligned. Select View
Pixel Preview to see what the actual pixels of your image will look like. Illustrator does a decent job translating vectors into pixels, but it won't ever be as good as your own eye. You might find that bits of the image are sticking over the edge of the artboard, like the spark in Figure 4-43. If they are, nudge them back in. (You can use the arrow keys on the keyboard to do this very precisely. If you hold down Shift while pressing the arrow keys, you can move the object in larger increments.) Use Pixel Preview as an opportunity to reposition or reshape anything else that doesn't look quite right. When you're working with small graphics, which most game graphics will be, it's a good idea to switch on Pixel Preview intermittently during the design process to catch small issues like this quickly.
Figure 7-43.
Use Pixel Preview to reposition, realign, or reshape any odd looking shapes.
Lastly, save the file and create the PNG image.
Let's learn a few more useful Illustrator techniques by creating a simple game character.
The game character is made out of a few basic shapes, and you'll be able to use it as a starting point for your own ideas about how to make characters for your games.
Figure 7-44.
Draw the character's body with the Ellipse tool.
The game character needs a pair of shiny metallic antennae. In the next few steps, you're going to make the first antenna out of two components, group the components together, and attach it to the body.
In the Swatches panel, click the menu button in the panel's top right corner. Select Open Swatch Library
Gradients
Metals. This opens a panel of gradients that simulates the way light reflects off of different types of metals. Choose the Steel Radial gradient as a fill color for the oval. Set its stroke color to none.
Figure 7-45
illustrates what the oval shape should now look like.
Figure 7-45.
Draw an oval and fill it with a metallic gradient.
The Swatches Library has a wide range of different gradient pre-sets like this that you'll certainly find lots of use for when coloring your game objects. Spend some time exploring it when you have a chance.
Figure 7-46.
Distort the gradient so that it's about the same shape as the oval.
Draw a slightly angled tapered rectangle. Use the Convert Path Tool to curve its base. It should look a bit like
Figure 7-47
. This will become the antenna's base.
Figure 7-47.
Draw the antenna's base.
Set the new tapered rectangle's stroke color to none. Select the Eyedropper Tool and click the center of the oval you made in step 5. The tapered rectangle will now be filled with the same gradient as the oval, as you can see in
Figure 7-48
.
Figure 7-48.
Use the Eyedropper Tool to fill the base of the antenna with the same gradient as the oval.
Figure 7-49.
Reposition the gradient on the antenna's base.
Move the oval above the rectangle's tapered end and bring it to the front with the Object
Arrange
Bring to Front command. Select both shapes and group them together (Select Object
Group from the main menu.)
Figure 7-50
shows the result.
Figure 7-50.
Group the two components of the antenna together so that you can move them as a single unit.
You now have a nice metallic antenna you can stick onto your character's body.
Figure 7-51.
Attach the antenna to the body.