Re: [pygame] mixer.music in runtime

2008-04-02 Thread Bo Jangeborg

More info on mixer.music
It works in the pygame 1.7 so looks like we have a bug in 1.8.

Bo Jangeborg skrev:

Hi

I am trying to run pygame.mixer.music after having created a py2exe.

The import seem to work ok, but it never loads the music method
so the following doesn't work

import pygame.mixer
print pygame.mixer.music

Traceback (most recent call last):
 File test.pyw, line 728, in module
 File test.pyw, line 128, in main
 File vers_01\Program\Test\testgame.pyw, line 66, in run
 File vers_01\Program\Test\testgame.pyw, line 147, in __init__
 File vers_01\Program\Test\testgame.pyw, line 158, in initiate_music
 File vers_01\Program\TestMusic\__init__.py, line 1, in module
 File vers_01\Program\TestMusic\musix.pyw, line 11, in module
AttributeError: 'module' object has no attribute 'music'


In the developer version it works and the print returns :

module 'pygame.mixer_music' from 'C:\Program 
Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'


What could I be doing wrong ?





Re: [pygame]

2008-04-02 Thread Ankush Thakur
Come on,

Let people choose. They usually come back after some time. If they don't,
they loose. :)

On Tue, Apr 1, 2008 at 8:39 AM, Ian Mallett [EMAIL PROTECTED] wrote:

 On Mon, Mar 31, 2008 at 7:51 PM, Patrick Mullen [EMAIL PROTECTED]
 wrote:

  This makes me sad.

 Me too.



Re: [pygame]

2008-04-02 Thread Terry Hancock
Patrick Mullen wrote:
 This makes me sad.

That they're leaving or that they can't figure out how to do it right? :-)

-- 
Terry Hancock ([EMAIL PROTECTED])
Anansi Spaceworks http://www.AnansiSpaceworks.com



[pygame] I'm loving wills book :)

2008-04-02 Thread Lamonte(Scheols/Demonic)
that pygame book, its nice, anyone learn anything new?

-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Kamilche

Lamonte(Scheols/Demonic) wrote:

that pygame book, its nice, anyone learn anything new?

Oh yeah, I was going to get that! Thanks for mentioning it. It took a 
while to come out!




Re: [pygame]

2008-04-02 Thread Ian Mallett
On 4/2/08, Terry Hancock [EMAIL PROTECTED] wrote:
 That they're leaving or that they can't figure out how to do it right? :-)
That they're leaving implies a non-need for this list.  Of course,
this means that either they aren't getting the help with PyGame (this
list is not helpful), or they're done with PyGame (PyGame losing
support).  Both are sad, because it means that either the list doesn't
work or PyGame is faulty (or at least not interesting enough to make
people want to use it).
Ian


Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Pete Shinners

Kamilche wrote:
Hi all. I'm trying to create a rotated tilable bitmap out of a tilable 
bitmap, but it's not working. My first attempt was to tile the bitmap 
across a larger picture, rotate the larger picture, and then cut a tile 
out of the middle, but that didn't work - the resulting picture wasn't 
tilable.


I see that the problem is a lot more complex than I thought, and I don't 
have a handle on how to do it.


I would expect you could do this. You'll need to rotate the surface, and 
 then blit it back onto itself 8 times with offsets. The offsets will 
be the rotated corners of the original image rect.


There will likely be interpolation and small pixel seams along the 
edges. You could probably cheat it by bringing the blit offsets back 1 
pixel?



# rotate surface
angle = 15
rotsurf = pygame.transform.rotate(surf, angle)

# compute the offsets needed
c = cos(radians(angle))
s = sin(radians(angle))
widthx = (surf.width() - 1) * c
widthy = (surf.width() - 1) * a
heightx = (surf.height() - 1) * a
heighty = (surf.height() - 1) * c

# the 8 positions, corners first
positions = [
(widthx + heightx, widthy + heighty),
(widthx - heightx, widthy - heighty),
(-widthx + heightx, -widthy + heighty),
(-widthx - heightx, -widthy - heighty),
(widthx, widthy),
(-widthx, -widthy),
(heightx, heighty),
(-heightx, -heighty),
]

# apply the blits
for pos in positions:
rotsurf.blit(rotsurf, pos)


This is all theoretical. In my mind it seems like this should fly.



Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche

Pete Shinners wrote:
I would expect you could do this. You'll need to rotate the surface, and 
 then blit it back onto itself 8 times with offsets. The offsets will be 
the rotated corners of the original image rect.




Yeah, it didn't work. It seems like it should, but run the following 
code (your code worked up into a program), and wave the mouse back and 
forth to change the angle.


Odd, huh? It's a tricky bit, apparently. The only hits I found on the 
internet were for software patents I didn't understand.


--Kamilche


import pygame
import math

filename=rC:\Documents and Settings\Administrator\Desktop\batik.jpg

SCREENWIDTH = 640
SCREENHEIGHT = 480

def Rotated(surf, degrees = 0):
# rotate surface
print 'Rotated ', degrees, ' degrees.'
rotsurf = pygame.transform.rotate(surf, degrees)

# compute the offsets needed
c = math.cos(math.radians(degrees))
s = math.sin(math.radians(degrees))
widthx = (surf.get_width() - 1) * c
widthy = (surf.get_width() - 1) * s
heightx = (surf.get_height() - 1) * s
heighty = (surf.get_height() - 1) * c

