Active Picture and Active Object


While the first two items we looked at were very obvious ways that we can add 3D to an MMF game, the next option we’ll look at probably isn’t. At first glance, the use of the standard 2D Active Object or Active Picture to simulate 3D may not make a great deal of sense. However, with a quick example, it’s very easy to see how to take advantage of the normally 2D graphics.

Example

It’s very easy to see how this concept will work. We can simply resize the Active Picture or Active Object graphics to simulate moving toward or away from the screen. For example, to simulate an object moving away, we’ll resize it to make it look smaller. Likewise, we can make it larger so that it appears to be moving toward us. Take a look at Figures 16.19, 16.20, and 16.21. They show a small square object getting smaller to simulate moving away from us.

If Figures 16.19 to 16.21 were executed quickly, it would appear as though the square were moving away. We can add to this by including things like mock shadows and movement in the x and y 2D coordinates. Unlike the Active Picture, an Active Object does not allow us to resize it programmatically. Instead, we can handle this by designing graphics in the various sizes we’ll need and altering them accordingly.

click to expand
Figure 16.19: Largest view of object.

click to expand
Figure 16.20: Getting smaller.

click to expand
Figure 16.21: Smallest view of object.




Awesome 3d Game Development(c) No Programming Required
Awesome 3d Game Development: No Programming Required (Charles River Media Game Development)
ISBN: 1584503254
EAN: 2147483647
Year: 2006
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net