[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] The gsoc project physics engine.
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] The gsoc project physics engine.
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Sat, 21 Jun 2008 13:29:12 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 20 Jun 2008 23:29:16 -0400
- 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=IS3xIwJ4g2EF/sSr7gAA2CWixASREG8U6lhu4w5Yyag=;        b=enUk/Jsy1BwrZzYvDKc7rx2bm7QzLTRmXYx+Pdy1/1KQPx6DnSzMD+1+zzG+COVwHN         fvbtn4T7Put9pimGZhTmOjFP8HnMrSWIFRcdUM8/U5rBYb9JTk9ldCRV6RpJcwpKa3gu         irwOyCPrVYzPkxv3sCz9NIIKQEMZtGJYWbbog=
- 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=qrs4iujaH/vz4rys8MKoL7m4y7VXNCxmVKIDb4Cdj9QkODxYCFWnSWXdnPXyZt2Dpo         TwmUMKtwlNkyqXF3i+VmOyJYpwPDhbH523lX2tO4yIndr9n4KXFNYEg+un+4Wdh3Qd3o         y3ZT8b07j5hlH6EzhroqSAoEG4a6ijnEsHMZI=
- In-reply-to: <200806211143.08435.richardjones@xxxxxxxxxxxxxxxx>
- References: <20080618152316.GA5936@home>	 <200806211143.08435.richardjones@xxxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
# hello.
#
# I've prepared a set of python computer instructions for your consideration.
# Warning: Not safe for work! But it's the weekend, so that doesn't matter.
#  TODO: these computer instructions could be optimised.Only achieves 0.5 fps.
def inately__for_your_consideration():
    # a quote from previous email explaining why.
    reasons_from_other_email = """
As you can see from Zhang's post there's a difference between making soft
bindings using ctypes and hard bindings using the Python C API.
While ctypes is convenient to use and easy to modify since only Python code
is involved, it lacks the ability to let the programmer to extend Python
using the underlying C API directly. It also lacks the ability to
intergrate easy with other Python extensions. It's also a matter of speed,
in particular when it comes to iterations, like for collision testing and
drawing many objects. If this can all be done in C we are better off.
    """.replace("42", "meaning of life").split("\n")
    return reasons_from_other_email
import pygame;from pygame.locals import *;pygame.init()
screen = pygame.display.set_mode((640,200))
pygame.display.set_caption("for your consideration")
f = pygame.font.Font(None, 24);c = pygame.time.Clock();fps = 0.5
while not filter(lambda x:x.type in [QUIT,KEYDOWN],pygame.event.get()):
    for i, message in enumerate(inately__for_your_consideration()):
        screen.blit(f.render(message,1,(min((i*5)+50,255),
         79,
          min((i*10)+50,255))),
           (10+i*3,i*26));
    pygame.display.flip();screen.fill((0,0,0));c.tick(fps)
#cheers,
On Sat, Jun 21, 2008 at 11:43 AM, Richard Jones
<richardjones@xxxxxxxxxxxxxxxx> wrote:
> On Thu, 19 Jun 2008, Peter Gebauer wrote:
>> I read Zhang Fan's post regarding his gsoc project, I've been looking to do
>> something similar, a Python extension for an already existing library.
>> So far I've extended Chipmunk partially over a few days of prototyping, but
>> there's no point in having two projects doing the same thing
>
> You might well think that... http://code.google.com/p/pymunk/
>
>
>   Richard
>