• Content count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About alexwasik

  • Rank
  1. Beginner Python Game Issue

    Are you serious?! Wow. Thank you. Thank you. Thank you. Something so simple.... Side question. I'm using Notepad++ to compose code. Is there any suggestions to another program that may help with error correction?
  2. Beginner Python Game Issue

    So, I just started learning Python. I use VB regularly and thought, let's try something new. Now the juicy stuff... I decided to borrow a simple ball bouncing program and recreate it. Although I typed it, it is an exact replica. I keep getting syntax errors at the display.get_caption() AND if I comment that out, at the "while" command... Help. (pygame installed as well) [source lang="python"]# My first game! from pygame import * #Use pygame's funcitons ballpic = image.load('ball.png') done = False ballx = 0 # Ball position variables bally = 0 ballxmove = 0 ballymove = 0 init () #start pygame screen = display.set_mode ((640,480) display.set_caption('Ball Game') while done == False: screen.fill(0) #fill screen with black screen.blit(ballpic, (ballx, bally)) #draw ball display.update time.delay(1) ballx = ballx + ballxmove #update ball position bally = bally + ballymove if ballx > 600: ballxmove = -1 if ballx < 0: ballxmove = 1 if bally > 440: bally = -1 if bally < 0: bally = 1 for e in event.get(): #Check for ESC pressed if e.type == KEYUP: if e.key == K_ESCAPE: done = True [/source]