Re: [pygame] Help with pygame

2011-12-11 Thread Sean Wolfe
also .. the error says windows bmp but you're on osx ... maybe we have
a bug handling bmps in osx?

On Sun, Dec 11, 2011 at 11:36 PM, Sean Wolfe  wrote:
> is there a reason why you're loading the image in the while loop? The
> way I'm reading the code you're loading the bmp every 100ms based on
> clock.tick(10).
>
> How about loading the image first then running the loop.
>
> How big is the bmp?
>
> On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher  
> wrote:
>> Zach, code looks fine - can you attach the image as well? The problem
>> may lie with it.
>>
>> thanks
>>
>> On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker  wrote:
>>> Ok guys heres the code. Same error, better code.
>>> #!/usr/bin/env python
>>>
>>> import pygame
>>> pygame.init()
>>>
>>> #Set height and width of the screen
>>> size=[400,500]
>>> screen=pygame.display.set_mode(size)
>>>
>>>
>>> #Loop until user clicks the close button
>>> done=False
>>> clock=pygame.time.Clock()
>>>
>>> while done==False:
>>>     #This limits the while loop to a max of 10 times per second
>>>     clock.tick(10)
>>>
>>>     for event in pygame.event.get():
>>>         if event.type==pygame.QUIT:
>>>             done=True
>>>     car=pygame.image.load('images.BMP')
>>>     screen.blit(car, (50, 100))
>>>     pygame.display.flip()
>>>
>>>
>>> pygame.quit()
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> pygame.quit()
>>>
>
>
>
> --
> A musician must make music, an artist must paint, a poet must write,
> if he is to be ultimately at peace with himself.
> - Abraham Maslow



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-11 Thread Sean Wolfe
is there a reason why you're loading the image in the while loop? The
way I'm reading the code you're loading the bmp every 100ms based on
clock.tick(10).

How about loading the image first then running the loop.

How big is the bmp?

On Sun, Dec 11, 2011 at 9:44 PM, Brian Fisher  wrote:
> Zach, code looks fine - can you attach the image as well? The problem
> may lie with it.
>
> thanks
>
> On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker  wrote:
>> Ok guys heres the code. Same error, better code.
>> #!/usr/bin/env python
>>
>> import pygame
>> pygame.init()
>>
>> #Set height and width of the screen
>> size=[400,500]
>> screen=pygame.display.set_mode(size)
>>
>>
>> #Loop until user clicks the close button
>> done=False
>> clock=pygame.time.Clock()
>>
>> while done==False:
>>     #This limits the while loop to a max of 10 times per second
>>     clock.tick(10)
>>
>>     for event in pygame.event.get():
>>         if event.type==pygame.QUIT:
>>             done=True
>>     car=pygame.image.load('images.BMP')
>>     screen.blit(car, (50, 100))
>>     pygame.display.flip()
>>
>>
>> pygame.quit()
>>
>>
>>
>>
>>
>>
>>
>> pygame.quit()
>>



-- 
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow


Re: [pygame] Help with pygame

2011-12-11 Thread Brian Fisher
Zach, code looks fine - can you attach the image as well? The problem
may lie with it.

thanks

On Sun, Dec 11, 2011 at 2:49 PM, Zack Baker  wrote:
> Ok guys heres the code. Same error, better code.
> #!/usr/bin/env python
>
> import pygame
> pygame.init()
>
> #Set height and width of the screen
> size=[400,500]
> screen=pygame.display.set_mode(size)
>
>
> #Loop until user clicks the close button
> done=False
> clock=pygame.time.Clock()
>
> while done==False:
>     #This limits the while loop to a max of 10 times per second
>     clock.tick(10)
>
>     for event in pygame.event.get():
>         if event.type==pygame.QUIT:
>             done=True
>     car=pygame.image.load('images.BMP')
>     screen.blit(car, (50, 100))
>     pygame.display.flip()
>
>
> pygame.quit()
>
>
>
>
>
>
>
> pygame.quit()
>


Re: [pygame] Help with pygame

2011-12-11 Thread Zack Baker
Ok guys heres the code. Same error, better code.
#!/usr/bin/env python

import pygame
pygame.init()

#Set height and width of the screen
size=[400,500]
screen=pygame.display.set_mode(size)


#Loop until user clicks the close button
done=False
clock=pygame.time.Clock()

while done==False:
#This limits the while loop to a max of 10 times per second
clock.tick(10)

for event in pygame.event.get():
if event.type==pygame.QUIT:
done=True
car=pygame.image.load('images.BMP')
screen.blit(car, (50, 100))
pygame.display.flip()



pygame.quit()




  


pygame.quit()