pygame tag

30 questions


1 answers
107 views
0
TypeError: 'int' object is not callable error when pygame quit button is pressed.

for event in pygame.event.get(): if event.type == pygame.QUIT: crashed = True elif event.type == pygame.MOUSEBUTTONUP: mx, my = pygame.mouse.get_pos() if mx > 180 and mx < 340 and my > 2...

2 years ago

1 answers
80 views
0
I have a Python question. pygame.error: Couldn't set hardware audio parameters: Success

The original code that worked well suddenly appeared with pygame.error: Couldn't set hardware audio parameters: Success. Can you tell me why?

2 years ago

1 answers
87 views
0
Resize pygame image

What is the code for resizing images in pygame? I've been adjusting the size and saving the image until now, but it's very cumbersome, so I'm uploading it.

2 years ago

1 answers
65 views
0
How to distinguish right-click from left-click in Pygame?

It's exactly what the title is.Is there a way to distinguish left-click or right-click in Pygame?if event.type == MOUSEBUTTONDOWN:If you use MOUSEBUTTONDOWN or MOUSEBUTTONUP like this,Turning the mous...

2 years ago

1 answers
76 views
0
I want to make the text disappear from pygame pie game

I'm making a pie game.If you get points while playing the game, you move on to the next game, and there's still a text about the score.I'm asking you a question because I can only see the text floatin...

2 years ago

1 answers
92 views
0
pygame background image doesn't pop up

I'm a Python beginner. I'm making a game for club presentation using pygame, but the background image doesn't come up and only the black screen appears. I don't know where to start.Part of the problem...

2 years ago

1 answers
97 views
0
pygame error: NameError: name 'Block' is not defined

I made it by referring to https://m.blog.naver.com/cheonwb/222156028857 but there is an error. Traceback (most recent call last): File /Users/user/Desktop/BrickBreak.py, line 9, in <module> clas...

2 years ago


1 answers
107 views
0
Python novice question, pie game attributeError: 'str' object has no attribute 'get_rect'

To make a ball throwing game Traceback (most recent call last): File c:\Users\Jeongyoon\Desktop\pythonwork\l\pypang.py, line 96, in <module> ball_size = ball_images[ball_img_idx].get_rect().size...

2 years ago

1 answers
112 views
0
pygame error NameError: name 'enemy1' is not defined.

import pygame, sysimport randompygame.init() #Initialization (must be)pygame.display.set_caption(my game)# # FPS clock = pygame.time.Clock()#Set screen sizescreen_width = 1150screen_height = 648screen...

2 years ago
« - 3 -

© 2024 OneMinuteCode. All rights reserved.