locked
Need help with animation, for my XAML game RRS feed

  • Question

  • Hello friends,

    I need help in creating animation for my snake and ladder game(C#,XAML). I have completed the game logic, but can't understand how to animate my UI.

    1. I want to animate 6 dice images so that when the player clicks on the Roll Dice Button a shuffle animation will play, and while the animation is playing the user can't click any thing.

    2. I want the player disc to move one step at a time (animation) on the game board.

    Please help me I am new to animation. Kindly give a reply

    Tuesday, April 21, 2015 6:24 PM

All replies

  • Hello,

    I would recommend using Storyboards and / or the XAML animation library.

    Other resources:

    Storyboarded animations (XAML)

    XAML animation library sample

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, April 21, 2015 8:35 PM
    Moderator
  • Still can't figured out how make a dice roll animation show me some example. I really need help. 

    I am Self learning the subject, I am on my own.

    Need some example to figure it out, I am using the Random Class to generate random Dice number, 

    and using this no to show the corresponding dice image but I need to show an rolling dice animation and the player should not be able to do any thing until the animation is over 

    Thursday, April 30, 2015 4:33 PM
  • What do you want the animation to look like?

    If you want to animate a rectangle or image to rotate, translate, etc. then you can do so in a Xaml animation. Blend's animation toolbar will let you record property changes into an animation.

    If you want rolling 3D cubes then you'll need to either render with D3D or embed a video.

    Thursday, April 30, 2015 5:16 PM
    Moderator
  • I have 6 dice images I want them to appear one after another for  3 seconds then the one random image will appear , that my random no method will generate.  
    Friday, May 1, 2015 7:42 AM
  • Take a look at the documentation I linked previously.

    You can stack the images all one on top of the other and set their Opacity to 0 so they don't show up, then create a Storyboard which animates each image's Opacity from 0 to 1 in turn.

    A more advanced version would use two Image controls (front and back) rather than 6 and swap the loaded bitmap for each one.

    --Rob

    Tuesday, May 5, 2015 1:34 AM
    Moderator