[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] gamepad problem on osx



Farai Aschwanden(e)k dio:
Looks all fine then. I won't refuse that there is a bug in Pygame. Do you have a chance to test the gamepad on a PC with the the same Python and Pygame version? If it works there, then there is definately a problem on the Mac side (OSX and/or Pygame).

I tried python 3.2 with pygame 1.7 on my mac and it does the same. On my desktop running Debian it works fine and i run python 2.3 and pygame 1.7.1-release2


So you think this might be a problems with pygame, however on my previous mac laptop (it was better machine that the current, it was a G4 1.3) I had a similar script running ok with two different gamepads. I think i was using there same python and pygame.
Could it be that this is a problem with usb 1? Or maybe a problem with drivers, but i think this is exactly the same system i was using on the old machine.


Tyger


Am 08.03.2006 um 23:13 schrieb altern:

hi

I have no idea, but wonder what Pygame version and OSX version you use next to Python 2.3. Else I recommend you try the most latest ones (Python 2.4.1, Pygame 1.7.x)
A good page to get Python related software for Mac is: http://pythonmac.org/

i am running osx 10.3.9 with python 2.4.1. The pygame version is 1.7.0

Another point is the compatibilty of the Logitech Pad. I assume you got an USB 1.1 on your G3. Is the game Pad also compatible to that version or only 2.0?

it does not say anything but my desktop only has usb 1 as well and it runs fine there.


Guess you have to find out if the problem comes from Joypad (compatibilty), older versions of older applications (Pygame < 1.7.x) or any driver problems on possible OSX version.

mmm ... i think it might be something to do with the system rather than pygame. The gamepad is supposed to be compatible with os9 and osx but it doesnt provide any special drivers for mac.


Just my 2 cents

thanks

Tyger
Am 07.03.2006 um 16:17 schrieb altern:
hi

I am using pygame to get info from a gamepad (logitech dual action usb). The script is really simple and it runs fine on my debian desktop but it gets kind of blocked on my G3 500mhz iBook.

It prints some data with the intialisation values and no matter how many buttons i press it doesnt change. However when i type in the keyboard it does print the keyboard event, so the script is not frozen, it just looks like it doesnt get anything from the gamepad.

Anyone has any idea why this could be happening?

This is the code, nothing fancy about it

thanks!



#!/usr/local/bin/python2.3

import pygame
import pygame.event
from pygame.locals import *

try: # joystick
    pygame.joystick.init() # init main joystick device system
    for n in range(pygame.joystick.get_count()): #
        stick = pygame.joystick.Joystick(n)
        stick.init() # init instance
        # report joystick charateristics #
        print '-'*20
        print 'Enabled joystick: ' + stick.get_name()
        print 'it has the following devices :'
        print '--> buttons : '+ str(stick.get_numbuttons())
        print '--> balls : '+ str(stick.get_numballs())
        print '--> axes : '+ str(stick.get_numaxes())
        print '--> hats : '+ str(stick.get_numhats())
        print '-'*20
except pygame.error:
    print 'no joystick found.'


def main():

    pygame.init()

clock = pygame.time.Clock()
while 1 : clock.tick(20) for e in pygame.event.get(): print e # PRINT all events



if __name__ == '__main__': main()





--enrike