# the 8 positions, corners first
positions = [
(widthx + heightx, widthy + heighty),
(widthx - heightx, widthy - heighty),
(-widthx + heightx, -widthy + heighty),
(-widthx - heightx, -widthy - heighty),
(widthx, widthy),
(-widthx, -widthy),
(heightx, heighty),
(-heightx, -heighty),
]

# apply the blits
for pos in positions:
rotsurf.blit(rotsurf, pos)
return rotsurf

def main():
pygame.init()
bg = pygame.display.set_mode((SCREENWIDTH, SCREENHEIGHT), 0, 32)

quit = 0
pic = pygame.image.load(filename).convert_alpha()
pic2 = pic
while not quit:
bg.fill((255, 0, 0, 255))
bg.blit(pic2, (0, 0))
pygame.display.flip()
for e in pygame.event.get():
if e.type == pygame.QUIT:
quit = 1
break
elif e.type == pygame.MOUSEMOTION:
pic2 = Rotated(pic, e.pos[0])

pygame.quit()

main()


Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Brian Fisher
there were 3 problems with the thing above
---
the major problem was that sin  cos work in a space where +y is up,
pygame in a space where +y is down
a minor problem was that the four corners will never be visible at all
(think about the surface rotate produces - the bounds go through the
four corners of the rotated image)
a problem that actually isn't a problem (once it was tiling okay) was
that it kept drawing over itself (rotsurf.blit(rotsruf))

also as a note, you can tile a rotated image on a rotated grid (as
this code demonstrates) but their are complexities with filtering (as
I mentioned earlier)

but if you want to make a rectangular tile that tiles on a rectangular
grid from your rotated image, then that is more complicated (unless
the rotation is 45 and the original image square - which is what Aaron
was talking about), but I would guess it can be done, but may result
in a disgustingly large tile (you'd have to keep tiling the image on
the rotated grid until the edge lines line up and cut a rect at that
point)

anyways, here's the corrected code

import pygame
import math

filename=rMockUpMemory.png

SCREENWIDTH = 800
SCREENHEIGHT = 600

def Rotated(surf, degrees = 0):
   # rotate surface
   print 'Rotated ', degrees, ' degrees.'
   rotsurf = pygame.transform.rotate(surf, degrees)

   # compute the offsets needed
   c = math.cos(math.radians(degrees))
   s = math.sin(math.radians(degrees))
   widthx = (surf.get_width() - 1) * c
   widthy = (surf.get_width() - 1) * s
   heightx = (surf.get_height() - 1) * s
   heighty = (surf.get_height() - 1) * c


   # the 8 positions, corners first
   positions = [
#   (widthx + heightx, widthy + heighty),
#   (widthx - heightx, widthy - heighty),
#   (-widthx + heightx, -widthy + heighty),
#   (-widthx - heightx, -widthy - heighty),
#   (widthx, widthy),
   (widthx, -widthy),
#  (-widthx, -widthy),
   (-widthx, widthy),
#   (heightx, heighty),
   (heightx, heighty),
#   (-heightx, -heighty),
   (-heightx, -heighty),
   ]

   rot_copy = rotsurf.copy()
   # apply the blits
   for pos in positions:
   rotsurf.blit(rot_copy, pos)
   return rotsurf

def main():
   pygame.init()
   bg = pygame.display.set_mode((SCREENWIDTH, SCREENHEIGHT), 0, 32)

   quit = 0
   pic = pygame.image.load(filename).convert_alpha()
   pic2 = pic
   while not quit:
   bg.fill((255, 0, 0, 255))
   bg.blit(pic2, (0, 0))
   pygame.display.flip()
   for e in pygame.event.get():
   if e.type == pygame.QUIT:
   quit = 1
   break
   elif e.type == pygame.MOUSEMOTION:
   pic2 = Rotated(pic, e.pos[0])

   pygame.quit()

main()


[pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Nisarg Kothari
I am considering applying to the Python Software Foundation to create
a generic AI module for pygame. I would create a framework for
fundamental AI algorithms like A* (for pathfinding), behavior trees,
and Finite State Machines (for behavior). However, on the PSF mentors
page (http://wiki.python.org/moin/SummerOfCode/Mentors), I don't see
any mentors listed who are associated with pygame. I am concerned that
my application may get rejected because the PSF is unable to find a
mentor for me. Are the pygame developers interested in mentoring
students, and if so, have they gotten in touch with the Python
Software Foundation?

Sincerely,
Nisarg Kothari


Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
Well, that was interesting, but also didn't work. It's similar to my 
attempt of tiling then rotating then cutting a piece out of the middle.


I've modified the code to show what happens when that tile is tiled. 
Interesting, tho!


--Kamilche

import pygame
import math

filename=rG:\Incarnation\Models\Textures\test.png
SCREENWIDTH = 800
SCREENHEIGHT = 600

def Rotated(surf, degrees = 0):
   # rotate surface
   rotsurf = pygame.transform.rotozoom(surf, degrees, 1)

   # compute the offsets needed
   c = math.cos(math.radians(degrees))
   s = math.sin(math.radians(degrees))
   widthx = (surf.get_width() - 1) * c
   widthy = (surf.get_width() - 1) * s
   heightx = (surf.get_height() - 1) * s
   heighty = (surf.get_height() - 1) * c


   # the 8 positions, corners first
   positions = [
   (widthx, -widthy),
   (-widthx, widthy),
   (heightx, heighty),
   (-heightx, -heighty),
   ]

   rot_copy = rotsurf.copy()

   # apply the blits
   for pos in positions:
   rotsurf.blit(rot_copy, pos)
   return rotsurf

def Tile(surf, pic, rect):
x = rect[0]
y = rect[1]
while y  rect[3]:
x = 0
while x  rect[2]:
surf.blit(pic, [x, y])
x += pic.get_width()
y += pic.get_height()


def main():
   pygame.init()
   bg = pygame.display.set_mode((SCREENWIDTH, SCREENHEIGHT), 0, 32)

   quit = 0
   pic = pygame.image.load(filename).convert_alpha()
   pic2 = pic
   while not quit:
   bg.fill((255, 0, 0, 255))
   bg.blit(pic2, (0, 0))
   Tile(bg, pic2, [0, 200, 512, 512])
   pygame.display.flip()
   for e in pygame.event.get():
   if e.type == pygame.QUIT:
   quit = 1
   break
   elif e.type == pygame.MOUSEMOTION:
   pic2 = Rotated(pic, e.pos[0])

   pygame.quit()

main()


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Marcus von Appen
On, Wed Apr 02, 2008, Nisarg Kothari wrote:

 I am considering applying to the Python Software Foundation to create
 a generic AI module for pygame. I would create a framework for
 fundamental AI algorithms like A* (for pathfinding), behavior trees,
 and Finite State Machines (for behavior). However, on the PSF mentors
 page (http://wiki.python.org/moin/SummerOfCode/Mentors), I don't see
 any mentors listed who are associated with pygame. I am concerned that
 my application may get rejected because the PSF is unable to find a
 mentor for me. Are the pygame developers interested in mentoring
 students, and if so, have they gotten in touch with the Python
 Software Foundation?

Yes and yes to answer your questions. We just forgot to add ourselves to
the list. So go on and add your application.

Regards
Marcus


pgplzB0ENQQqc.pgp
Description: PGP signature


Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Aaron Maupin

Brian Fisher wrote:


but if you want to make a rectangular tile that tiles on a rectangular
grid from your rotated image, then that is more complicated (unless
the rotation is 45 and the original image square - which is what Aaron
was talking about), but I would guess it can be done, but may result
in a disgustingly large tile (you'd have to keep tiling the image on
the rotated grid until the edge lines line up and cut a rect at that
point)


Yes, if you place down 9 square tiles in a 3x3 pattern, rotate the image 
plus or minus 45 degrees, then you can grab a new repeating tile by 
sampling any square inside the rotated image (any square that contains 
rotated data - naturally the corners don't count) that's approximately 
1.414 (square root of 2) times the size of the original tile.


Other angles will repeat, too, but like Brian says, they'll be 
disgustingly large.  As in many, many times the size of the original tile.


Aaron


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Gabriel Hasbun
I use it as a reference.

Lamonte(Scheols/Demonic) [EMAIL PROTECTED] wrote: that pygame book, its 
nice, anyone learn anything new?

-- 
Join cleanscript.com Come here for professional PHP coding.  

   
-
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.

Re: [pygame] Tiling a Rotated Bitmap (along the unrotated axes)

2008-04-02 Thread Dave LeCompte (really)
Aaron Maupin [EMAIL PROTECTED] wrote:

 Other angles will repeat, too, but like Brian says, they'll be
 disgustingly large.  As in many, many times the size of the original tile.

Some of the new tile sizes will be large, but they don't need to be many,
many times the size of the original tile.

Really, it boils down to making a right triangle and measuring the
hypotenuse to find the new tile size, and measuring one of the (non-right)
angles.

For example, a right triangle with legs of 1 and 2 yields angles of about
27 and 63 degrees and a hypotenuse of about 2.24, which might be small
enough to be of use.

Other angles you can use, with new tile sizes less than 10x the original:

new sz  X  Y  angle
---
 2.236  1  2 26.565
 3.162  1  3 18.435
 3.606  2  3 33.690
 4.123  1  4 14.036
 5.000  3  4 36.870
 5.099  1  5 11.310
 5.385  2  5 21.801
 5.831  3  5 30.964
 6.083  1  6  9.462
 6.403  4  5 38.660
 7.071  1  7  8.130
 7.280  2  7 15.945
 7.616  3  7 23.199
 7.810  5  6 39.806
 8.062  1  8  7.125
 8.062  4  7 29.745
 8.544  3  8 20.556
 8.602  5  7 35.538
 9.055  1  9  6.340
 9.220  2  9 12.529
 9.220  6  7 40.601
 9.434  5  8 32.005
 9.849  4  9 23.962


If your eye caught on the 3-4-5 right triangle, that might be especially
handy because it's a rare occurrence of a right triangle with all
integer-length sizes. This might be handy if you don't want to muck around
with floating point multiples (or, hey, if you're trying to lay out Lego
pieces at an angle to a baseplate). Other integer triples like this
include 5-12-13, 8-15-17, and 7-24-25. But even I'd call 25 much larger
than your original tile size.

-Dave LeCompte


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Lamonte(Scheols/Demonic)
I'm having a friend convert it to chm because pdf is slow:(, my friend
bought me the ebook version off apress,

On Wed, Apr 2, 2008 at 3:34 PM, Gabriel Hasbun [EMAIL PROTECTED]
wrote:

 I use it as a reference.

 *Lamonte(Scheols/Demonic) [EMAIL PROTECTED]* wrote:

 that pygame book, its nice, anyone learn anything new?

 --
 Join cleanscript.com Come here for professional PHP coding.


 --
 You rock. That's why Blockbuster's offering you one month of Blockbuster
 Total 
 Accesshttp://us.rd.yahoo.com/evt=47523/*http://tc.deals.yahoo.com/tc/blockbuster/text5.com,
 No Cost.




-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread René Dudfield
hi,

It might be best (if you have time), to make another application for
something to do with python, and not so much pygame.  Keep your
original application.  Since there's only two of us mentoring for
pygame so far - and there have been quite a few pygame related
applications.  It would increase your chances of getting accepted.  Or
instead consider applying to one of the other organisations we listed
(bbc especially) - they have a few pygame related ideas listed.


cheers,


On Thu, Apr 3, 2008 at 6:40 AM, Marcus von Appen [EMAIL PROTECTED] wrote:

 On, Wed Apr 02, 2008, Nisarg Kothari wrote:

   I am considering applying to the Python Software Foundation to create
   a generic AI module for pygame. I would create a framework for
   fundamental AI algorithms like A* (for pathfinding), behavior trees,
   and Finite State Machines (for behavior). However, on the PSF mentors
   page (http://wiki.python.org/moin/SummerOfCode/Mentors), I don't see
   any mentors listed who are associated with pygame. I am concerned that
   my application may get rejected because the PSF is unable to find a
   mentor for me. Are the pygame developers interested in mentoring
   students, and if so, have they gotten in touch with the Python
   Software Foundation?

  Yes and yes to answer your questions. We just forgot to add ourselves to
  the list. So go on and add your application.

  Regards
  Marcus



Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Richard Jones
On Thu, 3 Apr 2008, René Dudfield wrote:
 It might be best (if you have time), to make another application for
 something to do with python, and not so much pygame.

I believe there would be a better chance of acceptance (and also a wider 
audience :) if the AI module was not pygame-specific. Consider also that 
there's already quite a number of AI modules for Python out in the wilds, so 
this won't be particularly new work.


Richard


Re: [pygame] mixer.music in runtime

2008-04-02 Thread René Dudfield
Can you tell py2exe to include the pygame.music_mixer or
mixer_music.pyd module specifically?


On Wed, Apr 2, 2008 at 9:13 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:
 More info on mixer.music
  It works in the pygame 1.7 so looks like we have a bug in 1.8.

  Bo Jangeborg skrev:



  Hi
 
  I am trying to run pygame.mixer.music after having created a py2exe.
 
  The import seem to work ok, but it never loads the music method
  so the following doesn't work
 
  import pygame.mixer
  print pygame.mixer.music
 
  Traceback (most recent call last):
   File test.pyw, line 728, in module
   File test.pyw, line 128, in main
   File vers_01\Program\Test\testgame.pyw, line 66, in run
   File vers_01\Program\Test\testgame.pyw, line 147, in __init__
   File vers_01\Program\Test\testgame.pyw, line 158, in initiate_music
   File vers_01\Program\TestMusic\__init__.py, line 1, in module
   File vers_01\Program\TestMusic\musix.pyw, line 11, in module
  AttributeError: 'module' object has no attribute 'music'
 
 
  In the developer version it works and the print returns :
 
  module 'pygame.mixer_music' from 'C:\Program
 Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'
 
  What could I be doing wrong ?
 
 




Re: [pygame]

2008-04-02 Thread Lamonte(Scheols/Demonic)
ffor some reason google mail doesn't like skipping my inbox :(, how do I
fix?

On Wed, Apr 2, 2008 at 4:15 PM, René Dudfield [EMAIL PROTECTED] wrote:

 I use gmail filters to go directly to a label and skip my inbox.  More
 options- filter messages like these.

 Otherwise I get too many pygame emails arriving in my inbox.

 cu,

 On Thu, Apr 3, 2008 at 4:06 AM, Lamonte(Scheols/Demonic)
 [EMAIL PROTECTED] wrote:
  OR!!! Like me I change emails ;) which I need to make a pygame dedicated
  gmail account this week.
 
 
 
 
  On Wed, Apr 2, 2008 at 12:00 PM, Ian Mallett [EMAIL PROTECTED]
 wrote:
 
  
   On 4/2/08, Terry Hancock [EMAIL PROTECTED] wrote:
That they're leaving or that they can't figure out how to do it
 right?
  :-)
   That they're leaving implies a non-need for this list.  Of course,
   this means that either they aren't getting the help with PyGame (this
   list is not helpful), or they're done with PyGame (PyGame losing
   support).  Both are sad, because it means that either the list doesn't
   work or PyGame is faulty (or at least not interesting enough to make
   people want to use it).
   Ian
  
 
 
 
  --
  Join cleanscript.com Come here for professional PHP coding.




-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame]

