Re: [pygame] status report

2009-07-10 Thread René Dudfield
On Fri, Jul 10, 2009 at 12:31 AM, jug j...@fantasymail.de wrote:

 Hello,

 Time marches on, so some words about the current state of affairs.
 First, I've to say that Orcun unfortunately is not any longer in our team.
 Then, a slightly more delightful point, we are near at the finish! Only
 some
 minor points and improvements are left, then we can start a final testing
 period.

 Points left to do:

   Devon:
 * Complete the modern design before starting with a new one
* finish form design
* design administrative links like buttons (edit project,
 release.., ...)
* ticket #5
* ...
 * update the trac theme to fit the current design
(maybe ask coderanger at #pygame to help you, he did the current
 desgin plugin)

   Marcus:
 * get the current db and help to write convert scripts
 * convince the rest of the pygame core team
 * review templates
 * test the website, its features, admin functionality, etc.
 * help me with ordering/collecting ToDos and design decisions

   Julian:
 * well, I've to do everything else :-)

 I'll collect the hangover from my various ToDo lists and bring it to the
 wiki page.

 I also made a features list: http://pygameweb.no-ip.org/trac/wiki/Features
 In case I've forgotten anything please add it to this list.

 I hope to complete this project soon and see it running on pygame.org

 Regards,
 Julian


Hi,

I'll get you the pygame database soon... quite busy at the moment.  After
the pygame release.  I was going to give it earlier.  Sorry again.

cheers,


Re: [pygame] status report

2009-07-10 Thread el lauwer

Hoi,

I like the new logo, and it seems to work ok.

I would however try to use a lot less green, I think you should try  
something like the archlinux site

http://www.archlinux.org/


On 10-jul-09, at 08:19, René Dudfield wrote:



Hi,

I'll get you the pygame database soon... quite busy at the moment.   
After the pygame release.  I was going to give it earlier.  Sorry  
again.


cheers,





[pygame] spritecollide() right way to check if not player ?

2009-07-10 Thread Jake b
I have a couple sprite / pygame questions:

1) Is there a better way to say ignore player ( who is in the group )
but check for collision on the rest? ) Meaning when I iterate the unit
list, One time the current unit is the player himself.

It might seem easier in this case to remove player from sprites, but
what about when you do enemies on enemies collision? In that case they
cannot be removed.

class Unit(pygame.sprite.Sprite):
basic Sprite() with sound on .kill
# ...
def die(self):  
self.kill()
play_sound('kaboom')

class Game():
def __init__(self):
# group of all drawn sprites.
self.sprites = pygame.sprite.RenderPlain()  

self.player = Unit()
self.sprites.add(self.player)

def main_loop(self)
for s in pygame.sprite.spritecollide(self.player, 
self.sprites, False):
if s == self.player: continue
s.die()


2) I am looping enemies collision with anything, and I act differently
on items,health, or enemies.
What is the best way to check type? Something like:

# collide: enemies on anything
for e in self.enemies:
for s in pygame.sprite.spritecollide(e, self.sprites, False):
e.oncollide(s)
s.oncollide(e)

# and the function:
def oncollide(self, other): 
if isinstance(other, Enemy): self.damage(other.amount)
elif isinstance(other, Health): self.heal()
elif isinstance(other, Ammo): self.ammo += 10


