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
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
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
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
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
>
>
>
> 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
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
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
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
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
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
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
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
13 matches
Mail list logo