RE: [pygame] Substantial Lag

2012-02-18 Thread Ryan Strunk
This is all great info. Thank you. -Original Message- From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Sam Bull Sent: Friday, February 17, 2012 3:17 PM To: pygame-users@seul.org Subject: RE: [pygame] Substantial Lag On Mon, 2012-02-13 at 02:37 -0600

RE: [pygame] Substantial Lag

2012-02-17 Thread Sam Bull
On Mon, 2012-02-13 at 02:37 -0600, Ryan Strunk wrote: > If clock can force my program to run at a desired speed, how do I > program it to do so? Do I use clock.tick at a certain framerate, for > instance? [Sent from wrong address, so re-posting] Clock.tick(fps) effectively sleeps your program to

Re: [pygame] Substantial Lag

2012-02-13 Thread Vovk Donets
Try clock.tick(fps) 2012/2/13 Ryan Strunk > *From:* owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] *On > Behalf Of *Santiago Romero > *Sent:* Monday, February 13, 2012 2:16 AM > > *To:* pygame-users@seul.org > *Subject:* Re: [pygame] Substantial Lag &g

RE: [pygame] Substantial Lag

2012-02-13 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Santiago Romero Sent: Monday, February 13, 2012 2:16 AM To: pygame-users@seul.org Subject: Re: [pygame] Substantial Lag > > In order to save CPU power, do I need to put in a pygame.time.delay(10) at the

Re: [pygame] Substantial Lag

2012-02-13 Thread Vovk Donets
No need for this! 2012/2/13 Ryan Strunk > *From:* owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] *On > Behalf Of *Vovk Donets > *Sent:* Monday, February 13, 2012 1:48 AM > > *To:* pygame-users@seul.org > *Subject:* Re: [pygame] Substantial Lag > >

Re: [pygame] Substantial Lag

2012-02-13 Thread Santiago Romero
> > In order to save CPU power, do I need to put in a pygame.time.delay(10) at > the end of my event loop? > No. clock() does already that, forcing your program to run at N fps by "idle-ing" it enough time to run it at the desired speed. -- Santiago Romero Ubuntu GNU/Linux http://www.sromer

RE: [pygame] Substantial Lag

2012-02-13 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Vovk Donets Sent: Monday, February 13, 2012 1:48 AM To: pygame-users@seul.org Subject: Re: [pygame] Substantial Lag > I would use builtin pygame clock, coz' no need for manual control of the frame r

Re: [pygame] Substantial Lag

2012-02-12 Thread Vovk Donets
ygame-users@seul.org > *Subject:* Re: [pygame] Substantial Lag > > ** ** > > > If you, by any chance, need this then for C++ like delay in miliseconds > you can use *.sleep()* function from *time module*. > > Is there a need for me to build that in, or is Pygame good

RE: [pygame] Substantial Lag

2012-02-12 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Vovk Donets Sent: Sunday, February 12, 2012 10:12 PM To: pygame-users@seul.org Subject: Re: [pygame] Substantial Lag > If you, by any chance, need this then for C++ like delay in miliseconds you can use .sl

Re: [pygame] Substantial Lag

2012-02-12 Thread Vovk Donets
If you, by any chance, need this then for C++ like delay in miliseconds you can use *.sleep()* function from *time module*. > ** ** > > > You're only updating 5 frames a second, so yu should expect delays of > up to 0.2s, and if you tap the key fast enough it won't register. Why not > change the 5

RE: [pygame] Substantial Lag

2012-02-12 Thread Ryan Strunk
From: owner-pygame-us...@seul.org [mailto:owner-pygame-us...@seul.org] On Behalf Of Christopher Night Sent: Sunday, February 12, 2012 7:07 PM To: pygame-users@seul.org Subject: Re: [pygame] Substantial Lag > You're only updating 5 frames a second, so yu should expect delays of up to 0

Re: [pygame] Substantial Lag

2012-02-12 Thread Christopher Night
You're only updating 5 frames a second, so yu should expect delays of up to 0.2s, and if you tap the key fast enough it won't register. Why not change the 5 to 50 or something? -Christopher On Feb 12, 2012 8:02 PM, "Ryan Strunk" wrote: > Hi everyone, > I apologize in advance for posting 43 lines

[pygame] Substantial Lag

2012-02-12 Thread Ryan Strunk
Hi everyone, I apologize in advance for posting 43 lines of code, but I can't figure out where on Earth the trouble is coming from. When I run this code, the keys do exactly what I'd like, but I'm noticing a delay of a few tenths of a second between when I press the key and when the sound of the st