3) Is it better to separate my collision checks? Assuming I am doing
the same amount of total collision checks:
[ Or no point in worrying about this, ie: either I need QuadTree or I don't ? ]

for u in units:
for s in spritecollide(u, units)
if isinstance(s, Enemy): #...
elif isinstance(s, Item): #...

VS

for s in spritecollide(player, enemies):
# ...
for s in spritecollide(player, items):
# ...
-- 
Jake


Re: [pygame] status report

2009-07-10 Thread jug

el lauwer wrote:

Hoi,

I like the new logo, and it seems to work ok.

I would however try to use a lot less green, I think you should try 
something like the archlinux site

http://www.archlinux.org/
Well, it's a matter of taste. Our target is to get different styles for 
the site. Than, we could vote a default style and registered users can 
change that in their profile settings. The current design came up from 
the first version, that was more a retro style with even more green. 
Then, Devon improved it a lot and got the current, thats more a modern 
theme. A more simple style thats works also fine on older and/or slower 
browsers/computers/connections is planned.


[pygame] Pygame2 sdlgfx error

2009-07-10 Thread Evan Kroske
When I tried to write a sdlgfx example for pygame2, I got this import error:

Traceback (most recent call last):
   File sdlgfxcircle.py, line 8, in module
 import pygame2.sdlgfx.primitives as gfx
 ImportError: /usr/lib/python2.5/site-packages/pygame2/sdlgfx/primitives.so:
 undefined symbol: arcColor


Here's the code that triggers it:

import pygame2.sdlgfx.primitives


Does anybody else get this problem?

Evan Kroske


Re: [pygame] Pygame 1.9.0 release candidate 3 for Python 2.6 on Windows

2009-07-10 Thread Lenard Lindstrom

René Dudfield wrote:



On Fri, Jul 10, 2009 at 2:25 PM, Lenard Lindstrom le...@telus.net 
mailto:le...@telus.net wrote:


Hi,


python -m pygame.tests.__main__
python -m pygame.docs.__main__

There would be no reason to run pygame.examples, right?



Yeah, maybe __main__ is good.  Perhaps pygame.tests should have a 
__main__ function too?


 import pygame.tests
 pygame.tests.main()

Since main() is what is used in the examples, it would be nice to try 
and keep it the same.  But then we need to add a main.py and a 
__main__.py... ew.





You can do a self test with:
python -m pygame.tests
Or with python2.6 do:
python -m pygame.tests.__main__


Doing it for examples could list which examples are available?


$ python -m pygame.examples
aacircle
aliens
arraydemo
blend_fill
blit_blends
camera
chimp
cursors
eventlist
fastevents
fonty
glcube
headless_no_windows_needed
liquid
mask
midi
moveit
movieplayer
oldalien
overlay
pixelarray
scaletest
scrap_clipboard
scroll
sound
sound_array_demos
stars
testsprite
vgrade


eg.


See a list of examples...
  python -m pygame.examples
Or with python2.6,
  python -m pygame.examples.__main__

Run one of the 30 examples included...
  python -m pygame.examples.aliens


I'm not sure anyone would remember to add __main__ at the end(or even 
main).  oh well.



There might be a workaround...  One work around might be to make it 
into a module-module, not a package-module.  Then have the 
module-module load the package-module into its namespace.



 



The explanation I found was that being able to run a package in
Python 2.5 was considered a bug, so was fixed in Python 2.6.
Adding __main__.py as an entry point for running a package in
Python 2.7 and 3.0 is an attempt repair the fix.

Lenard










Re: [pygame] status report

2009-07-10 Thread Devon Scott-Tunkin

Bah, I like the colors (Do you mean teal? There's not very much green in there 
any more?) and the arch linux site is boring (although clean and well 
structured), which fits with arch linux, but not pygame :). Although there will 
be a second classic theme based on the older revision if any one remembers 
(--and I will work on it this weekend, I promise, Julian). It will be simple 
and like the arch linux one and in fact already has almost the exact same menu 
design, but will use green instead of blue.

Devon

--- On Fri, 7/10/09, el lauwer el.lau...@gmail.com wrote:

 From: el lauwer el.lau...@gmail.com
 Subject: Re: [pygame] status report
 To: pygame-users@seul.org
 Date: Friday, July 10, 2009, 1:45 AM
 Hoi,
 
 I like the new logo, and it seems to work ok.
 
 I would however try to use a lot less green, I think you
 should try something like the archlinux site
 http://www.archlinux.org/
 
 
 On 10-jul-09, at 08:19, René Dudfield wrote:
 
  
  Hi,
  
  I'll get you the pygame database soon... quite busy at
 the moment.  After the pygame release.  I was
 going to give it earlier.  Sorry again.
  
  cheers,
  
 
 





Re: [pygame] Pygame 1.9.0 release candidate 3 for Python 2.6 on Windows

