sounds weird.

what are the results of profiling?
http://www.pygame.org/wiki/Profiling?parent=CookBook


On Tue, Feb 3, 2009 at 1:48 AM, Yannick Weinz <yannick_we...@gmx.de> wrote:
> Hi all.
>
> I have a problem with the visible flag of the DirtySprite and the .draw() 
> method of the LayeredDirty group.
>
> Right now i'm at writing some kind of labyrinth game. Therefore each cell you 
> can be on has its own class (DirtySprite). I only want to see a small radius 
> of the map, thus using the visible flag.
>
> The Problem is now, that when i put most of the cells to visible = 0, the 
> draw() method of the LayeredDirty Group needs several seconds until its 
> finished (i tested it with 100x100 Cells, means 10000 DirtySprites in my 
> LayeredDirty group and as soon as i move, e.g. all Cells get scrollen by the 
> length of a cell to the right direction, the .draw() method needs some 
> seconds to compute, so before i see a result on the screen, i have to wait 
> some seconds). The funny thing is, that if all cells are visible = 1 (default 
> value), everything works fine (if i move the draw() method only needs ms to 
> compute).
>
> Is it normal that a Spirte takes much longer to be drawn when the visible 
> flag is set to 0 or does i do something wrong?
> --
> Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL
> für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
>

Reply via email to