2008-04-02 Thread René Dudfield
You need to select the Skip inbox (Archive) option in the filter.

On Thu, Apr 3, 2008 at 8:19 AM, Lamonte(Scheols/Demonic)
[EMAIL PROTECTED] wrote:
 ffor some reason google mail doesn't like skipping my inbox :(, how do I
 fix?



 On Wed, Apr 2, 2008 at 4:15 PM, René Dudfield [EMAIL PROTECTED] wrote:

  I use gmail filters to go directly to a label and skip my inbox.  More
  options- filter messages like these.
 
  Otherwise I get too many pygame emails arriving in my inbox.
 
  cu,
 
 
 
 
  On Thu, Apr 3, 2008 at 4:06 AM, Lamonte(Scheols/Demonic)
  [EMAIL PROTECTED] wrote:
   OR!!! Like me I change emails ;) which I need to make a pygame dedicated
   gmail account this week.
  
  
  
  
   On Wed, Apr 2, 2008 at 12:00 PM, Ian Mallett [EMAIL PROTECTED]
 wrote:
  
   
On 4/2/08, Terry Hancock [EMAIL PROTECTED] wrote:
 That they're leaving or that they can't figure out how to do it
 right?
   :-)
That they're leaving implies a non-need for this list.  Of course,
this means that either they aren't getting the help with PyGame (this
list is not helpful), or they're done with PyGame (PyGame losing
support).  Both are sad, because it means that either the list doesn't
work or PyGame is faulty (or at least not interesting enough to make
people want to use it).
Ian
   
  
  
  
   --
   Join cleanscript.com Come here for professional PHP coding.
 



 --

 Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Nisarg Kothari
