On Fri, Oct 21, 2011 at 7:13 PM, Ryexander <[email protected]> wrote:

> You should not be moving the sprites around just to scroll the tile
> map. scrolling should be done with gltranslate().
> just translate, draw the batch, and translate back.
>
>
I was building on the TileMap example:

for(row=0...
    for(col=0...
    sprite_tiles.set_frame(tile_index);
    sprite_tiles.draw(gc, col*16, row*16);

It's redrawing the screen each frame using one sprite with 1,024 16x16
frames.

It's getting about 180 fps with a single layer but I'm guessing this isn't
the best way to do it, which prompted my first post.

Can you elaborate on:

"just translate, draw the batch, and translate back"

I understand what translate does but I'm not following what you mean.

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