On Mon, Mar 3, 2008 at 6:56 PM, Alex Holkner <[EMAIL PROTECTED]> wrote: > > On Tue, Mar 4, 2008 at 12:46 PM, Snor <[EMAIL PROTECTED]> wrote: > > > > I've previously used pyglet and implemented a main loop myself. As I > > have been creating games that run at as high a frame-rate as possible, > > I was updating the screen every frame using a routine in the main > > event loop. > > > > I was wondering how exactly I call code to be executed every frame > > when using pyglet.app? > > pyglet.clock.schedule()
If it's called once per frame, couldn't you just stick the call in your main loop? > > Also, I plan on using twisted with this application too, if anyone is > > familiar with this, do you know how well this could work with > > pyglet.app? > > There was a thread from last week that produced some solutions. Yep, that was me last week or so! Here's a nice link for you: http://groups.google.com/group/pyglet-users/browse_thread/thread/699aed8c1ff039a5?hl=en > > Or perhaps it would be better to stick to the method I was using > > before where twisted handles the event loop and calls pyglet to draw a > > frame (and if pyglet has a framerate set, then it blocks for the > > required milliseconds before handing back to twisted to check it's own > > events - the pyglet frame drawing routine then puts itself back in the > > twisted queue to be executed again when all the network related events > > are taken care of)? > > This will work (and is supported), but I don't recommend it. See the > appendix in the programming guide for a list of reasons why you should > use pyglet.app.run. There's nothing labeled "appendix" or pyglet.app or anything on: http://pyglet.org/doc/programming_guide/index.html I'd like to read about pyglet.app.run too... ~ Nathan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
