Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
149 views

I'm looking for a way to animate a sprite using just the system time, without having to increment and store the active frame or time passed as a variable. I should be able to achieve this by properly ...
MirceaKitsune's user avatar
3 votes
0 answers
45 views

I am facing an issue with my controller in both pygame and DS4Windows. Initially, everything was working fine, but after I turned off my Bluetooth and then turned it back on, the controller is no ...
user avatar
0 votes
0 answers
32 views

I'm working on a project that uses a physical barcode scanner. My code will wait for a scan input for the scanner to proceed and process the barcode. I would also like the use of a keyboard (...
Vanlon's user avatar
  • 27
1 vote
1 answer
71 views

I'm working on a voxel raytracer in Python, just ported from Tkinter to Pygame for window management and pixel drawing. I use a thread pool to do the raytracing for each pixel, in my original code the ...
MirceaKitsune's user avatar
2 votes
1 answer
83 views

Is it possible to put a picture in a triangle (or any polygon) in pygame? It is easy to do on a rectangle so is it possible to maybe have a rectangle over a triangle and only show the union of the two ...
Noobycoder123's user avatar
-1 votes
1 answer
89 views

I'm working with movements and I have made the red block follow the white block which is the player when ever the white block changes directions I have the red block also change directions is there a ...
Habib Ismail's user avatar
2 votes
1 answer
625 views

I want to render a singular green pixel in PyGame with SDL2. This is my current code: import pygame import pygame._sdl2 SCREEN_W = 800 SCREEN_H = 800 pygame.init() pygame_screen = pygame.display....
Thegerdfather's user avatar
-1 votes
1 answer
63 views

i want to draw a vector whenever i drag the object which is a ball. I have drawn a segment, the remaining thing is to draw an arrow indicating the direction of the vector. But I can't determine the ...
Hồ Quang Vinh's user avatar
-1 votes
1 answer
191 views

I have the next version of pygame package: pygame 2.5.0 (SDL 2.28.0) in python 3.10.8. .ogg file generated by telegram client and uploaded to server is successfully played by VLS application but next ...
BaruchLi's user avatar
  • 1,113
0 votes
1 answer
57 views

My code has a box that gets pushed with an initial velocity. I'm trying to make it travel the same distance with the same time taken regardless of the fps. When I run the code with an FPS of 60, this ...
User4497's user avatar
0 votes
1 answer
243 views

I'm a beginner programmer right now and am using the pygame "Mixer" module to call sound files from the directory. When I move them to a separate "Audio" folder they cannot be ...
cloverless08's user avatar
2 votes
1 answer
82 views

I am making the game snake in pygame and have completed the game. I have one problem that does not happen every time, but every once in a while, it does not process the keys being pressed if I press ...
Hhadley's user avatar
  • 119
0 votes
1 answer
52 views

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.init() neat.config.Config Screenw, ...
Chickendragon's user avatar
2 votes
1 answer
157 views

I am using this video tutorial: Video I am making a ball (with 0 mass at the moment) in pymunk and trying to show it on pygame but it is not working I tried doing this to make a ball in pymunk and ...
Ishwari Katariya's user avatar
1 vote
1 answer
61 views

i made this small program using Python, Pygame, PyOpenGl and the objloader module (https://github.com/yarolig/OBJFileLoader), it just displays a OBJ model: import pygame from pygame.locals import * ...
Exoyee's user avatar
  • 13
0 votes
1 answer
69 views

I'm currently working on a pygame game where the dinosaur goes to the other side of the screen like in geometry dash. I'm not using classes, I'm a beginner at pygame and this is my first project. I'm ...
Akhil Voora's user avatar
-2 votes
2 answers
189 views

At the bottom is my full code that bounces a ball around a screen, each bounce on a wall changes color and size of ball. It is bouncing a ball off the edges of the screen based on the center of the ...
Tosh's user avatar
  • 21
-1 votes
1 answer
77 views

I am trying to generate terrain randomly, and I have made it scroll it just as a test, but when the pixels hit the end of the screen, they play back on the other side as such:brokenscroll before ...
mn mnn's user avatar
  • 1
0 votes
2 answers
262 views

I have a problem with scaling images in pygame library. I have a scene and character loaded from large PNG assets. Those PNGs has alpha transparency (mostly on the edge). For my game, i need to scale ...
ruddy's user avatar
  • 1
1 vote
1 answer
161 views

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 only changes like this: high = pygame.image.load(&...
Benjamin Ecker's user avatar
0 votes
0 answers
73 views

I'm just want to set a timer of 20 seconds in a function then jump to another: Function 1: example_gif = gif_pygame.load("giphy (1).gif") def animatedgif(): while True: ...
Douglas Martin's user avatar
1 vote
1 answer
74 views

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 over some tile, it consistently prints incorrect ...
r'ouster's user avatar
0 votes
1 answer
131 views

I wanted to play a .mp3 file to my microphone using python code that I found in a Stack Overflow post, but I had to do some tweaking with the steps I had to take. Here are the steps that I had to do: ...
Markas M's user avatar
2 votes
1 answer
358 views

I have a problem in Pygame where, if I scale a Surface with a grid (which is displayed correctly in the first image) to a smaller size, I experience a strange bug where the lines are not drawn ...
r'ouster's user avatar
-1 votes
1 answer
505 views

new to using the pygame module and have been trying to open a window but to no avail. Here's my code. import pygame WIDTH, HEIGHT = 500, 500 SCREEN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame....
Clueless_Person's user avatar

1
3 4
5
6 7
361