So would you recommend that I not mention pygame specifically, and
just focus on differentiating my proposed project from the existing AI
projects that use Python?

Nisarg

On Wed, Apr 2, 2008 at 5:15 PM, Richard Jones
[EMAIL PROTECTED] wrote:
 On Thu, 3 Apr 2008, René Dudfield wrote:
   It might be best (if you have time), to make another application for
   something to do with python, and not so much pygame.

  I believe there would be a better chance of acceptance (and also a wider
  audience :) if the AI module was not pygame-specific. Consider also that
  there's already quite a number of AI modules for Python out in the wilds, so
  this won't be particularly new work.


 Richard



Re: [pygame]

2008-04-02 Thread René Dudfield
I use gmail filters to go directly to a label and skip my inbox.  More
options- filter messages like these.

Otherwise I get too many pygame emails arriving in my inbox.

cu,

On Thu, Apr 3, 2008 at 4:06 AM, Lamonte(Scheols/Demonic)
[EMAIL PROTECTED] wrote:
 OR!!! Like me I change emails ;) which I need to make a pygame dedicated
 gmail account this week.




 On Wed, Apr 2, 2008 at 12:00 PM, Ian Mallett [EMAIL PROTECTED] wrote:

 
  On 4/2/08, Terry Hancock [EMAIL PROTECTED] wrote:
   That they're leaving or that they can't figure out how to do it right?
 :-)
  That they're leaving implies a non-need for this list.  Of course,
  this means that either they aren't getting the help with PyGame (this
  list is not helpful), or they're done with PyGame (PyGame losing
  support).  Both are sad, because it means that either the list doesn't
  work or PyGame is faulty (or at least not interesting enough to make
  people want to use it).
  Ian
 



 --
 Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread René Dudfield
If you can find an existing AI project that looks good, perhaps
approach them and see if they will mentor you.

Do you know where these other python AI projects are Richard?

cheers,



On Thu, Apr 3, 2008 at 8:35 AM, Richard Jones
[EMAIL PROTECTED] wrote:
 On Thu, 3 Apr 2008, Nisarg Kothari wrote:
   So would you recommend that I not mention pygame specifically, and
   just focus on differentiating my proposed project from the existing AI
   projects that use Python?

  Mention gaming by all means, but present the effort with a wider scope. And
  yes, you'd need to address how your project differs from existing projects.


Richard



Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche

Brian Fisher wrote:

So why do you need a rectangular tile to tile? why not tile a rotated
image on a rotated grid? (i.e. like with Pete's code)

The resulting tile can be any shape, I don't care. I may have coded it 
up wrong, but it appeared Pete's code resulted in something that didn't 
tile.


Do you spot a mistake in the app I posted?

--Kamilche




Re: [pygame]

2008-04-02 Thread Lamonte(Scheols/Demonic)
Thanks, back when I added the filter some time beginning of the year that
feature wasn't availible to me and I couldn't get an answer why, but now it
works fine :)

On Wed, Apr 2, 2008 at 4:24 PM, René Dudfield [EMAIL PROTECTED] wrote:

 You need to select the Skip inbox (Archive) option in the filter.

 On Thu, Apr 3, 2008 at 8:19 AM, Lamonte(Scheols/Demonic)
 [EMAIL PROTECTED] wrote:
  ffor some reason google mail doesn't like skipping my inbox :(, how do I
  fix?
 
 
 
  On Wed, Apr 2, 2008 at 4:15 PM, René Dudfield [EMAIL PROTECTED] wrote:
 
   I use gmail filters to go directly to a label and skip my inbox.  More
   options- filter messages like these.
  
   Otherwise I get too many pygame emails arriving in my inbox.
  
   cu,
  
  
  
  
   On Thu, Apr 3, 2008 at 4:06 AM, Lamonte(Scheols/Demonic)
   [EMAIL PROTECTED] wrote:
OR!!! Like me I change emails ;) which I need to make a pygame
 dedicated
gmail account this week.
   
   
   
   
On Wed, Apr 2, 2008 at 12:00 PM, Ian Mallett [EMAIL PROTECTED]
  wrote:
   

 On 4/2/08, Terry Hancock [EMAIL PROTECTED] wrote:
  That they're leaving or that they can't figure out how to do it
  right?
:-)
 That they're leaving implies a non-need for this list.  Of course,
 this means that either they aren't getting the help with PyGame
 (this
 list is not helpful), or they're done with PyGame (PyGame losing
 support).  Both are sad, because it means that either the list
 doesn't
 work or PyGame is faulty (or at least not interesting enough to
 make
 people want to use it).
 Ian

   
   
   
