Re: [pygame] fun game

2007-04-23 Thread Kris Schnee
Nathan wrote: On 4/23/07, adam naples <[EMAIL PROTECTED]> wrote: you're on a G4? break out the velocity engine on that fun. Oh come ON. All serious programmers refer to it as Altivec. Surely you knew that? Why, "velocity engine" is just the keynote-marketing-version! http://en.wikipedia.or

Re: [pygame] fun game

2007-04-23 Thread Nathan
On 4/23/07, adam naples <[EMAIL PROTECTED]> wrote: you're on a G4? break out the velocity engine on that fun. Oh come ON. All serious programmers refer to it as Altivec. Surely you knew that? Why, "velocity engine" is just the keynote-marketing-version! http://en.wikipedia.org/wiki/AltiVec

Re: [pygame] fun game

2007-04-23 Thread Nathan
On 4/23/07, James Paige <[EMAIL PROTECTED]> 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 "Co

Re: [pygame] fun game

2007-04-23 Thread adam naples
you're on a G4? break out the velocity engine on that fun. 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 "Prepari

Re: [pygame] fun game

2007-04-23 Thread Dave LeCompte (really)
James Paige is optimizing fun: > On Tue, Apr 24, 2007 at 01:05:01AM +0200, Rikard Bosnjakovic wrote: >> On 4/24/07, James Paige <[EMAIL PROTECTED]> wrote: >> >Does anybody know a more fun operation than >> >math.sqrt that I could use to push the fun up to 100%? >> >> while 1: >> pass > > Nope, tha

Re: [pygame] fun game

2007-04-23 Thread James Paige
On Mon, Apr 23, 2007 at 04:11:16PM -0700, Brian Fisher wrote: > On 4/23/07, James Paige <[EMAIL PROTECTED]> wrote: > >multithreading? I figure I should be able to max out at 200% fun on this > >system, but I am stuck here. Any advice? > > > I think rather than get one instance of the game up to 200

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Nathan
On 4/23/07, Dave LeCompte (really) <[EMAIL PROTECTED]> wrote: Brian Fisher told me that a CPU is not a saw: > However it is also nowhere near an applicable analogy in this case. So > if you only ever used 20% of the cpu, I guess you'll burn out that 20% > and then have to throw away an 80% good c

Re: [pygame] fun game

2007-04-23 Thread Brian Fisher
On 4/23/07, James Paige <[EMAIL PROTECTED]> wrote: multithreading? I figure I should be able to max out at 200% fun on this system, but I am stuck here. Any advice? I think rather than get one instance of the game up to 200% fun, you may want to look at increasing the number of instances of the

Re: [pygame] fun game

2007-04-23 Thread James Paige
On Tue, Apr 24, 2007 at 01:05:01AM +0200, Rikard Bosnjakovic wrote: > On 4/24/07, James Paige <[EMAIL PROTECTED]> wrote: > >Does anybody know a more fun operation than > >math.sqrt that I could use to push the fun up to 100%? > > while 1: > pass Nope, that is about the same. still averaging abou

Re: [pygame] fun game

2007-04-23 Thread Rikard Bosnjakovic
On 4/24/07, James Paige <[EMAIL PROTECTED]> wrote: Does anybody know a more fun operation than math.sqrt that I could use to push the fun up to 100%? while 1: pass -- - Rikard - http://bos.hack.org/cv/

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Dave LeCompte (really)
Brian Fisher said: > I know you are not advocating idiocy, and I'm sorry if I was a bit > rude. I do think you are making very valid points, I just didn't want > the idea that using less cpu is good to be lost. Thanks - I probably was getting a little touchy, myself, in my frustration - I guess I

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Brian Fisher
On 4/23/07, Dave LeCompte (really) <[EMAIL PROTECTED]> wrote: Ok, so I'm not burning out 20% of the pins on the CPU, or wearing down 20% of the transistors to nubs, but I still believe it's valid. If I have a 2GHz CPU, and I only use 20% of it over its entire lifetime, didn't I really waste 80% o

[pygame] fun game

2007-04-23 Thread James Paige
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.rand

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Nathan
On 4/23/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: I think Dave LeCompte was trying to argue that if you know how much CPU you have, you can use it to better effect in your game -- for example with more accurate physics or more realistic AI. I don't necessarily agree with this argument, bu

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Nathan
On 4/23/07, Dave LeCompte (really) <[EMAIL PROTECTED]> wrote: "Nathan" <[EMAIL PROTECTED]> said: > Why you would WANT to max out the CPU really baffles me. Grampa used to chastise me for only using 50% of the length of the handsaw. He said "I paid for every tooth on the saw blade, use them all.

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Dave LeCompte (really)
Brian Fisher told me that a CPU is not a saw: > However it is also nowhere near an applicable analogy in this case. So > if you only ever used 20% of the cpu, I guess you'll burn out that 20% > and then have to throw away an 80% good cpu? What a waste. All those > 80% good intel CPU's lounging in a

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Ethan Glasser-Camp
Kris Schnee wrote: > James Paige wrote: >> On Mon, Apr 23, 2007 at 02:18:36PM -0700, Dave LeCompte (really) wrote: >>> By definition, wasting cycles is bad, and if the CPU is running at 25%, >>> that would be 75% waste, right? > And what's the benefit to using active waiting or no waiting in a game

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Kris Schnee
James Paige wrote: On Mon, Apr 23, 2007 at 02:18:36PM -0700, Dave LeCompte (really) wrote: By definition, wasting cycles is bad, and if the CPU is running at 25%, that would be 75% waste, right? NO. --- James Paige For instance, I'm using a laptop. In some situations I have to pay attent

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Brian Fisher
On 4/23/07, Dave LeCompte (really) <[EMAIL PROTECTED]> wrote: > Why you would WANT to max out the CPU really baffles me. Grampa used to chastise me for only using 50% of the length of the handsaw. He said "I paid for every tooth on the saw blade, use them all." Wasting (including underusing) the

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Charles Joseph Christie II
++; That wouldn't make any sense... a CPU is not a saw. I paid for my computer the way it is so that NOTHING takes up 100% on either of its two cores aside from compiling programs, which is a completely different story. On Monday 23 April 2007 05:32:09 pm James Paige wrote: > On Mon, Apr 23, 20

