Quantcast
Viewing latest article 12
Browse Latest Browse All 15

sprites on sprites: Re: sprites on sprites

Solution is fairly simple!
And it give more flexibility.

Sort your sprites according to "depth". By depth I mean "distance" to viewer. Eg. You want your "static" sprites to be in background, and "dynamic" in foreground. So add property "depth" or "z", to sprites, and then sort them before drawing them.

It also give you possibility to have multiple depths.

Here look at some game made with that technique:
http://www.youtube.com/watch?v=mX48y24t9iU
At 0:10 you can see different parts of landscape being rendered into different "depths". (And you can see how moving different "depths" at different speeds can give illusion of observer movement!)


Viewing latest article 12
Browse Latest Browse All 15

Trending Articles