Thank you for your reply, Claudio.

On Thursday, October 31, 2013 3:11:40 PM UTC-7, claudio canepa wrote:
>
>
> Your update method should not call sp.draw(); You always draw in the .draw 
> method.
>

This is interesting.  How does Pyglet know that the position variables of a 
Sprite object have been changed?  Where is the redrawing handled?  In any 
case, I deleted the sp.draw() call in MyWindow.update().  The program 
behaved exactly as before.  It ran for a while, then froze.
 

> For smooth movement the position update should use the received dt, like
> sp.x += sp.vx * dt
>

OK, I see the advantage of that.  My program assumes that each tick of the 
clock will come in more or less exactly on time.  If it does not, you want 
to adjust for the delay.
 

> Other than that,  I don't see anything strange.
>
> What happens if you run pyglet's included sample examples/noisy/noisy.py ?
>

Oh, I had stopped looking at the examples after I had so many problems 
trying to run them in Python3.  See 
https://groups.google.com/forum/#!topic/pyglet-users/pjQViD7DrUk.  Somehow, 
back in July, running 2to3 on the examples wasn't helping much.  I figured 
that I would have to learn by writing instead of by reading.

But to answer your question: on my Linux system, examples/noisy/noisy.py 
ALSO stops working, after runs of 30 seconds to a few minutes.  I haven't 
tried on Windows 7 yet.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to