Questions tagged as 'pygame'

1
answer

Game Snake in pygame: Snake growth function [closed]

I'm writing Snake in pygame, but I do not have a very clear idea of how to implement the snake's growth functionality. I made a list ("list_cobra") containing the coordinates of the head (which is approximately 30x30 pixels), and I thought of ma...
asked by 25.09.2016 / 17:34
1
answer

Find the last position of the matrix

I'm making a game in pygame and I need to know the last position of the array for the movement of enemies. It has to be according to the size of the array, ie the last column and the first column of the array has to collide with the map edges...
asked by 24.10.2018 / 21:21
1
answer

How can I do this without needing this global variable?

The problem I have is the following I have a method that should and called 4 times, once every 750 ms. The problem is that the way it is called I can not pass arguments to it, because it is called through pygame.time.set_timer. So I created a gl...
asked by 09.06.2018 / 17:30
0
answers

How do I get my music player to choose an mp3 file and play it?

I'm Difficult to make the program choose music and play selected music from tkinter import * from tkinter import messagebox from tkinter.filedialog import askopenfilename from pygame import * from pygame import mixer jan = Tk() jan.title("JA...
asked by 18.05.2018 / 21:29
3
answers

C: \ Users \ Raiqupip install pygame - "The system can not execute the specified program"

I'm trying to download pygame in python 3.6.5 (64-bit) windows 10, but when I open cmd, I try to run the command " pip install pygame " or kivy , or just type " pip " in the cmd, this message appears ... "The system can not exe...
asked by 14.04.2018 / 02:51
1
answer

I can not download "pygame" or "kivy" through the command "pip install ..."

When I try to download pygame the following appears, remembering that my pc is windows 10 - 64bit. use python 3.7.0b3 (64bit) downloading pygame: Collecting pygame Using cached pygame-1.9.3.tar.gz     Complete output from command python...
asked by 13.04.2018 / 17:25
1
answer

I am not able to use get_rect with convert / convert_alpha and subsurface

I was doing this: class Esqueleto (pygame.sprite.Sprite): def __init__ (self): self.imagem = pygame.image.load("imagem/esqueleto.png") self.rect = self.imagem.get_rect() self.imagem = self.imagem.convert_alpha()...
asked by 24.10.2017 / 16:28
0
answers

pygame.time.Clock.tick () why not use 60?

Why do most people use 40 instead of 60? 60 fps is no longer considered ideal? Are there any recommendations for using 40? What if I just call the tick method with no parameters?     
asked by 22.10.2017 / 19:40
0
answers

PyGame - mixer.music ()

I'm setting up a system that uses PyGame tools, in other words, I'm creating an application that runs songs, I'm a long time trying to do that, with the end of the current song (stored in a vector) the music jumped to the other indicie, so it is...
asked by 16.05.2017 / 00:43
1
answer

How can I use pip in a version of python installed by pyenv?

I installed version 3.6.0rc2 on pyenv and I really need pygame in this version. I tried to use sudo pip uninstall pygame and sudo pip install pygame and also tried sudo pip3 uninstall pygame and sudo pip3 install pygame...
asked by 20.12.2016 / 21:12