Skip to main content

Questions tagged [pygame]

Pygame is a set of Python modules designed for writing video games. Use this tag only if you are using the Pygame library and not if you have a question about programming a game in Python in general.

-2 votes
0 answers
22 views

i am having a problem in my sand simulation

I am trying to add a void cell to my simulation but some cells were not being checked. I tried to add a void cell but the bottom and right neighbors were not being removed. Here is the Code: import ...
minecraft omega's user avatar
-1 votes
1 answer
33 views

Event polling with event.get() returning result with exception set [duplicate]

Edit: I'm being told that two threads already answer my question. And my question has been downvoted. The threads linked have absolutely no relevance to my question. I'm not unable to play audio. I'm ...
David Bandel's user avatar
-1 votes
0 answers
23 views

Why doesn't .rumble() make my controller vibrate as specified?

My Python script that activates vibration of a PlayStation 4 controller in a for loop should terminate if the controller is disconnected. However, it does not vibrate as specified when I pass the ...
Ezekiel Obuobisa's user avatar
-2 votes
0 answers
18 views

Point not rotating around centre correctly [duplicate]

When trying to make a vehicle simulation, the hitch point for the trailer needs to be rotated with the tractor, however it does not seem to be working and the hitch point is too far away from the ...
Joshua Hall's user avatar
-1 votes
0 answers
22 views

matplotlib shrinking pygame window

Whenever I run the program, the pygame window shrinks as the matplotlib window and the text inside is being rendered. I think im missing some information or im just being silly, help. import pygame ...
Acrilyce's user avatar
-1 votes
0 answers
26 views

How to make the collison function iterop with the animation function in a 2-d platformer game

I am making a game using pygame. But the collision using pygame.sprite.collidemask() and my animator() function don't seem to work together to show the expected output. The gravity func of the player ...
Syntax Error12's user avatar
-1 votes
0 answers
34 views

Bug when moving diagonally and handling collision in pygame [duplicate]

I have a collision detection setup, and it works fine. The collision is detected, and it resolves it properly IF the player is moving in one direction. Collision detection and how to resolve it isn't ...
turtles's user avatar
  • 69
2 votes
2 answers
46 views

How to make the window size to constantly shrink in pygame?

I'm making a game in pygame and for one of the levels in my game, the window would shrink constantly, forcing the player to move fast before they couldn't see the screen anymore but I don't know how ...
DiamondCat64's user avatar
-4 votes
0 answers
67 views

How to do the equivalent of floating point operations? [closed]

Im trying to make a Class which holds a .mantissa and .exponent with these i can easily store numbers such as 1e1000 or even 1e(1e1000) (thats 1 with a 1e1000 zeros.) the operations concerning these ...
Nightyy's user avatar
  • 11
-2 votes
0 answers
33 views

I can't download libraries to my python project, neither can i update pip [duplicate]

i try installing pygame using pip install pygame i get this 2 errors ERROR: Could not find a version that satisfies the requirement pygame (from versions: none) ERROR: No matching distribution found ...
lirdi b's user avatar
-1 votes
0 answers
20 views

speed is min but in screen is too fast to play [duplicate]

import pygame import random pygame.init() width,height=900,500 screen=pygame.display.set_mode((width,height)) vel=0.1 def main(): player1=pygame.Rect(5,height//2-20,10,40) player2=pygame....
anh lan's user avatar
0 votes
1 answer
52 views

Pygame - Load letters and display text for an image

I'm following Tech with Tim's guide on how to create a platformer game link I created a function to load letters from a sprite image, based on his load_sprites function: def ...
Avi Michaely's user avatar
-1 votes
0 answers
30 views

if i click some part of icon, it doesn't work [duplicate]

i'm trying to make game by pygame. but i have an issue please look my code # 편집모드가 아닐 시 편집모드 아���콘 화면에 표시 if not self.shop_active and not self.gh_active and not self.edit_mode: editing_icon = pygame....
huiwon Yang's user avatar
-1 votes
1 answer
60 views

How to use Pygame and Kivy

My question is not how to merge pygame and kivy screens. My problem is that I am working using kivy but in my code I added a function which runs a pygame program. When this program runs, the screen ...
Lord vic's user avatar
-3 votes
1 answer
56 views

I tried to draw a red rectangle in Pygame, but the screen is black [duplicate]

This is my pygame code: import pygame as pg pg.init() W, H = 500, 400 screen = pg.display.set_mode((W, H)) run = True rect = pg.Rect(50, 50, 60, 60) screen.fill((0, 0, 0)) pg.draw.rect(screen, (255, ...
arostybread's user avatar

15 30 50 per page
1
2 3 4 5
1206