you speak about these lines:
        vl = self.batch.add(self.cols * self.rows * 4, GL_QUADS, None,
            ('v2i', vertex_data),
            ('t3f', texture_data),
            ('c4B', color_data))
i still have a lot to learn so i opened up your make me code (nice
game btw) and will read and understand it in the next days.

what i do not want is to just use a faster lib like rabbyt sprites
(which afaik uses pyrex instead of ctypes to access opengl) just to
compensate for my still lacking skillz since i would really really
like to have everything in pure python so the user has to compile
nothing.
if you say that the following is doable with pyglet ctypes opengl and
high framerates even on hardware like radeon 9700 and athlon 2000+
style (yes this is old hardware but i do not want to do crysis here
right? :D ) then i am prepared to learn accordingly:
 - 32x32pixel map tiles (water is animated)
 - also playable on big resolutions - so up to ~2300 tiles on the
screen at the same time max
 - two or three more optional layers for map objects like trees and
mountains
 - those map objects are sometimes also animated

i started doing this in pygame and also got bad framerates so i hope
pyglet will save me here - i do not want pyrex/c bindings and will
only use them if i really have to thats why i ask the pro devs here ;)

thx for all your help
cheers

josch

On Sep 9, 2:54 am, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
> On 9/9/08, josch <[EMAIL PROTECTED]> wrote:
>
>
>
> >  well i just did not want to have the overhead of all those mighty
> >  cocos transformations and animation stuff. i need it small and simple.
> >  i just read a bit into the cocos tile engine code and it seem that on
> >  each draw it fills a new pyglet batch with sprites - just as i
> >  proposed in my first post.
> >  maybe this really /is/ the best way to do it?
>
> My PyWeek entry from March (http://partiallydisassembled.net/make_me/)
> used tile rendering using batches.  I didn't use sprites because the
> creation time for each sprite was too high.  I use Batch.add(..) to
> create the vertices for the tile map.  If all the images are located
> in the same texture, the entire screen can be drawn as one primitive.
> Culling is done by creating separate vertex lists for approximately
> screen-sized areas of the map.  These can then be added and removed
> from the batch on-demand as the player moves around (tuning this took
> quite some time).  I didn't have any animated tiles, but these can be
> done by either modifying the vertex texture coordinates to point into
> the desired frame, or by swapping entire vertex lists (which would
> probably be faster but more memory heavy).
>
> I'm afraid the code in Make Me is far from publishable (it was written
> in a week for a single game, after all), but you may find it useful to
> mine for ideas.
>
> Alex.
--~--~---------~--~----~------------~-------~--~----~
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