[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Problem(s) running in OS X Leopard
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Problem(s) running in OS X Leopard
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Thu, 28 Feb 2008 14:18:29 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 27 Feb 2008 22:18:33 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=B850fRShWa7oV0y21/+wUe2KNFb4Gxew6PFooz7xbuU=; b=qBV2sirOaFHdwA0nRqYyY6jX5cFQB/RuzmmKi+bXxvOGw5Kh1npfUUHWyGNvLDIy1j3uQ7qeeATQev33DTjdxoL4AlshwqYfyjCsHzlZxIT2QX0gj5MvKLBcbyYZLrbnaSsU3DQbTJ5WJwDWaPhVKf4blPu1riHGdFX6Tj0rD0E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lYJ9VJLq8aiD/7UV29SzgkWEdcshLcMuV3MDN+52Yq880nmwsEpF5C8pJI2d2YybaSccsVALtCslYsR2elDFbbsCFUEuhLAzbXLwedscDjGQwsTLeXalcOS5JSDsSFVrPu/udpR61EYjSFlqF01+b0QADfST9DNBS3R43ZECmsU=
- In-reply-to: <E1203623-8322-4CCD-9DBC-DC738D4D9ABA@xxxxxxxxx>
- References: <E1203623-8322-4CCD-9DBC-DC738D4D9ABA@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi,
you need a 'main loop'.
A loops which loops over and over.
clock = pygame.time.Clock()
going = True
while going:
events = pygame.event.get()
# handle events, update game logic here.
pygame.display.flip()
clock.tick()
On Thu, Feb 28, 2008 at 2:04 PM, Unnsse Khan <untz786@xxxxxxxxx> wrote:
> Hello again,
>
> I uninstalled PyDev and PyDev Extensions and reinstalled (in Eclipse)
> and finally got pygame working!
>
> Am relatively new to both Python and Pygame (although I am very
> astounded by the Python language and the Pygame module)! :-)
>
> I created this sample app (and have placed the car.png inside the same
> directory as main.py):
>
> Here's main.py:
>
> import os, sys
> import pygame
> from pygame.locals import *
>
> if not pygame.font: print 'Warning, fonts disabled'
> if not pygame.mixer: print 'Warning, sound disabled'
>
> screen = pygame.display.set_mode((1024,768))
> car = pygame.image.load("/Users/untz/DevProjects/Python/
> pygame_tutorial1/src/car.png")
> screen.blit(car, (200,300))
> pygame.display.flip()
>
> Problems:
>
> (1) A small black window appears and then disappears! (without me
> seeing the car.png image)!
>
> (2) While the program is running, this is what shows in the Eclipse
> Console View (is this an incompatibility issue with OS X Leopard's new
> CoreAnimation library)?
>
> 2008-02-27 18:57:46.287 Python[92860:10b] Warning once: This
> application, or a library it uses, is using NSQuickDrawView, which has
> been deprecated. Apps should cease use of QuickDraw and move to Quartz
>
> (3) Is there an easier way to see the this picture in the screen?
>
> Many, many thanks!
>
> Happy programming,
>
> Unnsse
>