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

[pygame] Source rect for sprites in a RenderUpdate group



Hi all,

I'm trying to develop a little shoot'em up just for fun. The first try is a disordered code that can do the begining of the job, but who has many bug. So I'm trying to use an MVC pattern as explained in tut-design.

The tricky point for me is that I've only used individual sprites and the blit method to place things on the screen, with the 3 args of blit : source surface, destination, souce rect. In the example of the tut-design tutorial, sprites are managed with a renderUpdate group, and "displayed" with the draw method, that require every sprites to have image and rect attribute. Is there any way to specify a source rect for those sprites that will be used, or am I supposed to get back to a blit method to be able to use only a small part of the surface ?

Thanks

Vincent



Pieddemail