[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] rookie q about Sprites



Hello Shandy and thanks for your point of view.

I actually made it work nicely, after a lot of coffee of course :)
Pimans tutorial is a masterpiece for the beginner, I found that one too and read it carefully.

Now on to next one, I'll try to make my pieces activate on mouseclick and then I'll move them around my chessboard. :)

Regards
Stefan

----- Original Message -----
From: Shandy Brown <shandy@geeky.net>
Date: Sat, 24 Apr 2004 19:06:44 -0400
To: pygame-users@seul.org
Subject: [pygame] rookie q about Sprites

> 
> 
> > Should I make the 2 different pieces a class each and inherit from Sprite, 
> > even if they are static ones that will not move.. (at least not yet?)
> 
> Yeah, for the sake of learning, I'd say you should be making them
> sprites.  And put them in a RenderUpdates group while you're at it.
> 
> > Also, I suppose I better be careful here, cause I shouldn't need to load 
> > that image and create a new instance everytime I click the board.. right?
> > (Baaa, to early for this, need some coffee to make my braincells work.. ;)
> 
> Eventually, you will find that loading the same image each time affects
> performance.  I'm of the "optimize last" school of thought, so I'd
> suggest leaving it alone.  But it *is* really easy to either by making
> it a class attribute or by making a "graphics" module that caches all
> the images
> 
> I refer you to piman's excellent tutorial:
> http://kai.vm.bytemark.co.uk/~piman/writing/sprite-tutorial.shtml
> 

-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze