[pygame] Updating the pygame.org news section with an intro video to pygame?

2014-05-22 Thread Michael Lutynski
I'd like to get this piece of news on the Pygame.org site's main page as I think it'd be helpful. It's an intro to game programming from PyCon 2014: http://pyvideo.org/video/2620/introduction-to-game-programming How do I go about that? This is part of my personal wish to see more

[pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Skorpio
Hi everybody, How can you scale the hitbox of a sprite? I tried self.rect = self.rect.inflate(-85, -20) and that scaled the rect correctly (to the center of the rect), but the game still takes the upper left corner of the rect as the blit position for the image/surface. That means the rect

Re: [pygame] Updating the pygame.org news section with an intro video to pygame?

2014-05-22 Thread Davy Mitchell
Agreed - that's a good video. Also some details of when pygame installer for Python 3.4 for Windows would be good (I imagine it is coming). Cheers, Davy On 22 May 2014 07:05, Michael Lutynski mich...@callthecomputerdoctor.comwrote: I'd like to get this piece of news on the Pygame.org site's

Re: [pygame] Updating the pygame.org news section with an intro video to pygame?

2014-05-22 Thread Paul Vincent Craven
You can get an unofficial 3.4 build here: http://www.lfd.uci.edu/~gohlke/pythonlibs/ Paul Vincent Craven On Thu, May 22, 2014 at 6:31 AM, Davy Mitchell daftspan...@gmail.comwrote: Agreed - that's a good video. Also some details of when pygame installer for Python 3.4 for Windows would be

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Sam Bull
On ĵaŭ, 2014-05-22 at 03:47 -0700, Skorpio wrote: How can you scale the hitbox of a sprite? I tried self.rect = self.rect.inflate(-85, -20) and that scaled the rect correctly (to the center of the rect), but the game still takes the upper left corner of the rect as the blit position for the

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Skorpio
I don't blit the sprites at the rect/hitbox, Pygame does that. The sprites are in a pygame.sprite.Group and when I call sprite_group.draw(screen) and if the rects are scaled, their images get still blitted at the top left corner of the rect. I'm using pygame.sprite.spritecollide() for the

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Jeffrey Kleykamp
Using spritecollide(sprite, group, dokill, collided = None) you can specify a collided function. They have one built in for a constant ratio pygame.sprite.collide_rect_ratio(). You can also specify your own function. If you do that you can specify a different variable of your sprite to be your

Re: [pygame] Updating the pygame.org news section with an intro video to pygame?

2014-05-22 Thread David
The unofficial 3.4 build does not seem to install on the just-released Python 3.4.1. The installer errors with an error message to the effect that a 3.4 version was not found. Perhaps the version check is too precise. David Keeney On Thu, May 22, 2014 at 6:29 AM, Paul Vincent Craven

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Jake b
To preserve the center: pos = self.rect.center self.rect = self.rect.inflate(-85, -20) self.rect.center = pos On Thu, May 22, 2014 at 5:47 AM, Skorpio skorpio2...@yahoo.de wrote: Hi everybody, How can you scale the hitbox of a sprite? I tried self.rect =