[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Re: Collision bounds smaller than sprite image
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Re: Collision bounds smaller than sprite image
- From: andrew baker <failrate@xxxxxxxxx>
- Date: Fri, 31 Dec 2004 11:36:11 -0800
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 31 Dec 2004 14:36:36 -0500
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=RhZxy5xXSGNipqND0p+FO8kC3v3cltxL5lyENq+rJHZAKkXmH7/RXaOD6jVU3n2FWWFOQAhMXFJgVu/pR8/wzeO2+WTiy5AwHTFsVrwV6sYfa6HQ36ZrCkngfroxwO8U+RoUl4gk1mq5tGuO4G+NQTLfGboke4LzsJupCyWukxE=
- In-reply-to: <BAY2-F403BE4B0504AAC20954875B19D0@phx.gbl>
- References: <BAY2-F403BE4B0504AAC20954875B19D0@phx.gbl>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Oh, BTW, that version of the code takes graphic files that are strips
(one cel high by N cels wide), but you could easily rewrite it to
accept blocks (N cels high by N cels wide or whatever you need).
On Fri, 31 Dec 2004 23:45:25 +0430, Lee Harr <missive@xxxxxxxxxxx> wrote:
> >Yeah, the more I think about it, the more I think that creating a
> >second rect and storing it as an attribute is the way to go. All of
> >the graphical adjustments and movements will be performed with the
> >normal rect attribute, and the actual collision and bounds tests will
> >be done with the collision_rect.
>
>
> That is how I did it in pygsear:
> http://www.nongnu.org/pygsear/
>
> (except I called it spriteobj.crect :o)
>
>
> > I guess it's not really that hard,
> >but I was really exhausted after writing a strip -> cel routine :D
>
> Interesting ... I have been thinking about writing such a beastie
> for pygsear for the last few weeks... are you releasing your code?
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
--
Andrew Ulysses Baker
"failrate"