Moving on, here is my code:
#-Le Boilerplate code import pygame, sys from pygame.locals import * #-Loading up the images of le balls and making le background white redBallImage = "redball.png" blueBallImage = "blueball.png" #lolblueballs.. greenBallImage = "greenball.png" blackBallImage = "blackball.png" cursorImage = "blueball.png" pygame.init() screen = pygame.display.set_mode((640,360),0,32) screen.fill((255,255,255)) cursor = pygame.image.load(cursorImage).convert_alpha() redBall = pygame.image.load(redBallImage).convert_alpha() greenBall = pygame.image.load(greenBallImage).convert_alpha() blueBall = pygame.image.load(blueBallImage).convert_alpha() blackBall = pygame.image.load(blueBallImage).convert_alpha() x,y = 0,0 moveX,moveY = 0,0 #-Just trying out some player character movement. while True: screen.fill((255,255,255)) for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() if event.type == KEYDOWN: if event.key == K_DOWN: moveY = moveY + 20 elif event.key == K_UP: moveY = moveY - 20 elif event.key == K_LEFT: moveX = moveX - 20 elif event.key == K_RIGHT: moveX = moveX + 20 if event.type == KEYUP: if event.key == K_DOWN: moveY = moveY + 0 elif event.key == K_UP: moveY = moveY - 1 elif event.key == K_LEFT: moveX = moveX - 1 elif event.key == K_RIGHT: moveX = moveX + 1 x = moveX y = moveY screen.fill((255,255,255)) screen.blit(cursor,(x,y)) screen.blit(blueBall,(100,200)) screen.blit(redBall,(400,100)) screen.blit(greenBall,(240,20) pygame.display.flip()
-I am using Python 2.7 and it's respective stable Pygame version.
-When I try to run the script with IDLE, I get a syntax error with the "pygame" in the "pygame.display.flip()" highlighted in red. This is one of my first times using the Pygame library, and my VERY first time using IDLE (I usually just use Notepad++ and the command line for Python).
Did a google search, did not find anything of use, and can't spot anything myself. I hope that I was courteous and wrote this post correctly and to your conveniences, and that one or two of you can help me. And I wouldn't be lying if said I don't mind how long it takes, as I only have less than 24 hours to complete and submit the game. Then again, I needed a break anyway.