So I was following a tutorial right like any nooby does and I change the variable so I actually learn from it and not just suck and spit information out.Then I come upon this problem where my PYTHON IDE PYCHARM SAYS THERE ARE NO MAJOR MISTAKES BUT WHEN I PRESS THE INPUT BUTTONS I GAVE DIFFERENT OUTPUTS AND THEY WERE ALL THE SAME ILL GIVE YOU THE GUYS CHANNEL IM ON EPISODE 6 HERE IS THE LINK https://www.youtube.com/watch?v=AvV6UxuzH5c anD THIS IS MY CODE bY THE WAY IF YOU DONT HAVE PYGAME GO INSTALL IT FIRST IF YOU WANNA TRY THIS OUT. BY THE WAY I INSTALLED PICTURES LIKE MARIO FOR MY GAME IT BASICALLY SPACE INVADERS THAT'S WHY THERE'S PNG'S INSIDE THERE
import pygame
# Making sure the pygame or whatever you installed works
pygame.init()
# making the default pygame screen appear
screen = pygame.display.set_mode((800, 600))
# Changing the color and icon of this game
pygame.display.set_caption("Mario Invaders(Space Invaders)")
icon = pygame.image.load('mario.png')
pygame.display.set_icon(icon)
# Player
player_IMG = pygame.image.load('mario paper.png')
playerX = 20
playerY = 230
playerY_position = 0
def player(x,y):
screen.blit(player_IMG, (x,y))
working = True
while working:
screen.fill((78, 134, 242))
player(playerX,playerY)
pygame.display.update()
for event in pygame.event.get():
if event.type == pygame.QUIT:
working = False
if event.type ==pygame.KEYDOWN:
print("Hi")
if event.type == pygame.KEYUP:
print("hello")
if event.type == pygame.K_RIGHT:
print("good")
if event.type == pygame.K_LEFT:
print("SUP")
if event.key == pygame.KEYUP or event.key == pygame.KEYDOWN:
print("Heloo")
import pygame
# Making sure the pygame or whatever you installed works
pygame.init()
# making the default pygame screen appear
screen = pygame.display.set_mode((800, 600))
# Changing the color and icon of this game
pygame.display.set_caption("Mario Invaders(Space Invaders)")
icon = pygame.image.load('mario.png')
pygame.display.set_icon(icon)
# Player
player_IMG = pygame.image.load('mario paper.png')
playerX = 20
playerY = 230
playerY_position = 0
def player(x,y):
screen.blit(player_IMG, (x,y))
working = True
while working:
screen.fill((78, 134, 242))
player(playerX,playerY)
pygame.display.update()
for event in pygame.event.get():
if event.type == pygame.QUIT:
working = False
if event.type ==pygame.KEYDOWN:
print("Hi")
if event.type == pygame.KEYUP:
print("hello")
if event.type == pygame.K_RIGHT:
print("good")
if event.type == pygame.K_LEFT:
print("SUP")
if event.key == pygame.KEYUP or event.key == pygame.KEYDOWN:
print("Heloo")