As all begins to get bigger I need some additional advice. For my viewport I manage vertext lists that i only need to modify in their texture or coordinates to move around the map or do animations. I only need to delete them and create new vertex lists with batch.add() when the window is being resized. the rest of the time i only access the vertex lists and modify their parameters (tex_coords and vertices). this is quite fast but the problem comes in when i need more than one texture to draw my map because i can no longer simply swap the textureregion when moving and animating as eventually the texture itself has to change too. as i understand it now i have to do a batch.add() again to attach a TextureGroup that will do this for me. again this works fine but calling batch.add() for every movement is MUCH slower than just switching out the textureregions as i did before. any ideas on that?
cheers josch On Sep 11, 7:50 pm, josch <[EMAIL PROTECTED]> wrote: > Hi! > I wanted to give a short video on how far I came with your great help > so that you can see that your time wasnt in vain that that now there > is one more out there that actively dives into pyglet :). > > http://rabenfrost.net/josch/heroes/moving.ogg > o animated water tiles > o moving by keyboard (even diagonally) and by dragging the mouse > > I decided not to use the resource module but to manually use a > TextureAtlas that is just big enough to hold all the water tiles > (384x416 px for 156images) with their animation frames. > This way I can do animation by just changing the texture coordinates > in the vertex lists without any additional effort (for example without > checking if the next animation frame is still in the same texture as > the last). > > Now I'm gonna wrap everything up in nice pythonic classes and stuff > and add the other layers. > > It's amazing how much I learned the past three days! > > cheers > > josch > > On Sep 11, 3:57 am, Richard Jones <[EMAIL PROTECTED]> wrote: > > > On Thu, 11 Sep 2008, josch wrote: > > > as for the cocos tile engine: > > > - cocos uses sprites to draw the batch (what i was told and > > > experienced is slower than using vertex lists) > > > The pyglet Sprites used by the cocos tile engine use vertex lists > > underneath - > > approximately as fast as implementing a direct-to-vertex-list approach, with > > a small overhead when the visible tiles set changes. It has the benefit that > > it can use animated tiles through the standard pyglet Sprite animation > > mechanism (I believe, I've not actually tried to use them). > > > Richard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
