Re: [pygame] Joystick no longer global in Pygame2?

2022-01-10 Thread Charlie Hayden
Alec, this is actually a recent change I believe (after pygame 2.1), and comes from our SDL backend. It's been discussed in this Github issue, and I believe they've got an environment variable that will do it. https://github.com/pygame/pygame/issues/2962

[pygame] Joystick no longer global in Pygame2?

2022-01-10 Thread Alec Bennett
what window has focus: https://raw.githubusercontent.com/denilsonsa/pygame-joystick-test/master/pygame-joystick-test.py And if I have multiple Pygame windows, they all catch all the joystick events. But with Pygame 2 the window needs focus to catch the joystick events. If anyone wants to confirm

[pygame] Joystick and PS3

2012-11-22 Thread Stephen Smitherman
Good Day, I have been able to successfully write a script to use the Playstation 3 controller via bluetooth on a Mac implementing pygame.Joystick. I am loosing many functions of the controller though because the joystick class is limited to typical joystick definitions. How can i get a copy of

[pygame] Joystick

2012-11-22 Thread Stephen Smitherman
Good Day, Does anyone know what I can do to work on this project? I have been able to successfully write a script to use the Playstation 3 controller via bluetooth on a Mac implementing pygame.Joystick. I am loosing many functions of the controller though because the joystick class is limited

Re: [pygame] Joystick

2012-11-22 Thread claudio canepa
On Fri, Nov 23, 2012 at 12:10 AM, Stephen Smitherman srsmither...@gmail.com wrote: Good Day, Does anyone know what I can do to work on this project? I have been able to successfully write a script to use the Playstation 3 controller via bluetooth on a Mac implementing pygame.Joystick. I am

Re: [pygame] Joystick

2012-11-22 Thread Stephen Smitherman
If anyone is interested in what i have so far it is not much but it works. Check it out. Pair a PS3 controller on Mac, then run the script. import subprocess import pygame pygame.init() ps3 = pygame.joystick.Joystick(0) ps3.init() while True: try: pygame.event.pump()

Re: [pygame] Joystick

2012-11-22 Thread Stephen Smitherman
Sorry for the emails but incase someone runs into the same problem. I delete the folder /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame and it works again. Strange. On Nov 22, 2012, at 9:16 PM, Stephen Smitherman srsmither...@gmail.com wrote: Just try

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Lee Buckingham
Thumbstick, or Mouse Position, it would be awesome if you could share how you found it out so I could use it as a reference. *From:* Lee Buckingham *Sent:* Tuesday, December 06, 2011 12:53 AM *To:* pygame-users@seul.org *Subject:* Re: [pygame] [Pygame] Joystick Inputs Hi Andrew, For buttons I

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Andrew Godfroy
: Lee Buckingham Sent: Wednesday, December 07, 2011 12:04 PM To: pygame-users@seul.org Subject: Re: [pygame] [Pygame] Joystick Inputs Inverse Tangent might be slightly easier since you don't need the hypotenuse in the calculation. I've not used it before so if anyone has a slicker way of doing

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Ian Mallett
On Wed, Dec 7, 2011 at 5:49 PM, Andrew Godfroy killer...@hotmail.comwrote: self.image = pygame.transform.rotate (self.image, -angle_degrees) Your problem is here. 1: You'll get some sort of markov-chain-esque decay of your image's quality (because you're constantly rotating

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Andrew Godfroy
-users@seul.org Subject: Re: [pygame] [Pygame] Joystick Inputs On Wed, Dec 7, 2011 at 5:49 PM, Andrew Godfroy killer...@hotmail.com wrote: self.image = pygame.transform.rotate (self.image, -angle_degrees) Your problem is here. 1: You'll get some sort of markov-chain-esque

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Ian Mallett
On Wed, Dec 7, 2011 at 7:51 PM, Andrew Godfroy killer...@hotmail.comwrote: Alright, so If I’m getting you right, I should be using Rotozoom instead of just rotate, and build in a check to see if the previous angle is the same as the last one? No. Think about what's happening. Try

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Andrew Godfroy
, -angle_degrees)” This way, it will call up the oldimage, and save to the new surface. Thank you for your help Ian From: Ian Mallett Sent: Wednesday, December 07, 2011 10:05 PM To: pygame-users@seul.org Subject: Re: [pygame] [Pygame] Joystick Inputs On Wed, Dec 7, 2011 at 7:51 PM, Andrew Godfroy

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Lee Buckingham
*Sent:* Wednesday, December 07, 2011 10:05 PM *To:* pygame-users@seul.org *Subject:* Re: [pygame] [Pygame] Joystick Inputs On Wed, Dec 7, 2011 at 7:51 PM, Andrew Godfroy killer...@hotmail.comwrote: Alright, so If I’m getting you right, I should be using Rotozoom instead of just rotate

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Ian Mallett
On Wed, Dec 7, 2011 at 8:25 PM, Andrew Godfroy killer...@hotmail.comwrote: Alright, Thank you for explaining it to me :) Now that I know whats happening I think I found a Solution. inside if my __init__ I added an extra variable “self.oldimage = self.image” Then inside of the rotateimage

