Hi,
I implemented a game loop similar (mostly identical) to the storyboard engine in your examples. For a light load, it works great, but when I try to do something more practical with it, it chokes badly.
I am having two problems:
1. If a single frame takes too long to update (seems like about > 50ms), the whole game sputters and goes through clumps of unresponsiveness, sometimes for nearly a minute at a time! Interestingly, adding a GC.Collect() call in the update loop smooths some of it out, and if I set an interval in the storyboard that is greater than the time it takes to update a frame, performance becomes uniform again (albeit bad).
2. Problem 1 isn't so bad, since it really shouldn't take more than 50 ms to render a frame, right? Well I have a collection of Image controls representing the game board and sprites in my game... using transparency encoded .PNGs. If I leave them all stationary, everything is fine. I can even animate a few of them (~10 per frame) without performance impact. But once I start trying to move too many of them around (15-20 per frame) the performance drops sharply. I have tried setting their position both with the Left/Top properties, and with a TranslateTransform, but the result is the same -- bad.. really bad.
Any idea why this could be?
Have you had any success animating 20+ image-based sprites?