Category "pygame"

Pygame window is not responding after just making it

I wanted to make a game using pygame and I started my code making the pygame window import pygame pygame.init() pygame.display.set_mode((1500, 1000)) But every

Getting a Runtime Error in Executable made with pyinstaller

So I have made a game using Pygame, and now I want to make a executable out of it(standalone executable is preferred). So I used this to make the executable: py

heroku pygame.error:Failed loading libasound.so.2

Help people, I have a project created with flask and this is running in heroku, the problem is when a try to use pygame, this return an error: pygame.error: Fai

Unexpected resizing when viewing video inside a rectangle with pygame/moviepy

I'm trying to create a rectangle and display a video in a square inside the rectangle. The problem is that when the preview is executed, the rectangle disappear

Unexpected resizing when viewing video inside a rectangle with pygame/moviepy

I'm trying to create a rectangle and display a video in a square inside the rectangle. The problem is that when the preview is executed, the rectangle disappear

Pygame mask collisions not detected

I know there are several questions about collisions but I can't understand how to do it, the mask of the two objects are created correctly (if I show the two re

How do i keep my player in pygame from going off of the screen

So i've been working lately on some 2D game for my school's final project... And i needed to make my player or the controlled object so it doesn't go off of the

how can i move a rectangle in py game without mouse and keys?

I have code to move a rectangle in pygame from left to right, up and down. But I want to move my rectangle around the screen that I created.. can someone help m

Pygame Rendering Text 1 by 1 Causes Lag In Game How Do I Fix This?

when ever I try to display to render this text 1 by 1 it seems to slow my game down and make everything run slow and for some reason it starts the text as well

Issues with pygame and libmpg123-0.dll

import pygame pygame.mixer.init() pygame.mixer.music.load("water.mp3") pygame.mixer.music.set_volume(0.7) pygame.mixer.music.play() while True: print("Pre

How Do I Make a Circle Green When I Click It

I'm trying to make a Pygame window that has one thousand small circles and when I click one that circle will turn green. I am new to Pygame. import pygame impor

Python/Pygame make text in Pygame wrap when in leaves the window

I have a text function that render text.The function is the following def textFunc(font,msg,color,x,y,center): text_render = font.render(msg,True,color)

Pygame cannot make image bigger over time

I am trying to make an image get bigger over time for a cool effect. I've tried using this: import pygame from pygame.locals import * pygame.init() class Ima

PyCharm won't import PyGame

I'm fairly new to python and decided to try PyGame only to find it won't import. line 1, in <module> import pygame ModuleNotFoundError: No module nam

OOP using pygame.display inheritance error

import pygame.display.Display as display class MainDisplay(display): def __init__(self): super.__init__() # creating display X =

Why cant i place more than one rectangle in pygame?

I am trying to make a 2D game where the player can walk around with trees. But for some reason when the program tries to place a tree it doesn't appear. I have

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