1
\$\begingroup\$

I'm developing a 2D game for windows phone. It will feature rather simple 2D graphics and animations. I can get most things done using XAML an storyboards for animations. The performance is fine as long as the images are cached and I don't use standard user-controls (doesn't seem to work well with animations) and stick to using only canvases and images. I really like how simple it is to create basic animations using storyboards.

However, I'm not sure how far XAML and storyboards will get me. Specifically, I have no idea to do sprite-animations. Is there a way to do sprite animations in XAML?

Is it a bad idea to try create a 2D game in XAML?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Depends on if you are using a sprite strip or separate images for each frame? Apparently if you use separate images then you could get some flickering happening, especially at load time. However if it is a sprite strip then you can implement it by modifying the Clip and RenderTransform of the source image in your DispatchTimer. Here is a website that explains:

http://www.cnblogs.com/Jax/archive/2010/02/26/1673899.html

\$\endgroup\$
1
  • \$\begingroup\$ Thanks. Been looking around and I've come to the conclusion that using sprite strip and modifying render-transform is the way to go. \$\endgroup\$
    – Pking
    Commented Feb 21, 2013 at 10:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .