pygame

I can't install the Python module " Pygame"

C:\Users\mapk0>pip install pygame Collecting pygame Using cached https://files.pythonhosted.org/packages/0f/9c/78626be04 ... ------------ ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

In the terminal on the MAC it gives an error when trying to download pip and then the library

I'm trying to install the pygame library, and as far as I know, provided that I have a third version of python on my computer ... y want sudo's -H flag. ERROR: You must give at least one requirement to install (see "pip help install") Tell me how to be

How to extend a two-dimensional array in python

I'm making a game with an infinite world. I have a two-dimensional array pos_block[x][y]. Each cell in the array corresponds ... do this? I create an array using pos_blocks=[[0 for a in range(-501,501)] for b in range(-801,801)] and want to increase it.

Installing Pygame in PyPy

How do I install pygame in pypy? pypy3 -m pip install pygame - not working (running on Manjaro Linux) Here is the explanatio ... ------------ ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I can't install PyGame in PyCharm

In the Terminal tab in PyCharm I entered pip3.8 install pygame pip3 install pygame pip install pygame And I always got this ... install pygame via pip If this problem can't be solved, then write a Python module for handling keyboard events that you know

pygame.error: display Surface quit

In this code: import sys import pygame def run_Game(): # Инициализирует игру pygame.init() screen = pygame.disp ... urface quit But if you remove it, then: pygame.display.flip() Returns the error: pygame. error: video system not initialized

Python.Collision of two objects in pygame

How do I implement a collision in my code? import pygame window=pygame.display.set_mode((700, 700)) pygame.display.set_captio ... e(screen) ball2.drawAndMove(screen) window.blit(screen, (0, 0)) isQuit() pygame.display.flip() pygame.quit()

Enter a number, find the number of numbers 3?

You can show an example of how this is done on the pygame library For a given number (variable or what we enter from the console), find the number of digits 3. If there is no 3-ki then some printf ("no with 3") Thank you in advance!

How in pygame will reflect the image horizontally, rotate and change the transparency

How to flip an image horizontally in pygame, rotate it, and change the transparency. I still need to make an atlas and how d ... ow a guide or something at me. P.S. I'm a little silly and haven't learned how to Google the right information yet (^◕ ᴥ ◕^)

How to make it so that when you click the mouse, the screen itself starts to change endlessly?

Display code and images: def run_game(): game = True while game: for event in pygame.event.get(): ... lay.update() When you click the button on the mouse, the picture does not change and then the program crashes without errors

How do I draw a border around a sprite?

I use pygame and draw the map. I created the Tail class from Sprite and added all the tiles to the group to draw all at once ... tanding, this would draw a frame on each image, but something went wrong and the frame is drawn only for the upper-left tile.

The pygame module is not installed

The standard code from the documentation, python is version 3.7.9, when you try to install zany via pip, the cmd outputs thi ... but the editor (I have vs code) gives an error, I tried to download paycharm, it also has an error, what to do-I do not know

Start again button"

I want to implement a "play again" button in a game (made with pygame). To do this, I decided that I could use a "loop within ... # save all pygame.display.flip() # save all pygame.display.flip() pygame.quit()

How do I make an animated background in the game menu in pygame?

How to properly embed the executing code that creates an animated background in the game in the game menu loop, which is pres ... begin = False click.play() pygame.quit() ##Анимация меню:

Pygame racing game

Here is the code: import pygame import math import road class Game: def __init__(self): #window params s ... acing game. The circle is a race track. Now the car goes beyond this race track. How do I add the boundaries of this circle?

A question about Pygame. Time synchronization of events

def draw_pixel(position): global SIZE global COLOR SCREEN.fill(COLOR, (position, SIZE)) while True: # main loo ... e an editor for pixel art graphics, so I need control over individual pixels. Can someone tell me which direction to dig in?

What are the Shift and Tab keys called in Pygame?

What is the name of the shift key and the tab key in Pygame?

Losing image quality when resizing in pygame

I have some card images in size 140x190 and I am using the pygame.trnasform.scale Method to resize to 105x143 which is a prop ... self.verso = pygame.image.load("imagens/versos/azul (1).png") self.verso = pygame.transform.scale(self.verso, [98, 133])

How to resolve these libpng errors in pygame?

These errors are shown when I close the Game: Libpng warning: iCCP: known incorrect sRGB profilelibpng warning: iCCP: cHRM ... errors happen because I am using this: pygame.display.set_icon(pygame.image.load("imagens/truco.png")) How to solve this?

MP3 player with Python

I know almost nothing about programming and so I have been studying new possibilities such as POO and the like. Recently it g ... (x=110, y=0) bt_stop.place (x=210, y=0) bt_return.place (x=310, y=0) janela.geometry("410x80+450+350") janela.mainloop()