I'd like to give my input on this, I've been using pyglet to create a map editor and I made a tilemap class where each tile in each layer is a separate sprite. I even drew a grid over the tile map by having a layer of spits where the image is a 1px black outline drawing at 180 opacity resulting in a grid of 2px black lines. the end result is literally thousands of sprites but I have no slow downs yet. obviously you don;t want to use unnecessary sprites but it seems that with intelligently used batches you sprite budget can be in the 100,000.
On May 5, 6:50 am, claudio canepa <[email protected]> wrote: > On Wed, May 4, 2011 at 2:39 PM, Peter Enerccio <[email protected]> wrote: > > Actually, I had the same problem. > > I wanted to tile my screen, but moving around (with mouse drag) was > > terrible with more than > > sprites. So I used PIL as well to make big picture and use only one > > sprite. > > > (But I am using Cocos) > > In Cocos similar gains are possible when using batches, > see:http://progcc-en.blogspot.com/2010/11/sprite-performance-in-cocos-and... > > Also, cocos trunk has better sprite behavior, for numbers look at the next > article in that > blog:http://progcc-en.blogspot.com/2010/11/faster-cocos-sprites.html > > You don't mention how you were doing the tiling: > . your own ? > . using classes in cocos.tiles but not ScrollableLayer ? > . using classes in cocos.tiles and ScrollableLayer ? > > In the first you must provide explicitly a batch or BatchNode, > in the second you should provide explicitly a batch, > in the third the batch is provided by ScrollableLayer, but being that cocos > tilemaps uses sprites the performance should be much better using current > cocos trunk. > > (sorry for the slight OT) > > -- > claudio -- 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.
