Re: [pygame] Float precision

2008-07-03 Thread PyMike
Hello,

If the game's not too big, can you upload it on mediafire.com or stuffr.net?
I can try to fix it up :-)

On Thu, Jul 3, 2008 at 11:12 AM, OsKaR [EMAIL PROTECTED] wrote:

 I've tried both things and it still working bad. I don't know what to do,
 any more ideas?

 2008/7/3 Ian Mallett [EMAIL PROTECTED]:

 P.S., you may want to convert your angles to radians with math's handy
 radians() function.





-- 
- pymike (http://pymike.pyedpypers.org/)


Re: [pygame] Float precision

2008-07-03 Thread OsKaR
Ok It's upload on mediafire
Here is the link: http://www.mediafire.com/?222n1oyn1my

Sorry for the poor or inexistent documentation :( I'm working on it too


2008/7/3 PyMike [EMAIL PROTECTED]:

 Hello,

 If the game's not too big, can you upload it on mediafire.com or
 stuffr.net? I can try to fix it up :-)


 On Thu, Jul 3, 2008 at 11:12 AM, OsKaR [EMAIL PROTECTED] wrote:

 I've tried both things and it still working bad. I don't know what to do,
 any more ideas?

 2008/7/3 Ian Mallett [EMAIL PROTECTED]:

 P.S., you may want to convert your angles to radians with math's handy
 radians() function.





 --
 - pymike (http://pymike.pyedpypers.org/)


Re: [pygame] Float precision

2008-07-03 Thread PyMike
You forgot to include the images, but I made some mockups instead. I didn't
see anything wrong with it though. Moved and rotated nice and smoothly.

On Thu, Jul 3, 2008 at 11:52 AM, OsKaR [EMAIL PROTECTED] wrote:

 Ok It's upload on mediafire
 Here is the link: http://www.mediafire.com/?222n1oyn1my

 Sorry for the poor or inexistent documentation :( I'm working on it too


 2008/7/3 PyMike [EMAIL PROTECTED]:

 Hello,

 If the game's not too big, can you upload it on mediafire.com or
 stuffr.net? I can try to fix it up :-)


 On Thu, Jul 3, 2008 at 11:12 AM, OsKaR [EMAIL PROTECTED] wrote:

 I've tried both things and it still working bad. I don't know what to do,
 any more ideas?

 2008/7/3 Ian Mallett [EMAIL PROTECTED]:

 P.S., you may want to convert your angles to radians with math's handy
 radians() function.





 --
 - pymike (http://pymike.pyedpypers.org/)





-- 
- pymike (http://pymike.pyedpypers.org/)


Re: [pygame] Mixer Quit / Restart

2008-07-03 Thread FT

Hi!

It never worked, it is just that it never worked.

Wyatt Olson 
To: pygame-users@seul.org 


This appears to get the total number of channels, not the number of active 
channels.  However, I tried using get_busy(), but it still does not seem to 
work.

See the following modifications to my original code:

import pygame, time

for x in range(10):
print(Starting iteration  + str(x))
print(Initializing mixer)
pygame.mixer.init()

print(Loading sound)
sound = pygame.mixer.Sound(foo.wav)
print(Finding free channel)
channel = pygame.mixer.find_channel()

print(Channel object:  + str(channel))

print(Setting volume)
channel.set_volume(0.7)

print(Playing sound)
channel.play(sound)

print(Sleeping until sound is finished playing...)
while pygame.mixer.get_busy():
time.sleep(1)

print(Quitting mixer\n\n)
pygame.mixer.quit()



This displays the same behaviour.

In response to a previous comment about using channel.stop() before quitting 
the mixer: this does not work either, as can be seen by adding channel.stop() 
after the get_busy loop above.


Has anyone tried running this code themselves?  I am wondering if I am 
experiencing some obscure bug, possibly platform specific.  I am running on OS 
X, but don't have access to other systems for troubleshooting.  If someone else 
has access to a Windows or Linux box, and is able to prove if this fails on 
those systems as well, that may be useful.

Cheers

Ian Mallett wrote: 
  On 7/2/08, Wyatt Olson [EMAIL PROTECTED] wrote: 
Is there anything which can return a list of all currently active channels?
  pygame.mixer.get_num_channels()
  This returns 0 if none are playing and  0 if there are.




Re: [pygame] Mixer Quit / Restart

2008-07-03 Thread Wyatt Olson
Oh well, that's fine.  I will just inform potential users that they must 
convert all samples to a specific format first, and then not restart the 
mixer when loading new sounds.


Given that this software is to be used in a (relatively complex) open 
source DIY electronic drum brain, I would imagine that converting audio 
samples is probably the easiest of all the other required steps 
(soldering ICs, programming microcontrollers, etc).  ;-)


Cheers

FT wrote:
 
Hi!
 
It never worked, it is just that it never worked.
 
Wyatt Olson mailto:[EMAIL PROTECTED]

*To:* pygame-users@seul.org mailto:pygame-users@seul.org

This appears to get the total number of channels, not the number of 
active channels.  However, I tried using get_busy(), but it still does 
not seem to work.


See the following modifications to my original code:

import pygame, time

for x in range(10):
print(Starting iteration  + str(x))
print(Initializing mixer)
pygame.mixer.init()

print(Loading sound)
sound = pygame.mixer.Sound(foo.wav)
print(Finding free channel)
channel = pygame.mixer.find_channel()
   
print(Channel object:  + str(channel))
   
print(Setting volume)

channel.set_volume(0.7)
   
print(Playing sound)

channel.play(sound)
   
print(Sleeping until sound is finished playing...)

while pygame.mixer.get_busy():
time.sleep(1)

print(Quitting mixer\n\n)
pygame.mixer.quit()



This displays the same behaviour.

In response to a previous comment about using channel.stop() before 
quitting the mixer: this does not work either, as can be seen by 
adding channel.stop() after the get_busy loop above.



Has anyone tried running this code themselves?  I am wondering if I am 
experiencing some obscure bug, possibly platform specific.  I am 
running on OS X, but don't have access to other systems for 
troubleshooting.  If someone else has access to a Windows or Linux 
box, and is able to prove if this fails on those systems as well, that 
may be useful.


Cheers

Ian Mallett wrote:
On 7/2/08, *Wyatt Olson* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Is there anything which can return a list of all currently active
channels?

pygame.mixer.get_num_channels()
This returns 0 if none are playing and  0 if there are.