--
Join cleanscript.com Come here for professional PHP coding.
  
 
 
 
  --
 
  Join cleanscript.com Come here for professional PHP coding.




-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Richard Jones
On Thu, 3 Apr 2008, Nisarg Kothari wrote:
 So would you recommend that I not mention pygame specifically, and
 just focus on differentiating my proposed project from the existing AI
 projects that use Python?

Mention gaming by all means, but present the effort with a wider scope. And 
yes, you'd need to address how your project differs from existing projects.


   Richard


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Wayne Koorts
 I'm having a friend convert it to chm because pdf is slow:(, my friend
 bought me the ebook version off apress,

Probably much less trouble to just get a better PDF reader.  PDF
itself isn't necessarily slow, it's just a file format.  If you use
Windows I can recommend Sumatra:
http://blog.kowalczyk.info/software/sumatrapdf/

Regards,
Wayne Koorts
http://www.wkoorts.com


Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Nisarg Kothari
I've searched pretty thoroughly for a project similar to mine, and to date I
have not been able to find one. There are a lot of implementations and
projects dealing with 'research ai', but none that focus on the practical
kinds of AI implementations that are used extensively as solutions to
_other_ problems rather than interesting problems in their own right. In a
way this is a good thing, since it allows me to differentiate my project
very well from the existing body of work. However, it also means that it
will be more difficult for me to find a mentor.

Nisarg

On Wed, Apr 2, 2008 at 5:47 PM, René Dudfield [EMAIL PROTECTED] wrote:
 If you can find an existing AI project that looks good, perhaps
  approach them and see if they will mentor you.

  Do you know where these other python AI projects are Richard?

  cheers,



  On Thu, Apr 3, 2008 at 8:35 AM, Richard Jones

 [EMAIL PROTECTED] wrote:


  On Thu, 3 Apr 2008, Nisarg Kothari wrote:
 So would you recommend that I not mention pygame specifically, and
 just focus on differentiating my proposed project from the existing
AI
 projects that use Python?
  
Mention gaming by all means, but present the effort with a wider
scope. And
yes, you'd need to address how your project differs from existing
projects.
  
  
  Richard
  



Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Brian Fisher
On Wed, Apr 2, 2008 at 3:49 PM, Kamilche [EMAIL PROTECTED] wrote:
 Brian Fisher wrote:
  The resulting tile can be any shape, I don't care. I may have coded it up
 wrong, but it appeared Pete's code resulted in something that didn't tile.

Pete's code wasn't complete, but after fixes for rotation problems it
demonstrated doing rotated grid tiling (i.e. it tiled inside rotsurf).
Code that uses a similar approach could draw all the rotated image
copies it needed to fill whatever you needed to fill.

... of course it will still either have edge seams (if using rotozoom
for rotation) or nearest neighbor artifacts (if using rotate)

  Do you spot a mistake in the app I posted?

Well in particular it was still trying to do rectangular tiling, as seen below:
---
def Tile(surf, pic, rect):
   x = rect[0]
   y = rect[1]
   while y  rect[3]:
   x = 0
   while x  rect[2]:
   surf.blit(pic, [x, y])
   x += pic.get_width()
   y += pic.get_height()

you would never see code like that for rotated grid tiling.


Re: [pygame] mixer.music in runtime

2008-04-02 Thread Lenard Lindstrom
Pygame 1.8 does have more dependencies than 1.7. It's been awhile since 
I used 1.7 but are not smpeg new to Windows. And are not libvorbis and 
libogg new to 1.8? Could py2exe be overlooking them?


Lenard


René Dudfield wrote:

Can you tell py2exe to include the pygame.music_mixer or
mixer_music.pyd module specifically?


On Wed, Apr 2, 2008 at 9:13 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:
  

More info on mixer.music
 It works in the pygame 1.7 so looks like we have a bug in 1.8.

 Bo Jangeborg skrev:





Hi

I am trying to run pygame.mixer.music after having created a py2exe.

The import seem to work ok, but it never loads the music method
so the following doesn't work

import pygame.mixer
print pygame.mixer.music

Traceback (most recent call last):
 File test.pyw, line 728, in module
 File test.pyw, line 128, in main
 File vers_01\Program\Test\testgame.pyw, line 66, in run
 File vers_01\Program\Test\testgame.pyw, line 147, in __init__
 File vers_01\Program\Test\testgame.pyw, line 158, in initiate_music
 File vers_01\Program\TestMusic\__init__.py, line 1, in module
 File vers_01\Program\TestMusic\musix.pyw, line 11, in module
AttributeError: 'module' object has no attribute 'music'


In the developer version it works and the print returns :

module 'pygame.mixer_music' from 'C:\Program
  

Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'


What could I be doing wrong ?


  





Re: [pygame] mixer.music in runtime

2008-04-02 Thread René Dudfield
ah, yeah.  smpeg wasn't in 1.7.1 on windows... but now it is.

So, yeah, that's most likely the problem.


On Thu, Apr 3, 2008 at 9:33 AM, Lenard Lindstrom [EMAIL PROTECTED] wrote:
 Pygame 1.8 does have more dependencies than 1.7. It's been awhile since I
 used 1.7 but are not smpeg new to Windows. And are not libvorbis and libogg
 new to 1.8? Could py2exe be overlooking them?

  Lenard




  René Dudfield wrote:

  Can you tell py2exe to include the pygame.music_mixer or
  mixer_music.pyd module specifically?
 
 
  On Wed, Apr 2, 2008 at 9:13 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:
 
 
   More info on mixer.music
