Game Development Reference
In-Depth Information
Figure 1-6 (right) shows how this new alpha transparency can improve the look of your
sprites when they appear against contrasting backgrounds. Only two of the file types supported
by Game Maker can include transparency in this way. PNG files ( .png ) support alpha
transparency, and you can create them in many different graphics packages, but you need to use
animation strips (using _stripXX at the end of the file name) to support multiple frames of
animation. This is the most common format we use in this topic, but Game Maker 8 includes a
new sprite format ( .gmspr ) that supports both alpha transparency and animation frames, so we
sometimes use that as well. There are plenty more cool effects that you can achieve with this new
level of alpha control such as creating shadows and advanced particle effects.
Note Perhaps you're wondering why many things seem to be measured between such strange values as
0 and 255 in computing rather than 0 to 100 (red, blue, and green components of colors, are another
example). The answer has to do with the way that numbers are stored on computers. The numbers 10,
100, 1,000, 10,000, and so forth have significance to us because we use a number system called decimal.
Our number system is based on the number 10 (because we have 10 fingers) and each of the numbers
above is 10 times the last. However, computers use a number system called binary , which is based on the
number 2 (because in electronics, things can either be on or off), so the numbers that are significant to
them are 2, 4, 8, 16, 32, 64, 128, 256, and so forth, where each number is 2 times the last.
Congratulations
Fantastic—the necessary preparations have been made, and we're ready to get started. We'll
begin on easy ground, but there are trickier paths ahead, so make sure you take the opportunity
to begin with a sure footing. Each chapter will build upon the challenges of the last, so you can't
afford to take any shortcuts. Anyway, we hope you're not scared of heights, because that's the
least of your worries when you're a character in a platform game….
 
Search WWH ::




Custom Search