Texture atlas.

2013/4/25 Joseph Clark <[email protected]>

> In my game I have a grid of tiles to represent my map's background as well
> as animate and inanimate objects.  Not understanding OpenGL at all, I
> simply coded all of this as a grid of pyglet.sprite.Sprites, each with its
> own imagedata and x,y coordinates.  I'm running into a lot of overhead now
> when I try to scroll the map or resize the map.  In either case, the x,y
> coordinates of each and every sprite need to be changed, some sprites need
> to be made visible, some need to be made invisible, and the code is getting
> long and complicated.
>
> I was wondering if any of you veterans could point me in the right
> direction as to how to optimize the way I'm using graphics.
> One thing I was thinking was that instead of having dozens or hundreds of
> tile sprites on screen, I could somehow "flatten" them all into a single
> image and then moving it around would be much simpler.  Creating a
> "viewport" to the map could be accomplished by simply drawing a "frame" on
> top of it.  How would I accomplish these things, or is there an even better
> way?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Bc. Peter Vaňušanik

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to