It works in the pygame 1.7 so looks like we have a bug in 1.8.
  
Bo Jangeborg skrev:
  
  
  
  
  
Hi
   
I am trying to run pygame.mixer.music after having created a py2exe.
   
The import seem to work ok, but it never loads the music method
so the following doesn't work
   
import pygame.mixer
print pygame.mixer.music
   
Traceback (most recent call last):
 File test.pyw, line 728, in module
 File test.pyw, line 128, in main
 File vers_01\Program\Test\testgame.pyw, line 66, in run
 File vers_01\Program\Test\testgame.pyw, line 147, in __init__
 File vers_01\Program\Test\testgame.pyw, line 158, in initiate_music
 File vers_01\Program\TestMusic\__init__.py, line 1, in module
 File vers_01\Program\TestMusic\musix.pyw, line 11, in module
AttributeError: 'module' object has no attribute 'music'
   
   
In the developer version it works and the print returns :
   
module 'pygame.mixer_music' from 'C:\Program
   
   
   Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'
  
  
What could I be doing wrong ?
   
   
   
   
  
  
 




Re: [pygame] mixer.music in runtime

2008-04-02 Thread Bo Jangeborg

The following are included in the main directory where the other dll's are:
smpeg.dll
libogg-0.dll
libvorbis-0.dll
libvorbisfile-3.dll
libogg-0.dll
mixer_music.pyd

So py2exe didn't miss any as far as I can see.

Since no error is thrown on import is there any other
conditions that are triggered to make it not import the mixer_music ?

Have you tried it yourself's ?


René Dudfield skrev:

ah, yeah.  smpeg wasn't in 1.7.1 on windows... but now it is.

So, yeah, that's most likely the problem.


On Thu, Apr 3, 2008 at 9:33 AM, Lenard Lindstrom [EMAIL PROTECTED] wrote:
  

Pygame 1.8 does have more dependencies than 1.7. It's been awhile since I
used 1.7 but are not smpeg new to Windows. And are not libvorbis and libogg
new to 1.8? Could py2exe be overlooking them?

 Lenard




 René Dudfield wrote:



Can you tell py2exe to include the pygame.music_mixer or
mixer_music.pyd module specifically?


On Wed, Apr 2, 2008 at 9:13 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:


  

More info on mixer.music
 It works in the pygame 1.7 so looks like we have a bug in 1.8.

 Bo Jangeborg skrev:







Hi

I am trying to run pygame.mixer.music after having created a py2exe.

The import seem to work ok, but it never loads the music method
so the following doesn't work

import pygame.mixer
print pygame.mixer.music

Traceback (most recent call last):
 File test.pyw, line 728, in module
 File test.pyw, line 128, in main
 File vers_01\Program\Test\testgame.pyw, line 66, in run
 File vers_01\Program\Test\testgame.pyw, line 147, in __init__
 File vers_01\Program\Test\testgame.pyw, line 158, in initiate_music
 File vers_01\Program\TestMusic\__init__.py, line 1, in module
 File vers_01\Program\TestMusic\musix.pyw, line 11, in module
AttributeError: 'module' object has no attribute 'music'


In the developer version it works and the print returns :

module 'pygame.mixer_music' from 'C:\Program


  

Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'




What could I be doing wrong ?




  




  




Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Lamonte(Scheols/Demonic)
Thank you.

On Wed, Apr 2, 2008 at 5:02 PM, Wayne Koorts [EMAIL PROTECTED] wrote:

  I'm having a friend convert it to chm because pdf is slow:(, my
 friend
  bought me the ebook version off apress,

 Probably much less trouble to just get a better PDF reader.  PDF
 itself isn't necessarily slow, it's just a file format.  If you use
 Windows I can recommend Sumatra:
 http://blog.kowalczyk.info/software/sumatrapdf/

 Regards,
 Wayne Koorts
 http://www.wkoorts.com




-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] mixer.music in runtime

2008-04-02 Thread René Dudfield
hi again,

have you got a link to your code we could download?  Also the command
you are using to build it would be nice.

cheers,



On Thu, Apr 3, 2008 at 10:16 AM, Bo Jangeborg [EMAIL PROTECTED] wrote:
 The following are included in the main directory where the other dll's are:
  smpeg.dll
  libogg-0.dll
  libvorbis-0.dll
  libvorbisfile-3.dll
  libogg-0.dll
  mixer_music.pyd

  So py2exe didn't miss any as far as I can see.

  Since no error is thrown on import is there any other
  conditions that are triggered to make it not import the mixer_music ?

  Have you tried it yourself's ?


  René Dudfield skrev:



  ah, yeah.  smpeg wasn't in 1.7.1 on windows... but now it is.
 
  So, yeah, that's most likely the problem.
 
 
  On Thu, Apr 3, 2008 at 9:33 AM, Lenard Lindstrom [EMAIL PROTECTED] wrote:
 
 
   Pygame 1.8 does have more dependencies than 1.7. It's been awhile since
 I
   used 1.7 but are not smpeg new to Windows. And are not libvorbis and
 libogg
   new to 1.8? Could py2exe be overlooking them?
  
Lenard
  
  
  
  
René Dudfield wrote:
  
  
  
