Trigonometry-Free Zone

Now that you've seen how to draw a military perspective isometric scene and learned some of the core concepts, you'll now learn how you can draw the most common type of isometric projection: that which is used most often in computer games . We are going to be using an angle of 25.56505 (or, even more precisely, arctangent 0.5). The reason we use arctangent 0.5 for the angle is because a line at an angle where the tangent is 0.5 has a nice, regular pixel pattern consisting of two steps to the right and one step up. It also means that our tile will be twice as wide as it is high. To make the edges of the tiles match, the width of the tile has to be a multiple of 4 pixels, and the height should be one less than half the width (in our examples, we use 32x15 tiles, which satisfy the rule). Knowing these three rules, you can easily draw perfect isometric tiles using arctangent 0.5. If you're getting worried that this is about to lead into a full-blown trig-fest, you can relax ”we're not going to be using a single trigonometric equation in the rest of the chapter. This is partly because our heads have always been too thick when it comes to trigonometry, but also because it's just not necessary when using isometric 3D. In fact, this is why isometric graphics became so popular: they are less processor- intensive since you don't have to use computationally -heavy trigonometric functions.

The method that we're going to use is the one that is traditionally used in bitmap-based game programming. One of the advantages of using isometric projection is that you don't need to use real 3D math and it makes applications such as isometric games run faster. There's a really great introduction to the technique we're going to be using by Jim Adams over at GameDev called "Isometric Views" ( ). In fact, you would do well to bookmark GameDev since they have many interesting articles that, although they focus mostly on C or Delphi programming, can be applied to ActionScript with some work once you understand the concepts being presented.

Although we're going to sneakily avoid the use of trig in our examples, to get the full picture we encourage you to get a good book on trigonometry and read it through carefully . Trig will pop up in everything you do, especially if you're creating games or scripted animations in Flash. Learn it, and learn it well!

Flash 3D Cheats Most Wanted
Flash 3D Cheats Most Wanted
ISBN: 1590592212
Year: 2002
Pages: 97 © 2008-2017.
If you may any questions please contact us: