[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Clock Tickings
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Clock Tickings
- From: "Chris Smith" <maximinus@xxxxxxxxx>
- Date: Tue, 22 Jan 2008 15:49:10 +0000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 22 Jan 2008 10:49:28 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=+HQ+YRzzav0XA5DZY/Mic7By0bhBliSqnPmV/XHzFXk=; b=ex9ffmjPjl/ausgpGMKmmEFgNopMHKzCXNbRU/90aW3c3hBoF2MTYkIjvnVkSEVURfBJa0fxNc/2ZMzaKF+iZqCST/4P2KNT3GxbZb5F7t3k7DcyZpBqju8S/6JrH9UGwF3X1V5cMmqWUGzYzivZgDBF01nhm4e9U9Mr7m9/2Ks=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=tF4RLlzbZaXdoCuawpty7BUW0L3CifsXHppaVIRPf47RKO+TpU8SrW/QqU1oyjjVHM4/iCgXVpVHC3yM4GT637AaL+VMSI+VbXddPHEzrSGPBXpUputjns4jnplvEkvV58NZOiokZhgBhCtFOUYF8hnntywmakSLGqcQ1qZg4no=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
In the pygame docs it heavily implies that, having a loop like:
clock=pygame.Clock()
while(True):
clock.tick(1000/X)
Will let you control the framerate, X being the FPS (I know, dependant on a few other things). However, I'm getting the opposite effect - a low value of X gives me a high frame rate, and visa versa. Anyone have a handle on what's happening here?
Chris