[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] scrolling through scrolling



 How about using numeric to calculate the coordinates
for each tile?  I think that is one of the slow bits.

So a move right by ten pixels would be something like
tile_positions + (10,0).  Then pass slices of the
array to a c drawing function.  The slice would only
be of the tiles which are to be drawn.

If you have a massive map( 1000's of tiles accross ),
then you'd want to only update the positions of the
viewable tiles(again by using a slice of the visible
tiles).  So you'd have a visible matrix of tile x,y
positions, and a full map matrix which consists of the
type of tile to be drawn(an index into a list of
images?).

A similar method should also be useful for drawing
lots of sprites or particles, as you don't have the
python object overhead for each sprite.


I don't have the time to implement it now though :( 
Someone else who thinks it'll work wanna do it for us?


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org