Questions tagged [pygame] (69)

0
answer

How to move 90 degrees in pygame?

Good day, I know how to move around vertically and horizontally, but how to implement movement in any way? For example if the player presses ↑ + → hero moved vertically on the right side?
leopold asked April 19th 20 at 11:55
1
answer

What to do if you can't load an image in pygame?

He just says that cannot open the image:
Megane_Weimann asked April 18th 20 at 13:32
2
answers

Where can you find sprites for Python Pygames?

Can specify the website where you can download them OTDELNO. Thank you)
Jazmyne66 asked April 18th 20 at 12:25
2
answers

Can't find the mistake. who will help?

error: Traceback (most recent call last): File "C:/DinoGame/DinoGame.py", line 92, in <module> run_game() File "C:/DinoGame/DinoGame.py", line 54, in run_game draw_array(cactus_arr) File "C:/DinoGame/DinoGame.py", line 86, in draw_array check = cactus.move() File "C:/DinoGame/DinoGame.py", line 29, in move if se...
Nathan.Hirthe asked April 16th 20 at 10:46
1
answer

Why does pygame.display.update() does not update my screen?

I'm writing a primitive game and at the end of the main loop, as expected, refresh the function pygame.display.update(), but the screen is not updated until I start to turn the mouse cursor on the window or not stand part of the window area of the monitor. What's the problem? the code itself: from entity import * from cfg...
Lolita asked April 8th 20 at 17:55
0
answer

How to display platform in Pygame?

Can't understand what the problem is,not displayed platform code:import pygame ,sys from tkinter import * pygame.init() screen_size=1366,768 win=pygame.display.set_mode((screen_size),pygame.FULLSCREEN) pygame.display.set_caption("Platformer") def make_level(level1, platform): x=0 y=0 for row in level_01: for col in ro...
Katlyn.Kuhlman asked April 8th 20 at 10:16
0
answer

How to make collision in which the game ended?

simple and clear with blesneniem ?
tiara51 asked April 8th 20 at 09:58
0
answer

Can't pause in pygame what's the error?

import pygame import random q = width , height = (500 ,500 ) win = pygame.display.set_mode(q) pygame.display.set_caption("Game") clock = pygame.time.Clock() stan = pygame.image.load("stan.png") db = pygame.image.load("fon.png") x = 50 y = 420 w = 60 l = 71 spe = 5 jup = False jsp = 10 left = False right = False anim...
Daisy.Fay asked April 8th 20 at 09:58
1
answer

But theres pygame.error: No available audio device while headphones are connected?

Gives pygame.error: No available audio device I have ubuntu 19.10. Headphones SVEN AP-860V. Here is a screenshot:
Adell.Runolfsdottir asked April 7th 20 at 15:51
0
answer

Why does not the music in python pygame?

Why does not the music in my game. Here is the code of the game n Python. import pygame as pyg import expansion from random import * color1 = randint(0, 255) color2 = randint(0, 255) color3 = randint(0, 255) pyg.init() sap=False stb=False rightup=pyg.image.load("Right.png") leftup=pyg.image.load("Left.png") up=pyg.image.loa...
brycen.Paucek asked April 7th 20 at 15:40