Can you tell py2exe to include the pygame.music_mixer or
mixer_music.pyd module specifically?
   
   
On Wed, Apr 2, 2008 at 9:13 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:
   
   
   
   
 More info on mixer.music
  It works in the pygame 1.7 so looks like we have a bug in 1.8.

  Bo Jangeborg skrev:







  Hi
 
  I am trying to run pygame.mixer.music after having created a
 py2exe.
 
  The import seem to work ok, but it never loads the music method
  so the following doesn't work
 
  import pygame.mixer
  print pygame.mixer.music
 
  Traceback (most recent call last):
   File test.pyw, line 728, in module
   File test.pyw, line 128, in main
   File vers_01\Program\Test\testgame.pyw, line 66, in run
   File vers_01\Program\Test\testgame.pyw, line 147, in __init__
   File vers_01\Program\Test\testgame.pyw, line 158, in
 initiate_music
   File vers_01\Program\TestMusic\__init__.py, line 1, in module
   File vers_01\Program\TestMusic\musix.pyw, line 11, in module
  AttributeError: 'module' object has no attribute 'music'
 
 
  In the developer version it works and the print returns :
 
  module 'pygame.mixer_music' from 'C:\Program
 
 
 
 
 Files\Python2_5\Lib\site-packages\pygame\mixer_music.pyd'




  What could I be doing wrong ?
 
 
 
 
 
 


   
  
  
 
 
 




Re: [pygame] mixer.music in runtime

2008-04-02 Thread Brian Fisher
On Wed, Apr 2, 2008 at 4:16 PM, Bo Jangeborg [EMAIL PROTECTED] wrote:
  Since no error is thrown on import is there any other
  conditions that are triggered to make it not import the mixer_music ?

The source for mixer calls PyImport_ImportModule for
pygame.mixer_music and then explicitly swallows the exception if
that fails

maybe you could try:

import pygame.mixer_music

yourself, and see the exception?


Re: Re: [pygame] pygame participation in Google Summer of Code

2008-04-02 Thread Richard Jones
René Dudfield [EMAIL PROTECTED] wrote:
 If you can find an existing AI project that looks good, perhaps
 approach them and see if they will mentor you.
 
 Do you know where these other python AI projects are Richard?

I just did a google search for python AI module and got a bunch of hits :)


 Richard


[pygame] Searching the archives?

2008-04-02 Thread Lamonte(Scheols/Demonic)
Is there a search for the archives?

-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] Searching the archives?

2008-04-02 Thread Wayne Koorts
 Is there a search for the archives?

http://dir.gmane.org/gmane.comp.python.pygame

-- 
Regards,
Wayne Koorts
Registered Linux User #330079
www.wkoorts.com


Re: [pygame] Searching the archives?

2008-04-02 Thread Lamonte(Scheols/Demonic)
thanks

On Wed, Apr 2, 2008 at 8:21 PM, Wayne Koorts [EMAIL PROTECTED] wrote:

  Is there a search for the archives?

 http://dir.gmane.org/gmane.comp.python.pygame

 --
 Regards,
 Wayne Koorts
 Registered Linux User #330079
 www.wkoorts.com




-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Talat Fakhri
Which book are you guys talking about?

On Thu, Apr 3, 2008 at 7:12 AM, Lamonte(Scheols/Demonic) [EMAIL PROTECTED]
wrote:

 Thank you.


 On Wed, Apr 2, 2008 at 5:02 PM, Wayne Koorts [EMAIL PROTECTED] wrote:

   I'm having a friend convert it to chm because pdf is slow:(, my
  friend
   bought me the ebook version off apress,
 
  Probably much less trouble to just get a better PDF reader.  PDF
  itself isn't necessarily slow, it's just a file format.  If you use
  Windows I can recommend Sumatra:
  http://blog.kowalczyk.info/software/sumatrapdf/
 
  Regards,
  Wayne Koorts
  http://www.wkoorts.com
 







Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Lamonte(Scheols/Demonic)
The only pygame book availible to man?
http://www.apress.com/book/view/9781590598726

On Wed, Apr 2, 2008 at 11:01 PM, Talat Fakhri [EMAIL PROTECTED] wrote:

 Which book are you guys talking about?


 On Thu, Apr 3, 2008 at 7:12 AM, Lamonte(Scheols/Demonic) 
 [EMAIL PROTECTED] wrote:

  Thank you.
 
 
  On Wed, Apr 2, 2008 at 5:02 PM, Wayne Koorts [EMAIL PROTECTED] wrote:
 
I'm having a friend convert it to chm because pdf is slow:(, my
   friend
bought me the ebook version off apress,
  
   Probably much less trouble to just get a better PDF reader.  PDF
   itself isn't necessarily slow, it's just a file format.  If you use
   Windows I can recommend Sumatra:
   http://blog.kowalczyk.info/software/sumatrapdf/
  
   Regards,
   Wayne Koorts
   http://www.wkoorts.com
  
 
 
 
 
 






-- 
Join cleanscript.com Come here for professional PHP coding.


Re: [pygame] I'm loving wills book :)

2008-04-02 Thread NBarnes
Wayne Koorts [EMAIL PROTECTED] wrote:

  I'm having a friend convert it to chm because pdf is slow:(, my friend
   bought me the ebook version off apress,

  Probably much less trouble to just get a better PDF reader.  PDF
  itself isn't necessarily slow, it's just a file format.  If you use
  Windows I can recommend Sumatra:
  http://blog.kowalczyk.info/software/sumatrapdf/\

FoxIt is also about a million times faster than Adobe's bloatware.