Top "Pygame" questions

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

How to distinguish left click , right click mouse clicks in pygame?

From api of pygame, it has: event type.MOUSEBUTTONDOWN, MOUSEBUTTONUP, MOUSEMOTION But there is no way to distinguish between right, …

python event-handling pygame
How to Use Sprite Collide in Pygame

I am making a very simple game where the bird (player) has to dodge the rock and if it gets …

python pygame sprite rect
Allowing resizing window pyGame

I am trying to allow resizing for this app, I put the RESIZABLE flag, but when I try to resize, …

python pygame
How to make a surface with a transparent background in pygame

Can someone give me some example code that creates a surface with a transparent background in pygame?

python transparency pygame
How do I rotate an image around its center using Pygame?

I had been trying to rotate an image around its center in using pygame.transform.rotate() but it's not working. …

python rotation pygame
How to get the resolution of a monitor in Pygame?

I'm just wondering if it is possible for me to get the resolution of a monitor in Pygame and then …

python window pygame resolution dimensions
Does pyGame do 3d?

I can't seem to find the answer to this question anywhere. I realise that you have to use pyOpenGL or …

python 3d pygame
How to add text into a pygame rectangle

I have come as far as drawing a rectangle in pygame however I need to be able to get text …

python class text pygame drawrectangle
What is a good way to draw images using pygame?

I would like to know how to draw images using pygame. I know how to load them. I have made …

python image pygame
PyGame - Getting the size of a loaded image

Hello, even though you might think there was a similar question, mine is pretty different than this. I am trying …

python image oop pygame