Re: [pygame] [Pygame] Joystick Inputs

2011-12-07 Thread Christopher Night
On Thu, Dec 8, 2011 at 12:36 AM, Ian Mallett geometr...@gmail.com wrote: Except in the trivial case, the rotated image will still be a different size, of course. Remember to offset the image correctly (I recommend calling .get_width() and .get_height()) and then subtracting half that from

Re: [pygame] [Pygame] Joystick Inputs

2011-12-06 Thread Andrew Godfroy
-users@seul.org Subject: Re: [pygame] [Pygame] Joystick Inputs Hi Andrew, For buttons I use this: if event.type == pygame.JOYBUTTONDOWN: if event.button == whatever...: etc if event.type == pygame.JOYBUTTONUP: and so on... For analog control and d-pads you have to check

[pygame] [Pygame] Joystick Inputs

2011-12-01 Thread Andrew Godfroy
Hey, I have been trying to experiment with Joysticks, hoping that I will be able to use on in my project. I'm having a little trouble with actually figuring out how to get stated as the only code I have found online has been to just get the values for what all the buttons, axis's, and hats are. I

Re: [pygame] [Pygame] Joystick Inputs

2011-12-01 Thread Andrew Godfroy
Alright, I just checked over my question and I noticed I wasn’t exactly clear what I was looking for... What I am asking is how do I work the event handler for checking joystick commands such as if the Left Thumbstick-[0] or [1]- moves, or if the A button-[0]- is pressed Does anyone know how

Re: [pygame] Joystick missing events?

2007-11-29 Thread Ian Mallett
On 11/28/07, Joe Johnston [EMAIL PROTECTED] wrote: Thanks Ian for the initial response. I agree with Ethan that the import statement isn't likely to be the cause of the problem. That simply imports symbols into the current namespace. OK. I thought it might not work, but then, it was a guess.

[pygame] Joystick missing events?

2007-11-28 Thread Joe Johnston
Hello Pygamers, I've got some weird behavior regarding joystick control that may be a FAQ. If so, please point me to the right URL. It seems that if I use pygame.event.get() to read joystick events, I end up missing some during rapid joystick axes changes. Full code for this is here:

Re: [pygame] Joystick missing events?

2007-11-28 Thread Ian Mallett
At a quick glance, I would say the problem perhaps lies in the absence of: from pygame.locals import * . That usually fixes stuff for me. Hope this helps, Ian

Re: [pygame] Joystick missing events?

2007-11-28 Thread Ethan Glasser-Camp
Ian Mallett wrote: At a quick glance, I would say the problem perhaps lies in the absence of: from pygame.locals import * . That usually fixes stuff for me. I'm pretty sure that isn't the issue. I've had similar problems as Joe Johnston in the past when working with joysticks. Generally

Re: [pygame] Joystick missing events?

2007-11-28 Thread Joe Johnston
Ethan Glasser-Camp wrote: I've had similar problems as Joe Johnston in the past when working with joysticks. Generally what's going on is that the joystick driver is holding information and only updating a few times a second, whereas if you're going to read gestures, a la Street Fighter, the

[pygame] Joystick centering

2007-05-01 Thread Malcolm Ryan
I'm using a Logitech gamepad with PyGame and I've found that there are serious problems with centering. Using the code below to print out x and y values from the right-hand joystick on the gamepad, I get the numbers below. There are a couple of spurious values in there, especially at the