2009-07-10 Thread Lenard Lindstrom

main() was used to run an application from the command line:

python -c from pygame.examples.midi import main; main() --list

It was replaced with:

python -m pygame.examples.midi --list

pygame.tests does have a documented run() function that takes optional 
arguments. But pygame.tests could have a main function as well.


Lenard


René Dudfield wrote:



On Fri, Jul 10, 2009 at 2:25 PM, Lenard Lindstrom le...@telus.net 
mailto:le...@telus.net wrote:


Hi,


python -m pygame.tests.__main__
python -m pygame.docs.__main__

There would be no reason to run pygame.examples, right?



Yeah, maybe __main__ is good.  Perhaps pygame.tests should have a 
__main__ function too?


 import pygame.tests
 pygame.tests.main()

Since main() is what is used in the examples, it would be nice to try 
and keep it the same.  But then we need to add a main.py and a 
__main__.py... ew.





You can do a self test with:
python -m pygame.tests
Or with python2.6 do:
python -m pygame.tests.__main__


Doing it for examples could list which examples are available?


$ python -m pygame.examples
aacircle
aliens
arraydemo
blend_fill
blit_blends
camera
chimp
cursors
eventlist
fastevents
fonty
glcube
headless_no_windows_needed
liquid
mask
midi
moveit
movieplayer
oldalien
overlay
pixelarray
scaletest
scrap_clipboard
scroll
sound
sound_array_demos
stars
testsprite
vgrade


eg.


See a list of examples...
  python -m pygame.examples
Or with python2.6,
  python -m pygame.examples.__main__

Run one of the 30 examples included...
  python -m pygame.examples.aliens


I'm not sure anyone would remember to add __main__ at the end(or even 
main).  oh well.



There might be a workaround...  One work around might be to make it 
into a module-module, not a package-module.  Then have the 
module-module load the package-module into its namespace.



 



The explanation I found was that being able to run a package in
Python 2.5 was considered a bug, so was fixed in Python 2.6.
Adding __main__.py as an entry point for running a package in
Python 2.7 and 3.0 is an attempt repair the fix.

Lenard










Re: [pygame] status report

2009-07-10 Thread el lauwer
There is nothing wrong with colors, but on this site there are 4  
greens and 3 yellows, I now that taste can differ from person to  
person, there is still something like esthetics ;)


For now, I will stick to the classic theme :P

Slu
On 10-jul-09, at 17:27, Devon Scott-Tunkin wrote:



Bah, I like the colors (Do you mean teal? There's not very much  
green in there any more?) and the arch linux site is boring  
(although clean and well structured), which fits with arch linux,  
but not pygame :). Although there will be a second classic theme  
based on the older revision if any one remembers (--and I will work  
on it this weekend, I promise, Julian). It will be simple and like  
the arch linux one and in fact already has almost the exact same  
menu design, but will use green instead of blue.


Devon

--- On Fri, 7/10/09, el lauwer el.lau...@gmail.com wrote:


From: el lauwer el.lau...@gmail.com
Subject: Re: [pygame] status report
To: pygame-users@seul.org
Date: Friday, July 10, 2009, 1:45 AM
Hoi,

I like the new logo, and it seems to work ok.

I would however try to use a lot less green, I think you
should try something like the archlinux site
http://www.archlinux.org/


On 10-jul-09, at 08:19, René Dudfield wrote:



Hi,

I'll get you the pygame database soon... quite busy at

the moment.  After the pygame release.  I was
going to give it earlier.  Sorry again.


cheers,












Re: [pygame] Pygame2 sdlgfx error

2009-07-10 Thread Marcus von Appen
On, Fri Jul 10, 2009, Evan Kroske wrote:

 When I tried to write a sdlgfx example for pygame2, I got this import error:
 
 Traceback (most recent call last):
File sdlgfxcircle.py, line 8, in module
  import pygame2.sdlgfx.primitives as gfx
  ImportError: /usr/lib/python2.5/site-packages/pygame2/sdlgfx/primitives.so:
  undefined symbol: arcColor
 
 
 Here's the code that triggers it:
 
 import pygame2.sdlgfx.primitives
 
 
 Does anybody else get this problem?

