So in response to my question (How to continuously move an image smoothly in Pygame?) I was told to set my framerate in order to do my animation. But no matter where I place it, clock.tick(60) does nothing. I do clock = pygame.time.Clock() BTW. So how do I do this? I have researched and found this (pygame clock.tick() vs framerate
Tag: pygame
Anyone know why pacman is not respecting the walls? When i press the keys to move pacman teleports between the walls
i’m trying to make a pacman game like pygame, now i just want him to walk through the maze without going beyond the walls of the maze. However I have faced some problems, when I press the keys to move the pacman, he ends up telephoning between the walls, although he does not exceed them it ends up bugging the
Line is detected as diagonal of rectangle while using collidepoint function in pygame
I am working on a graph based project. I am drawing lines to represent the edges. My goal is to change color of line when I click on the specific line. the problem is pygame treats line as diagonal of virtual rectangle. so when even if I don’t click on the line but the mouse position is in the projected
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 “None” is specified as the background in the “render” command. I tried to apply the solutions given for questions similar to mine but they didn’t
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 image that needs to move in front of it, the image gets dragged along because i cant refill the screen
How can a object detect the mouse in pygame
I have here the bubbles class and i want to do it that when you click a bubble it despawns but i dont know how the bubbles detect the mouse cursor and how the bubbles despawn. I already tried to add the mouse position function but I dont know hot to use it. And I searched on the Internet but
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/pygame/releases/download/2.0.1/pygame-2.0.1-cp39-cp39-win_amd64.whl) however on calling pygame.image.load(“file.png”) I get the error: pygame.error: Failed loading libwebp-7.dll: The specified module could not be found. I’ve tried installing through pip install pygame and running the tests in pygame.tests but they run
Pygame black screen crash [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I don’t what happened, it was working few minutes ago, but now it’s not. It’s crashing every time. I have
TypeError: argument 1 must be pygame.Surface, not list – Its not a list
I’ve been following the python flappy bird ai tutorial from techwithtim, and I get this error; My code is like this I read the other posts with the same problem and I understand it, but BG_IMG is not a list like BIRD_IMGS. I don’t know what to do. I tried doing BG_IMGS[0] to get the first image of the “list”
When I start this code, i found a problem with error Traceback (most recent call last) in my code with pygame module
I have problem with function. I starting learn pygame with video course, and this is my first pygame code. My .py code: enter image description here drawcube() I wanna do a mini-game with stickman, and i found a very big problem, when I start game in cmd and I’m going to web to found decision, but.. I don’t find him.