Games with Squeak

Mikael Kindborg mikael.kindborg at gmail.com
Sun Nov 5 20:12:38 UTC 2006


Hi again,

I discovered that when you have many smaller non-overlapping animated
morphs (sprites) the display rate suddenly drops in an unexpected way
when adding new sprites. That was puzzling me, but then I stumbled
across a method in class DamageRecorder and found that when having
more that 15 dirty rectangles they are merged. That causes a much
bigger area of the screen to be redrawn, casing the drop in update
rate.

Attached is a change set that adds a class method to DamageRecorder
that makes it easy to experiment and change the maximum number of
invalid rectangles to fit with the game/application at hand.

Best, Micke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DamageRecorder-maxInvalidRects.2.cs
Type: application/octet-stream
Size: 2780 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20061105/5a2a1ec6/DamageRecorder-maxInvalidRects.2.obj


More information about the Squeak-dev mailing list