Transparency problem displaying text with Pygame

enter image description hereI would like to display transparent text on a surface that is sized based on the length of the text. The problem is that the text has a black background even though “…

Image following line, or how to remove an image without refilling the screen

So, I’m trying my hand at remaking TRON, the snake like cycle arcade game. I am having an issue with my lighcycle images. So in TRON after the line is drawn it stays there, so when trying to place an …

Pygame black screen crash [closed]

I don’t what happened, it was working few minutes ago, but now it’s not. It’s crashing every time. import pygame, sys WIDTH, HEIGHT = 800, 700 pygame.init() win = pygame.display.set_mode((WIDTH, …

Draw rectangle on key click

I want to draw a rectangle with a button click , but the problem is with every loop it updates the display , display is filled with a color So the rectangle is only seen for a brief period of time. …

Pygame functions having two brackets

Why does pygame.dispay.set_mode(()) and other similar functions has two braces instead of one and why it isnt working if i just put only one brace?

AttributeError: ‘Event’ object has no attribute ‘button’

Here’s my Code and I am just trying run my xbox controller for later on if statements to control dc motors: pygame.init() joystick = [] clock = pygame.time.Clock() for i in range(0, pygame.joystick….

Is there any way to take executable binary (.exe) and somehow “compile” .wasm

I’m working on a 2d game in pygame, and I want it to be available on the web. In my head, a fun way to challenge myself is to use web assembly to make the game available on the web. So I’m wondering …

How can I set the position of my cursor at the start in pygame?

I have to write a pygame program for a school project and I run into some issues concerning mouse.set_pos. I need to set the mouse position on the start of my program. Here I have set it to the middle …

Pygame load slow

I have a simple project that display a “button” with an image,a text and a background color: import os os.environ[‘PYGAME_HIDE_SUPPORT_PROMPT’] = “hide” import pygame, sys from …

Exception has occurred: error mpg123_seek: Invalid RVA mode. (code 12)

I am recording audio using sounddevice and I want to play it through a virtual audio cable through pygame, I keep receiving this error Exception has occurred: error mpg123_seek: Invalid RVA mode. (…