Thanks for answering, Ben.

In my case, I haver retorted to try a brute force approach(sorting
each sprite on a list, and drawing them individually) and see how my
system handles it. Since I'm not big on tile based games, I won't have
to redraw each piece of the map the characters might step into, and
since I don't plan on having an insane amount of moving sprites on the
screen(9 to 10, tops), that just might work; again, if my system can
handle it(knock on wood).

Again, thanks for answering.

On 7 oct, 02:01, Ben Sizer <[email protected]> wrote:
> On Oct 7, 2:59 am, Alejandro Castellanos <[email protected]>
> wrote:
>
> > Ben, I just checked your zsprite in the example that you posted the
> > link to, and was came away very interested, and not to be the slow one
> > here, but how exactly does it work?
>
> Basically OpenGL is a 3D system. In 2D mode you normally just use 2 of
> the coordinates, X and Y, to plot your graphics. But there is a 3rd
> coordinate Z which is the axis going into or coming out of the screen.
> All I've done is give certain sprites smaller values of Z to make them
> effectively further away, and the OpenGL depth buffer does the hard
> work of remembering what Z values a previous sprite used and deciding
> which parts of new sprites can be drawn based on that.
>
> I picked the values of Z based on the row the tile was in, but you'd
> have to decide how to do this for your own app.
>
> (However, see Brian Fisher's note about alpha - anything with partial
> alpha values still need to be rendered back to front for correct
> results. If you have a lot of blending then this system may not help
> you.)
>
> --
> Ben Sizer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to