[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] groups drawing optimization
- To: pygame-users@xxxxxxxx
- Subject: [pygame] groups drawing optimization
- From: Luca <lucafbb@xxxxxxxxx>
- Date: Sun, 21 Dec 2008 21:54:06 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 21 Dec 2008 15:54:09 -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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=VBnWByfo+BFuEwqSMdHDCi+9WUvSz/qREZrd6TIdd3Y=; b=GGR94CvG0WlA+U+pQzR122apy61FGV4CJnVovTrvjUaZIU1SaQYhWcr8NbGP3FjqwY NRDYmHNIlp/Zk+oMwPXX1SexG5+6+8o8Mv/19o2W8iyt3pmddAGpy/e8UQ7V7Id6lAgk pUr8Z8CotXumqk2So2dvEjl2Vdo/msixEgnC4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=xlS6sZlll+iBk9FFDvnvUGHM9uZ30G4MHrVMM5P+vLgtnqyICNWhq1eSVBT3RzD8gh n4PRt/Nj1N12DvPpNYNMF5DCHSKzGgxbwzqjBDdquWSX2XRR0a3V2GENVxj9Z9kbMeR1 T1GTFTDHYN+yb+Tnr4jg0VJnFcveOO9Oz2TG0=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hi all.
I've a non yet optimized game that works on level bigger that the screen.
So on my levels, sprites can be found outside the viewable part of the screen.
I'm just wondering if adding some code that didn't draw those sprites
when they are outside the viewable area can be good, or pygame low
level procedures do this itself.
What I'm thinking is to rewrite the draw method of the Group class, to
skip all sprites that aren't viewable.
Any comment about this? Is a useless work?
--
-- luca