02.02.2013 Views

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6: Creating artwork for mobile devices<br />

blending, extensive gradients and complex vec<strong>to</strong>rs. Experiment with combinations of tweens, key<br />

frame animations and <strong>ActionScript</strong>-driven movement <strong>to</strong> produce the most efficient results. Test<br />

animations frequently on your target phones whenever possible and remember that 505i phones<br />

have a maximum swf file size limit of just 20 K.<br />

Creating content for mobile devices<br />

In 2003 the PocketPC market went over 10 million units and mobile phones were selling at the rate<br />

of over 400 million units per year. Although only a handful of the mobile phones are <strong>Flash</strong> enabled<br />

it is still a huge potential market waiting for the fun distraction of an enjoyable game. In Section 4<br />

we will look in more detail at how <strong>to</strong> make games for these devices but in this chapter we are<br />

considering the artwork implications. ‘Examples/Chapter06/Conker01.fla’ is a short animation<br />

developed originally for the web. At only 56 K it is <strong>to</strong>tally suited <strong>to</strong> the PocketPC but it uses<br />

gradients and was originally designed <strong>to</strong> be seen at a resolution of 550 × 400. On the PocketPC<br />

this is reduced <strong>to</strong> 240 × 268. A PocketPC has a full screen resolution of 240 × 320, in general.<br />

When title and status bars are included this reduces the screen space <strong>to</strong> 240 × 268. The first step in<br />

the optimization process was <strong>to</strong> resize the artwork, simply by turning the entire animation in<strong>to</strong> a<br />

symbol and resizing the lot. Then any artwork that ran off the edge throughout the animation was<br />

deleted. The next step is <strong>to</strong> go through any complex artwork or symbols and reduce the number<br />

of curves <strong>to</strong> suit the new screen size. Choose ‘Modify/Shape/Optimize...’. This opens the dialog<br />

box shown in Figure 6.7.<br />

Figure 6.7 Optimizing artwork<br />

Using this technique a saving in the complexity of the artwork of around 35 per cent is not<br />

unusual. This could mean a doubling of the frame rate. When doing the conversion it was also<br />

seen that the large bulk of leaves that falls around frame 370, remains static from frame 380, but the<br />

artist had copied the symbol on consecutive frames because some small leaves continued <strong>to</strong> drift<br />

down. By moving the static content on<strong>to</strong> a layer that was unchanging <strong>Flash</strong> only ‘thinks’ about<br />

the artwork that has a new keyframe on each move of the playback head. Don’t make <strong>Flash</strong> do<br />

things it doesn’t need <strong>to</strong> do. After all the changes the file size had reduced <strong>to</strong> just 22 K and the<br />

sustained frame rate had doubled. The overall optimization <strong>to</strong>ok around just 10 minutes and was<br />

well worth the effort.<br />

79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!