Re: [pygame] Re: 100% CPU

2007-04-23 Thread James Paige
On Mon, Apr 23, 2007 at 02:18:36PM -0700, Dave LeCompte (really) wrote: > > By definition, wasting cycles is bad, and if the CPU is running at 25%, > that would be 75% waste, right? > NO. --- James Paige

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Dave LeCompte (really)
"Nathan" <[EMAIL PROTECTED]> said: > Why you would WANT to max out the CPU really baffles me. Grampa used to chastise me for only using 50% of the length of the handsaw. He said "I paid for every tooth on the saw blade, use them all." Wasting (including underusing) the CPU seems like the same thi

Re: [pygame] Re: 100% CPU

2007-04-23 Thread Nathan
On 4/23/07, Dave LeCompte (really) <[EMAIL PROTECTED]> wrote: But to hardcode an upper limit on CPU usage for the general case still really baffles me. Why you would WANT to max out the CPU really baffles me. Some of us (like me) do our pygame programming while the computer is doing lots of ot

Re: [pygame] Philosophical Question On Naming

2007-04-23 Thread Jason Massey
Don't you think that the "explicit is better than implicit" in import this gives you some help? I'd stick with the self.location On 4/23/07, Kris Schnee <[EMAIL PROTECTED]> wrote: A trivial question that's bugging me: A Widget object currently has a variable called "location," which is a Py

[pygame] Philosophical Question On Naming

2007-04-23 Thread Kris Schnee
A trivial question that's bugging me: A Widget object currently has a variable called "location," which is a Pygame.Rect object. It _is_ a Rect, but what it _means_ is the Widget's location. Is it better to call it "self.location" or "self.rect"? Even typing "import this" at the IDLE console

Re: [pygame] varying sound playback rate

2007-04-23 Thread Dave LeCompte (really)
Miriam English said: > OpenAL has some interesting 3D capabilities -- something that will be > very useful for me later... but after a quick scan thru the > documentation I can't see much else. Guess I have to sit down and really > delve into the docs. Based on Alex's suggestion of looking at Open

[pygame] Re: 100% CPU

2007-04-23 Thread Dave LeCompte (really)
Ulf Ekström asked: > Please think of people with laptops! This is entirely reasonable - pressing my "100% monitor"/"100% CPU" simile, it makes sense to me to have a "low power" mode analogous to the "windowed" mode. But to hardcode an upper limit on CPU usage for the general case still really baf

Re: [pygame] Firing bullets

2007-04-23 Thread Charles Christie
Well, I figured out what I was doing wrong... I think the problem was that I was (successfully) over complicating a simple thing. Well, I have bullet code that doesn't return errors or anything, the next important thing is making bullets disappear and stuff when they hit the edge of the screen or

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Will McGugan
Simon Oberhammer wrote: Hm, haven't thaught about this too much and always did my own "busy wait" and a fixed frame rate (of course game adjusts to slower fps). Would someone care show pseudo code for decoupled update/draw and non-busy wait stuff? Or maybe a real game and point me to the rele

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Simon Oberhammer
Hm, haven't thaught about this too much and always did my own "busy wait" and a fixed frame rate (of course game adjusts to slower fps). Would someone care show pseudo code for decoupled update/draw and non-busy wait stuff? Or maybe a real game and point me to the relevant sections? Seems this i

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Ulf Ekström
Please think of people with laptops! I can accept that an amazing 3d shooter uses all my cpu, but for some simple puzzle game to take all cpu and make the fan run att maximum speed is really stupid. It also affects the battery life quit a lot, and many cheap laptops get unpleasantly hot from such

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Will McGugan
Brian Fisher wrote: The point I was trying to make was that not all frames take the same amount of time to do the work to get to the screen. Like lets say a comp can only manage an average of 20 fps, or on average it takes 50ms per frame. Well it won't come out as 50ms per frame. It's likely to

Re: [pygame] Path finding demo, now with more fugu

2007-04-23 Thread Brian Fisher
On 4/22/07, Ethan Glasser-Camp <[EMAIL PROTECTED]> wrote: > [run simulation at a consistent rate with time] I've seen this argument before on the pygame list and I don't really understand it. It seems to me that in my experience, when I play a game which I don't have the CPU for, I get slideshow