I i'm pretty sure that it will be faster to NOT make one big texture
for the map but maintain each tile as an individual sprite. when you
blit to a texture it has to transfer the memory back and forth form
the card which is slow. but If you maintain each tile as a sprite you
can make one batch call and all the sprites well draw. I'm not sure
you want to be drawing all 25 million sprites each frame so you might
want to figure out a way to get only the viable tile sprites into a
batch but in theory OpenGL should ignore and ship the vertexes of the
sprites that aren't visible.
the only thing i'm not sure on is if you can actually hold 25 million
sprites in video memory. if you set it up right the only image you'll
have to hold in memory is the tile set as all the sprites can texture
reference that one texture so that memory should be a problem but 25
million sprites is a lot of vertexes.  25 million * 4 I think, each
sprite is made of 4 vertexes right? so 1 billion vertexes with data.
that might be pushing it.

On Sep 22, 7:01 am, Gary Daniels <[email protected]> wrote:
> I'm trying to determine if the following is feasible with pyglet:
>
> 1) 16x16 tiles
> 2) Resolution of at least 1440x900
> 3) Huge map size (5000x5000)
> 4) Maintain 60fps
>
> I have it working now, but the frame rate drops to the mid-20s and it
> flickers a lot even with vsync=True (much more in Kubuntu that
> Windows).
>
> I'm building the initial screen in a Texture, then blitting it. As the
> screen scrolls left (for example), I grab the appropriate region of
> the texture and blit it back to itself one tile width over, then fill
> in the newly empty space with tiles.
>
> Is there a better way to do this?
>
> My map is a simple list that contains lists of tile index
> [ [1,1,1,1,2,2,2,3,...], [3,4,4,4,2,2,2,3,...]]
>
> I looked at other libraries, but the maps are too large to keep the
> whole thing rendered in memory.

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