Top "Pygame" questions

Pygame is a set of Python modules designed for writing video games.

AttributeError : Class Instance has no __call__ method

I'm a bit new to python, but familiar with OOP. I'm trying to write a game using PyGame. Basically, my …

python oop python-2.7 pygame attributeerror
Python 3: how to install pygame?

I have been trying to install pygame for 3.3 and 3.4 and can't find a way to install it probably with out …

python-3.x pygame
Countdown timer in Pygame

I started using pygame and I want to do simple game. One of the elements which I need is countdown …

python pygame
How to load and play a video in pygame

I'm having a problem. I want to load and play a video in pygame but it doesn't start. The only …

python video load pygame playback
Difference between pygame.display.update and pygame.display.flip

Just like the title implies, is there any difference? I was using pygame.display.flip and I saw on the …

python-2.7 pygame
How can I make a sprite move when key is held down

Currently the sprite only moves 1 pixel every time a key is pressed. How could I cause the plumber sprite to …

python pygame
Smooth Keyboard Movement in Pygame

I'm using this code to have a player sprite move around a screen when the arrow keys are pressed: import …

python animation pygame sprite game-physics
How do I get the size (width x height) of my pygame window

I have created a window using pygame.display.set_mode((width, height), pygame.OPENGL | pygame.DOUBLEBUF | pygame.RESIZABLE) Later on …

python pygame
Pygame action when mouse 'click' on .rect?

I have been writing a test function to learn how a mouse 'click' action on a pygame.rect will result …

python mouseevent pygame rect
PyGame: Applying transparency to an image with alpha?

I want to display an image with alpha with a specified transparency, but can't figure out how to do it. …

python pygame alpha geometry-surface blit