30 questions
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...
The original code that worked well suddenly appeared with pygame.error: Couldn't set hardware audio parameters: Success. Can you tell me why?
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.
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...
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...
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...
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...
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...
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...
« | - 3 - |
© 2024 OneMinuteCode. All rights reserved.