Which SDL_gfx version do you have installed?

Regards
Marcus


pgp8QONqZL2dJ.pgp
Description: PGP signature


Re: [pygame] Pygame2 sdlgfx error

2009-07-10 Thread Evan Kroske
On Fri, Jul 10, 2009 at 1:57 PM, Marcus von Appen m...@sysfault.org wrote:

 On, Fri Jul 10, 2009, Evan Kroske wrote:

  When I tried to write a sdlgfx example for pygame2, I got this import
 error:
 
  Traceback (most recent call last):
 File sdlgfxcircle.py, line 8, in module
   import pygame2.sdlgfx.primitives as gfx
   ImportError:
 /usr/lib/python2.5/site-packages/pygame2/sdlgfx/primitives.so:
   undefined symbol: arcColor
  
 
  Here's the code that triggers it:
 
  import pygame2.sdlgfx.primitives
  
 
  Does anybody else get this problem?

 Which SDL_gfx version do you have installed?

 Regards
 Marcus


I installed my version from the repository a couple months ago for use with
pygame2. Here's the relevant dpkg output:

ii  libsdl-gfx1.2-4
 2.0.13-4  drawing and graphical effects
 extension for
 ii  libsdl-gfx1.2-dev
 2.0.13-4  development files for SDL_gfx


I don't know which number is the version number.

Evan Kroske


Re: [pygame] Pygame2 sdlgfx error

2009-07-10 Thread Marcus von Appen
On, Fri Jul 10, 2009, Evan Kroske wrote:

 On Fri, Jul 10, 2009 at 1:57 PM, Marcus von Appen m...@sysfault.org wrote:
 
  On, Fri Jul 10, 2009, Evan Kroske wrote:
 
   When I tried to write a sdlgfx example for pygame2, I got this import
  error:
  
   Traceback (most recent call last):
  File sdlgfxcircle.py, line 8, in module
import pygame2.sdlgfx.primitives as gfx
ImportError:
  /usr/lib/python2.5/site-packages/pygame2/sdlgfx/primitives.so:
undefined symbol: arcColor
   
  
   Here's the code that triggers it:
  
   import pygame2.sdlgfx.primitives
   
  
   Does anybody else get this problem?
 
  Which SDL_gfx version do you have installed?
 
  Regards
  Marcus
 
 
 I installed my version from the repository a couple months ago for use with
 pygame2. Here's the relevant dpkg output:
 
 ii  libsdl-gfx1.2-4
  2.0.13-4  drawing and graphical effects
  extension for
  ii  libsdl-gfx1.2-dev
  2.0.13-4  development files for SDL_gfx
 

 I don't know which number is the version number.

2.0.13 it is. This however is a fairly old release and not supported by
pgreloaded. It requires at least version 2.0.18 (see the README.txt for
more information about the dependencies).

Regards
Marcus


pgpRNoxxewZTI.pgp
Description: PGP signature


[pygame] diff util?

2009-07-10 Thread Jake b
My brother is getting interested in programming, so I'm showing him pygame.

I need a 'diff' like utility that's easy to use in ideally geany/scite.

It could be another program -- I need an easy way to show what lines are new.

(we both are using win32)
-- 
Jake


Re: [pygame] diff util?

2009-07-10 Thread Zack Schilling

Geany's version control tools include diff.

-Zack

On Jul 10, 2009, at 3:54 PM, Jake b wrote:


geany




Re: [pygame] diff util?

2009-07-10 Thread James Paige
On Fri, Jul 10, 2009 at 02:54:52PM -0500, Jake b wrote:
 My brother is getting interested in programming, so I'm showing him pygame.
 
 I need a 'diff' like utility that's easy to use in ideally geany/scite.
 
 It could be another program -- I need an easy way to show what lines are new.
 
 (we both are using win32)

Not sure if this is what you are looking for, but Geany has a built-in 
diff plugin called Version Diff which can be enabled from 
Tools-Plugin Manager

---
James Paige


Re: [pygame] diff util?

