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