On 25/04/13 19:20, Joseph Clark wrote:
> [...]
> 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?

Coco2d uses OpenGL transforms to move the Sprites required for the part
of the map you're drawing so it only needs to remove/add a row (or
column). Well, more or less.

See the MayLayer._update_sprite_set() on:

http://los-cocos.googlecode.com/svn/trunk/cocos/tiles.py

I recommend reading Cocos code, it is very enlightening :)

Regards,

Juan

-- 
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/

-- 
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