Thank you for visiting Blazing Games

Sprites in 3D

The rendering of this episode, even though like the previous episode it is presented in 3D, uses a dramatically different approach. All objects on the screen are sprites. More specifically, they are 3D sprites which are commonly called billboards in 3D programming parlance.

The term “sprite” is rather old and stems back to the early days of video games. Sprites are essentially a 2D block that contains an image. What makes them special is that the block is not solid, but there is a transparent color so part of the image is see-through revealing graphics that were drawn behind it. This is obviously useful as most objects in games are not solid squares.

3D sprites are just sprites that have a 3rd coordinate attached to them. This coordinate determines how far away from the “camera” the sprite is. By “camera” I am referring to the point within the 3D environment that the picture is being drawn from. In this game it happens to be the location of the character that the player is currently controlling. The further the object is away from the camera, the smaller that object appears.

Flash supports scaling movie clips so to create a 3D Sprite in Flash all one needs to do is use the MovieClip or Sprite class that is built into Flash and adjust the size of the MovieClip or Sprite based on the distance from the player. The only tricky part is making sure that the drawing order of the 3D Sprites is correct.

Previous page
Chapter 32 Page 4

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2009 Blazing Games Inc. All Rights Reserved