2009-07-10 Thread Andrew Meadows

Jake b wrote:

My brother is getting interested in programming, so I'm showing him pygame.

I need a 'diff' like utility that's easy to use in ideally geany/scite.

It could be another program -- I need an easy way to show what lines are new.

(we both are using win32)


There are several free utils for looking at code diffs mentioned on this page:

http://www.thefreecountry.com/programming/filecomparison.shtml

Personally I use vim, but I once used winMerge (which is mentioned on
the page above) and found it to be decent.

- Andrew


Re: [pygame] Incrementing the frequency of the Pygame.mixer with a Loop?

2009-07-10 Thread Brian Gryder
pygame.quit() worked! I can now hear the pitch changing, Thanks!
Is there a way to do this without closing the pygame window everytime it
loops?

Here is the working code with the pygame window closing and reopening each
loop:

import pygame
from pygame.locals import *
from sys import exit

screen = pygame.display.set_mode((800, 600), 0, 32)
frequency = 44100
while True:
   frequency = frequency + 2000
   print frequency
   pygame.mixer.pre_init(frequency, 16, 2, 4096)
   pygame.init()
   test_sound = pygame.mixer.Sound(check.wav)
   mychannel = test_sound.play()
   while pygame.mixer.get_busy() == True:
   pass
   pygame.quit()
   screen = pygame.display.set_mode((800, 600), 0, 32) #to reopen the closed
window.
--


On Thu, Jul 9, 2009 at 8:22 PM, Lenard Lindstrom le...@telus.net wrote:

 Hi,

 You have pygame.quit instead of pygame.quit() .

 Lenard

 Brian Gryder wrote:

 Thanks for the reply Lenard,  I tried your suggestion and the pitch is
 still not changing as the frequency increments with the loop.

 This is a strange issue. if I manually change the value if frequency
 before I run it, the sound changes. it is as if the pygame.mixer's
 parameters are Stuckand can't be changed during runtime. Is there a way I
 can verify that the pygame.mixer and the sound objects are unloaded before I
 restart the loop?

 Is there anything else I can try? Any links or snippet of code would be
 greatly appreciated.

 Here is the updated program
 -
 import pygame
 from pygame.locals import *
 from sys import exit

 #pgyame.display.set_mode must also come after the pygame.init. The display
 is not necessary for mixer though. -Lenard
 #screen = pygame.display.set_mode((800, 600), 0, 32)
 frequency = 44100
 while True:
frequency = frequency + 2000
print frequency
pygame.mixer.pre_init(frequency, 16, 2, 4096)
pygame.init()
test_sound = pygame.mixer.Sound(check.wav)
mychannel = test_sound.play()
while pygame.mixer.get_busy() == True:
pass
pygame.quit # do a pygame.quit rather than pygame.mixer.quit for each
 loop -Lenard


  
 ---


 On Wed, Jul 8, 2009 at 2:26 AM, Lenard Lindstrom le...@telus.netmailto:
 le...@telus.net wrote:

Hi Brian,

You would probably have to do a pygame.quit rather than
pygame.mixer.quit for each pass of the loop. The
pgyame.display.set_mode must also come after the pygame.init. The
display is not necessary for mixer though.

Lenard


Brian Gryder wrote:

'''
How do I change the frequency of the Pygame.mixer by
incrementing the frequency value in a loop?

Please see the example below where I am trying to initialize
the frequency at 44100 and then add 2000 to the frequency each
time it loops. In this example below the pitch does not
change, I really want it to change.

Any links or snippet of code would be greatly appreciated, Thanks!
 '''

import pygame
from pygame.locals import *
from sys import exit

screen = pygame.display.set_mode((800, 600), 0, 32)
frequency = 44100

while True:

   frequency = frequency + 2000
   print frequency

   pygame.mixer.pre_init(frequency, 16, 2, 4096)
   pygame.init()
   test_sound = 
   test_sound = pygame.mixer.Sound(check.wav)
   mychannel = test_sound.play()

   while pygame.mixer.get_busy() == True:
   pass
   #passing

   pygame.mixer.quit








