Results for pygame
I receive a "pygame.error: display Surface quit" when trying to run the main.py file. from Asteroid import Asteroid import neat import pygame pygame....
My program appears to run fine in the "python shell" but the pygame window opens and stays on a blank screen not showing anything. any interaction wit...
I made a program in Python with a flashlight and want to make the battery meter change when the flashlight is on. I made a simpler version where it on...
Could you identify a bug in my code and explain why, when I use int((mouse_x + scroll_x) // (tw / MAX_COL)), int((mouse_y // th / MAX_ROW)) and hover ...
I am making a pygame program and decided to use the pygame-menu library for some easy gui for the settings menu. Every example I can find uses the men...
I have two characters that move according to WASD, and the arrow keys. I want the characters to flip in the x-axis in accordance to if they're moving ...
I am making a 2d game with lvls at lvl 4 a box should appear, after passing lvl 4 it should dissappear and be removed form the boxes list. Its removed...
I'd like to blur the edges of a surface in a "gradient fashion", in Pygame. Here is an example of the desired effect where we have : No blur on first...
I'm trying to add a dropdown to pygame_menu that displays the days of the month '1'-'31' (or '01'-'31') however when I select the dropdown while runni...
I'm working on a Pygame project where I have a player character with a simple animation. I want the animation to play once when the spacebar is presse...
I have this problem with using pygame with this certain effect I'm using to have scrolling text. When I tried calling a function I defined, the functi...
I've fumbled a snake game I'm writing in Python, it has problems with with the main loop it appears Apologies in advance for any sloppiness, I'm still...
Ok so basically I'm making a rhythm game and I want beats to spawn at the right side of the screen when a certain time threshold is met. It works the ...
Here is the code with the background in the main code. I cannot figure out what is wrong. import pygame import random pygame.init() width...
The Pygame documentation says that pygame.init() Initializes all pygame modules which need to be initialized. What does it mean to initialize a Pygame...
I'm trying to display a custom png file in a pygame screen, but when I call... screen.blit(image, screen.get_rect().center) ...it centers the image's ...
I'm working on a card game using python pygame I want when the game start the cards move one by one from the center to left and right just one time ....
my character sprite moves faster if my game is in window mode. to set the velocity i used ROOTwidth, in theory the velocity should be scaled... this i...
I'm trying to create a pixel-perfect collision but if I try to print the collision value, I always get that the collision is on point (8, 0). this is ...
I tried to use a custom font downloaded on internet but it doesn't work. everything works but the font isn't changing. i installed the font and the pa...
I've been using pygame 2.0.1 consistently for months. Today, after I upgraded to the latest version (2.1.2), I started getting this error when trying ...
This is an issue that has been bugging me for a few weeks now. Whenever I have a pygame clock variable, so for example: clock = pygame.time.clock and ...
General idea I successfully configured a raspberry pi as an access point such that I can connect via WIFI with my mobile phone or laptop. Now, I would...
import pygame #initialise pygame.init() screen = pygame.display.set_mode((800, 600)) running = True while running == True: for event in pygame....
I'm trying to add buttons into my pygame platformer but when I run I either can't click the buttons or the game won't respond depending on if I add py...
How do I undo the most recent local commits in Git?
How can I remove a specific item from an array in JavaScript?
How do I delete a Git branch locally and remotely?
How can I find all files containing a specific text (string) on Linux?
How to find all files containing specific text (string) on Linux?
How do I revert a Git repository to a previous commit?
How do I create an HTML button that acts like a link?
How do I check out a remote Git branch?