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

Re: [pygame] learning to program tetris



> On Jan 19, 2004, at 9:56 PM, Shandy Brown wrote:
>
> Numeric arrays are higher performance, ONLY hold numbers, and have a
> lot of nice features that you don't get with lists-of-lists (like
> reshaping).
>
> I can't imagine needing them for tetris, unless you were rotating the
> pieces with vector ops :)

Well, long ago I started my first attempt with Pygame, a Tetris-like game
(which was suggested as a good starting point in game programming in a
website), and I indeed used Numeric. IIRC, Numeric made rotating and moving
the pieces, detecting collisions and in general managing the "game board" an
easy task. Perhaps I should have done it with bare lists to exercise my
brain ;)

cheers,
fonso