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

Re: [pygame] Surface Sprite Rect -> HELP



thanks, but when clearing a row i will need to have the moving methods
of my piece class.
My piece class has a group of sprites and methods to spin and move the
piece, also i built a collision detection system in the piece.
But you say when the piece hits the ground i just blit it. I´m not
sure what do you mean...
now y have a class witch contains all the fallen pieces in a list and
handles the clearing of the row, to draw the fallen pieces i iterate
over the list and use the draw method for each sprite group of the
piece, ¿how would you do it?

On 11/20/06, Farai Aschwanden <fash@xxxxxxxxxx> wrote:
Hello

Spotter already explained very well and short the differencies. Imho
I suggest you dont use the sprite module that glows up on handling
many sprites (sprite groups). The only active sprite you might have
in Tetris is the falling tile that you can easily handle as a
surface. If one falling tile touches the ground you can blit it into
the surface where all fallen tiles already are in.
Just an idea how you could do it. Im sure there are many more and you
probably know how to do it.

Good luck
Farai


Am 20.11.2006 um 21:36 schrieb Nicolas Bischof:

> Greetings!
> i´m making my first game, it will be a Tetris.
> But i sill don´t understand when to use Surfaces,  Sprites and Rects,
> and their intended propose and their best utilization scenario.
> could someone explain the relation of Surface, Sprite and Rect, their
> ideal intended propose?