Re: [pygame] Incrementing the frequency of the Pygame.mixer with a Loop?

2009-07-10 Thread Lenard Lindstrom

Hi,

I don't know the specific circumstances that required 
pygame.mixer.pre_init(). But according to the docs (python -m 
pyagme.docs will display the docs in the default browser) the 
requirement was that pgyame.mixer was initialized after the display. So 
I suppose you can initialize pygame and the display outside the loop, 
then do pygame.mizer.quit() and pygame.mixer.init() calls in the loop.


Lenard


Brian Gryder wrote:

pygame.quit() worked! I can now hear the pitch changing, Thanks!
Is there a way to do this without closing the pygame window everytime 
it loops?


Here is the working code with the pygame window closing and reopening 
each loop:


import pygame
from pygame.locals import *
from sys import exit

screen = pygame.display.set_mode((800, 600), 0, 32)
frequency = 44100
while True:
   frequency = frequency + 2000
   print frequency
   pygame.mixer.pre_init(frequency, 16, 2, 4096)
   pygame.init()
   test_sound = pygame.mixer.Sound(check.wav)
   mychannel = test_sound.play()
   while pygame.mixer.get_busy() == True:
   pass
   pygame.quit()
   screen = pygame.display.set_mode((800, 600), 0, 32) #to reopen the 
closed window.

--


On Thu, Jul 9, 2009 at 8:22 PM, Lenard Lindstrom le...@telus.net 
mailto:le...@telus.net wrote:


Hi,

You have pygame.quit instead of pygame.quit() .

Lenard

Brian Gryder wrote:

Thanks for the reply Lenard,  I tried your suggestion and the
pitch is still not changing as the frequency increments with
the loop.

This is a strange issue. if I manually change the value if
frequency before I run it, the sound changes. it is as if the
pygame.mixer's parameters are Stuckand can't be changed
during runtime. Is there a way I can verify that the
pygame.mixer and the sound objects are unloaded before I
restart the loop?

Is there anything else I can try? Any links or snippet of code
would be greatly appreciated.

Here is the updated program
-
import pygame
from pygame.locals import *
from sys import exit

#pgyame.display.set_mode must also come after the pygame.init.
The display is not necessary for mixer though. -Lenard
#screen = pygame.display.set_mode((800, 600), 0, 32)
frequency = 44100
while True:
   frequency = frequency + 2000
   print frequency
   pygame.mixer.pre_init(frequency, 16, 2, 4096)
   pygame.init()
   test_sound = pygame.mixer.Sound(check.wav)
   mychannel = test_sound.play()
   while pygame.mixer.get_busy() == True:
   pass
   pygame.quit # do a pygame.quit rather than
pygame.mixer.quit for each loop -Lenard

 
 ---



On Wed, Jul 8, 2009 at 2:26 AM, Lenard Lindstrom
le...@telus.net mailto:le...@telus.net
mailto:le...@telus.net mailto:le...@telus.net wrote:

   Hi Brian,

   You would probably have to do a pygame.quit rather than
   pygame.mixer.quit for each pass of the loop. The
   pgyame.display.set_mode must also come after the
pygame.init. The
   display is not necessary for mixer though.

   Lenard


   Brian Gryder wrote:

   '''
   How do I change the frequency of the Pygame.mixer by
   incrementing the frequency value in a loop?

   Please see the example below where I am trying to
initialize
   the frequency at 44100 and then add 2000 to the
frequency each
   time it loops. In this example below the pitch does not
   change, I really want it to change.

   Any links or snippet of code would be greatly
appreciated, Thanks!
'''

   import pygame
   from pygame.locals import *
   from sys import exit

   screen = pygame.display.set_mode((800, 600), 0, 32)
   frequency = 44100

   while True:

  frequency = frequency + 2000
  print frequency

  pygame.mixer.pre_init(frequency, 16, 2, 4096)
  pygame.init()
  test_sound = 
  test_sound = pygame.mixer.Sound(check.wav)
  mychannel = test_sound.play()

  while pygame.mixer.get_busy() == True:
  pass
  #passing

  pygame.mixer.quit