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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Flash</strong> <strong>MX</strong> <strong>2004</strong> <strong>Games</strong><br />

independent when it only contains vec<strong>to</strong>r elements. A list of advantages and disadvantages of the<br />

different formats is given in Table 5.1.<br />

Table 5.1 Advantages and disadvantages of different file formats used for importing and exporting image data<br />

Format Advantages Disadvantages Flat colour Half <strong>to</strong>ne<br />

Jpg Small file size The compression<br />

method loses detail<br />

from the image. Can<br />

have strange speckled<br />

artefacts<br />

Bmp Big files Only the most basic<br />

of compression<br />

methods<br />

Png Uses a clever<br />

compression that<br />

loses no information<br />

in the image. Can<br />

incorporate an alpha<br />

channel<br />

Gif A relatively small file<br />

size can be achieved<br />

without losing<br />

information in the<br />

image<br />

Eps Vec<strong>to</strong>r format<br />

ensures resolution<br />

independence. An<br />

eps can contain a<br />

bitmap; the bitmap<br />

will not be resolution<br />

independent<br />

Compression method<br />

will not create files as<br />

small as jpegs<br />

Cannot use 24 bit<br />

palette, the maximum<br />

number of different<br />

colours in a gif file is<br />

limited <strong>to</strong> 256<br />

Not suitable for<br />

bitmaps<br />

Likely <strong>to</strong> create<br />

strange artefacts<br />

Reasonable choice,<br />

bmp images can have<br />

16, 256, or 16 m<br />

colours<br />

Best for pho<strong>to</strong>graphic<br />

images<br />

Will result in a very<br />

big file<br />

Not the best choice Good choice for<br />

images that need <strong>to</strong><br />

be maintained at<br />

optimum quality<br />

Best choice for flat<br />

colour images that<br />

need a high level of<br />

compression<br />

The best choice if the<br />

image is in vec<strong>to</strong>r<br />

format<br />

Not suitable<br />

Not suitable<br />

The image in Figure 5.13 was created by first creating some brick tiles, the horns, the round<br />

window and the arch. Each element was imported as a png and combined in <strong>Flash</strong>. This results<br />

in a smaller file size and allows you as a developer <strong>to</strong> create different backgrounds using a limited<br />

number of tiles. Tiled backgrounds were very popular when computers had more limited facilities<br />

and are not used as often these days, but they do offer flexibility and small file sizes so they should<br />

be considered for some game formats.<br />

70

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

Saved successfully!

Ooh no, something went wrong!