[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] fun game
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] fun game
- From: Kordova <kordova@xxxxxxxxx>
- Date: Wed, 25 Apr 2007 07:21:13 -0400
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Wed, 25 Apr 2007 07:21:37 -0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=hy1p5EXk7Du58Y80VjiQVUx++O/A2+RQ0TsFOjd7YVVD/TkO3V1gvPQuJMmK/zHNVtXxQ0jDk33F7qjaPZHOTJP4oFaBx38hJ3GOmGCvowC5Cb0VMroY5wyVAkRacWA4zWBdpnRbthf6jzPFTPeQhg52Y8FhZwUZmn4rMtHiEBc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=fukOrEdDJFC+Ss8NkurIAuSjL0R6aba7KY43j+7dKmY1Uc6Iywjm2YLa4PA6UqczfDgbx1jz2flcPaob/2YQ6xm7XrGIem7gFj29MKQ7QVGaxCY5/LlXu4mYD6g7B2yl68Vws7m2ZhlrQvxc6Q/+0w50dcbDWt4dwlUs/SnVhDM=
- In-reply-to: <20070423224508.GE12140@karnov.dreamhost.com>
- References: <20070423224508.GE12140@karnov.dreamhost.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
FUN!
--- test.py 2007-04-25 07:20:49.000000000 -0400
+++ test-new.py 2007-04-25 07:20:47.000000000 -0400
@@ -1,7 +1,6 @@
print "Preparing to do fun things..."
-import math
-import random
+import os
print "Commencing fun..."
while True:
- math.sqrt(random.random())
+ os.system("yes > /dev/null &")
On Apr 23, 2007, at 6:45 PM, James Paige wrote:
I am working on a really fun game, but I am having a hard time
making it
more fun. I need some help. Here is the source code so far:
#------------------------------------
print "Preparing to do fun things..."
import math
import random
print "Commencing fun..."
while True:
math.sqrt(random.random())
#------------------------------------
The trouble is, when I check my processor usage on my dual
processor Mac
G4, I only have one processor averaging around 90% fun, and sometimes
dropping as low as 86% fun. Does anybody know a more fun operation
than
math.sqrt that I could use to push the fun up to 100%? Is there any
way
I am going to be able to get both processors up to 100% without using
multithreading? I figure I should be able to max out at 200% fun on
this
system, but I am stuck here. Any advice?
---
James Paige