[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] [PYGAME] Noob Help.



> On Fri, 13 Apr 2007, python@xxxxxxxxxxxx wrote:
>> Alright how do you open a blank window. I tried the following:
>> 	import pygame as D_ENGINE
>>
>>     size = width, height = 320, 240
>>     speed = [2, 2]
>>     black = 0, 0, 0
>>
>>     screen = D_ENGINE.display.set_mode(size)
>>
>>     while 1:
>>         for event in D_ENGINE.event.get():
>>             if event.type == D_ENGINE.QUIT: sys.exit()
>>
>>         screen.fill(black)
>>         screen.blit(ball, ballrect)
>>         D_ENGINE.display.flip()
>>
>>
>> But it doesn't work.
>
> Please always supply a traceback of the error you receive when asking for
> help. "It doesn't work" is rarely helpful.
>
> First problems from glancing at the code:
>
> 1. you're referring to "ball" and "ballrect" when they don't exist.
> 2. you also use the sys module without importing it.
>
> Also, why are you renaming pygame?
>
>
>     Richard
>
Im sorry, im noob @ this.  Ill try what you said and Im just testing junk
getting used to pygame and python etc.. nothing big.