well that would explain alot. I can only get somehwere about 20 entities before my framerate drops to 16-25. My project is supposed to emulate GameMakers engine but with python. it handles instances fine its just the drawing portion thats difficult for me to implement. I will have to look into this more. what you said kinda makes sense.
EDIT: I tried fixing what you said and it works. I understand pyglet a ton better now ;) thanks m8! On Thursday, May 14, 2015 at 8:47:14 PM UTC+1, magu...@gmail.com wrote: > > Not to state the obvious, but is there a reason your not using Pyglets > build in Sprite class > <http://www.pyglet.org/doc/api/pyglet.sprite.Sprite-class.html>? > > Anyway, not quite sure about how your assigning/storing your batches, but > you might be over calling your batch. > In line 46 of RunMe.py: > > for entity in instance._InstanceController.entity.values(): > entity.event_draw() > > The purpose of a batch is to load all your sprites into a single batch, > and then draw them ALL in a single call, ie: > @window.eventdef on_draw(): > > window.clear() > fps_display.draw() > batch.draw() > > > > > Instead, you seem to iterate over each and every sprite and call the batch > draw repeatedly in a single on_draw(). > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users+unsubscr...@googlegroups.com. To post to this group, send email to pyglet-users@googlegroups.com. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.