Showing posts with the label pygame

[FIXED] Python pygame bullet mechanics

Issue description here" /> Hello i need a quick fix for that i found where error is but c…

[FIXED] In Python, how to make the user wait before pressing another key?

Issue I'm coding a simple snake game in pygame. The thing is, if the user presses UP and LEFT (…

[FIXED] I am trying to get the rectangles in two different classes to collide but in pygame but it doesn't work no matter what I do

Issue My code works for the most part, but I don't know how to access the rectangles of the tow…

[FIXED] How to get one percent for 3 different values?

Issue I have this code and its supposed to be like a color game where you can edit different rgb va…

[FIXED] How do I blit a rectangular outline to a surface?

Issue I have an obstruction tile/sprite and I want to draw a rectangular outline (32x32 or from its…

[FIXED] Python count the number of sprites from a group on screen

Issue Wonder if anyone could help. I am making a very simple pygame game. A number of balls fall fr…

[FIXED] Find out if the centre of a shape is within other shape pygame

Issue I am trying to make a realistic holes, for a pool game. What I would like to do is find out i…

[FIXED] How to make pygame update the display only upon an event?

Issue I'm trying to do something like this. pygame.event.set_allowed([pygame.KEYDOWN]) for…

[FIXED] What do the pygame.math.Vector2 constructor parameters indicate?

Issue I'm trying to figure out how to create a unit vector / normalized Vector2 instance given …

[FIXED] Restart game after showing end screen

Issue I'm creating a simple tic-tac-toegame with a little bit of support from this page .

[FIXED] Python pygame - bouncing ball (UnboundLocalError: local variable 'move_y' referenced before assignment)

Issue I wanted to create a function that is responsible for bouncing ball from the edge of the scre…

[FIXED] Change_layer() function pygame issue with removal from list

Issue I'm encountering an issue with attempting to use the change_layer() function for pygame w…

[FIXED] Pygame event handlers interfering with one another?

Issue I'm making a game launcher in Python 3.7, and I'm using the Pygame ("pg") l…

[FIXED] How do you simulate buoyancy in games?

Issue I have a working code for buoyancy simulation but it's not behaving properly. I have 3 sc…

[FIXED] How to get mouse coordinates on a grid

Issue I have a function to get a position on a grid (the size of the grid is flexible) based on the…

[FIXED] How to integrate Pygame and PyQt4?

Issue I'm using python 2.7 and Ubuntu 14.04. I'm trying to do this in order to have my p…

[FIXED] Why is pygame.Surface.blit not displaying anything?

Issue I have sone code to represent collision tests within python, using pygame Surfaces to represe…

[FIXED] Making a tower defence game but keep running into the error of local variable tower referenced before assignment

Issue I have many different classes including Main, Enemy and Tower, in these classes i have method…

[FIXED] Get a point's position from an angle and the length of the line

Issue I'm programming a game in Python, with pygame, and I'd like to make a function that d…

[FIXED] The button does not become the color I need

Issue I have a button that changes color when the cursor hovers over it, and I want to make it so t…