Category "pygame"

Importing Pygame

I have installed pip and pygame module a few hours ago and when i try to import pygame module in my python import pygame print("well") file i get this error

How to make a window you can't exit with any python module?

I'm trying to make a classroom manager that can allow teachers to control the students' device during lesson.(Temporarily displaying a window to 'lock' the scre

I kept getting -805306369 (0xCFFFFFFF) error in Python while creating a pygame and fixed it but now I'm not getting any errors but script auto closes

I am creating a pygame simulation for planets rotating around the sun and ran into an error code of -805306369 (0xCFFFFFFF). I think I had an application loop b

Fatal Python error: (pygame parachute) Segmentation Fault using pygame.midi

I have been working on playing midi files within pygame and keep getting faced with this error. Fatal Python error: (pygame parachute) Segmentation Fault Pytho

How can you print the specific key pressed to the console in Pygame?

I am stuck on this. I am trying to output the specific key pressed to the console, but at the moment all of the keys pressed output "2". Help would be greatly a

How to dynamically change self variables, parameters, args... in multiprocessing?

I don't know much of Python yet, but I'm trying to create an app that controls multiple streams of sound simultaneously (It has to do with binaural beats, noise

Pygame drawing not showing in Pygame window

So I was testing out pygame and I wanted to draw a simple rectangle. There are no error messages when I run the code but the rectangle doesn't show up in the wi

Get images from images folder within pygame

I'm working on a game with pygame and I have the following directory for it: As you can see, I have an images folder in the package. Now I'm struggling, to get

Music Y or Music N

In python, "Music on or music off" . If user selects "Y" music will play, If user selects "N" I don't want music to play etc. Is this a "if, else type thing? Th

ModuleNotFoundError when importing Pygame after pip install Pygame

I was trying to make a simple snake game in Python so I installed Pygame using pip install Pygame. After I installed it successfully, I tried importing Pygame b

Controller Support in PyGame

Is it possible to add a purely python code to python, more specifically in the pygame module, so that it can take direct input from a Controller (XBox One, PS4,

How to laterally invert images in pygame?

I'm trying to use a sprite sheet, however it only contains images of the character facing right, I want to laterally invert these images when making the charact

Pygame black screen. Pygame just displays a black screen when i run this on vscode

Pygame black screen. Pygame just displays a black screen when I run this on vscode. What am I doing wrong? My pygame is just showing a blank screen when I run t

Is it possible to run game made with pygame on browser using pyscript?

I have made a small space invader game using pygame and I was wondering if I could play it on the browser using pyscript. Is this even possible ? Do I have to r

Why is this code not making a grid of raindrops?

So, I need help with Pygame for Python 3.6. This is my first semester taking a programming class and, yeah, it's a homework assignment I need help with. I had t

Neon effect in pygame?

I am working with pygame project and I need to my game cubes will have neon effect. Does pygame have a function to make neon effect or somethink like this: pyga

Pygame/Python/Terminal/Mac related

I'm a beginner, I have really hit a brick wall, and would greatly appreciate any advice someone more advanced can offer. I have been having a number of extreme

How to make MOUSEBUTTONDOWN to only detect the left clicks?

MOUSEBUTTONDOWN detects Left, Right and MouseWheel events. I want to make it to only detect the left clicks. Source Code: import pygame, sys, time from pygame.l

Invalid color argument in pygame when trying to gradient

I'm trying to change each value of RBG from one color to another target color. My window is 700 units in width and I'm trying to draw 350 rectangles, each 2 pix

Pygame installed on windows, getting "pygame.error: Failed loading libwebp-7.dll" when trying to call pygame.image.load()

I've got python 3.9.1 running on a windows 10 machine. I have pygame 2.0.1 installed on my machine via pip (python -m pip install https://github.com/pygame/pyga