[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Masks?
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Masks?
- From: inigo delgado <inigo.delgado@xxxxxxxxx>
- Date: Tue, 15 Dec 2009 21:27:33 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 15 Dec 2009 15:27:35 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=jZc4wLOb2XZKtcjEo++otKoCvMjC7IByixDcWtgDAt0=; b=OYikDAYiCDJDKEL0qGzVbF44iOd7swCpXr5Lj1ERQXPjhfkRAmqgUCNThJ2JQe/qOo grmvpRKKMz2vNHFHZmj4k5vvAei/gahHJa6LX6TPUP9Y0Ar99PXBQybvvbrOh7CqsFqr YSTSuSFuXjyVqD6PCHgR1ywGCXNx0Hy59vbe0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=SFoYNt9YzH9zdYF3nbOwvAITNzNA056U+XLj6tYCYOJLiL/efXUCwwXxSSXVeSOiuF dYB6so7QtSalAlICd3b7sItUOIg2tMtMk84aBYOBkWrM2DOUYlT/mphHHouWHUGKZJMh I5WaNHgokJl6uXnae1OIK44dSYkqVHVsG0KSI=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all:
I don't have clear how to use the masks to collisions....
I have a bmps with a keycolor and with many frames of the same
spaceship in each and blit a area of them to simulate movement....
How can I do a mask of one part -a frame- of the bmp to see if it
collides with another part -another frame- of another bmp? To find a
exact collision of both? I've done collisions with rectangles, but I
wanna put big ships (like level bosses or medium size ships) and in
that ships this aproximation is poor, so I want, if is a rectangle
collition, to have the posibility of know if its a real collision
If I do a mask of the bmps, I understand that then pygame will test
all the frames in each bmp with all frames of the other bmp?...?¿
--
Nota: Tildes omitidas para evitar incompatibilidades.
:wq