I installed a new version of IDLE, and I’m trying to install Pygame. I tried to use the pygame module, but when I did, the error message Traceback (most recent call last): File "C:UsersKidsDesktopPygame Space InvadersassetsPygame_Space_Invaders.py", line 2, in import pygame ModuleNotFoundError: No module named ‘pygame’ showed up. I’m fairly sure this is because pygame ..
I am trying to install pygame on my computer through the command pip install pygame but it is giving me this error: C:Usersusername>pip install pygame Collecting pygame Using cached pygame-1.9.6.tar.gz (3.2 MB) ERROR: Command errored out with exit status 1: command: ‘c:pythonpython.exe’ -c ‘import sys, setuptools, tokenize; sys.argv = ‘"’"’C:UsersusernameAppDataLocalTemppip-install-8c4rjm0dpygamesetup.py’"’"’; __file__=’"’"’C:UsersusernameAppDataLocalTemppip-install-8c4rjm0dpygamesetup.py’"’"’;f=getattr(tokenize, ‘"’"’open’"’"’, open)(__file__);code=f.read().replace(‘"’"’rn’"’"’, ‘"’"’n’"’"’);f.close();exec(compile(code, __file__, ..
I am making a simple grid based habit tracker in python with a main menu, a screen to let users select how many rows and columns they need and the grid itself. It will also have a save feature so users can save their progress and you will be able to have multiple saves. I’m ..
I am currently trying to program a version of Flappy Bird by following along a youtube video. At this point in the code, I should be seeing the flappy bird flapping its wings in place. However, I am getting this error instead: Traceback (most recent call last): File "/Users/USER/Desktop/flappy.BIRD/1.py", line 111, in <module> main() File ..
import sys, pygame from math import sin, cos, radians, pi from pygame.locals import QUIT, MOUSEBUTTONDOWN pygame.init() SURFACE = pygame.display.set_mode((780,920)) FPSCLOCK = pygame.time.Clock() def Line(): speed = 0 while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if pygame.mouse.get_pressed() : speed += 26 if speed > 60: speed = 60 else: speed -= ..
I’m making a game and I want to be able to resize the window, so I set the screen to screen = pygame.display.set_mode((width, height), pygame.RESIZABLE). I have a function call resize() that updates the positions of the all the images too. def resize(): width, height = pygame.display.get_surface().get_size() cookie_surface = pygame.image.load(‘/xxx/xxx/xxximages/cookie.png’) cookie_surface = pygame.transform.scale(cookie_surface, (275, 275)) ..
hi im making a game using pygame. it plays a game over music when player dies but it plays it multiple times i made the loops to 0 but it again plays it multiple times. and also you can check my youtube channel https://www.youtube.com/channel/UCUTsa7fpGtmspg_JOBE56aQ?view_as=subscriber sorry dudes but i have to write more to post my ..
I am making a game in pygame and I want it to spawn a thing multiple times in different places but with my code, it spawns the things multiple times but it doesnt remain where it spawned. I know this is happening because it is in a while loop. plz explain in simple words if ..
I’m just trying something with collisions and found the way to check one side of the rectangle with the other side. I have the following problem: If I move my game character (pink box) from the left against the object, my game character just moves through it: If I come from the other side, everything ..
I am trying to use pygame to display multiple pokemons on the screen and random points and they will descend on the screen. Here is the code. I am getting an error list object not callable in when I call poke(X,Y,img) #pokemons bullbasaur=pygame.image.load("C:userskhuhan rawatDesktoppokemonbullbasaur.png") charmander=pygame.image.load("C:userskhuhan rawatDesktoppokemoncharmander.png") dratini=pygame.image.load("C:userskhuhan rawatDesktoppokemondratini.png") eevee=pygame.image.load("C:userskhuhan rawatDesktoppokemoneevee.png") jigglypuff=pygame.image.load("C:userskhuhan rawatDesktoppokemonjigglypuff.png") meowth=pygame.image.load("C:userskhuhan rawatDesktoppokemonmeowth.png") pikachu=pygame.image.load("C:userskhuhan ..