简体   繁体   中英

Animation in Windows Universal Apps

What are some of the best approaches for creating animations for windows universal apps?

My idea is to have a car (image) driving to 1 of 4 locations (also images).. Should I create an animation for each location (4 animations of the car travelling to each one) or should I move the car programatically pixel by pixel.

Now with these 2 ideas, they both have disadvantages:

Creating an animation for each location:

  • What happens if I create an animation for tablet screen sizes but the users uses a phone?
  • 4 animations would cost some memory

Moving pixel by pixel

  • Would not be able to determine which direction the car should be initially facing (if location is behind the car and the car is back to front, it will be confusing)

  • Would cost a lot of processing memory

  • Yet again, what happens if the device is smaller (how are you going to know when to stop the car moving)

  • Since a location is situated at the top left of the screen, and another bottom left.. how do you know when the car needs to face and move diagonally?

These are all the problems I am thinking about when wanting to create an animation for my windows universal app..

Does anyone know of the best approaches for animations?

Thanks

Have you looked at Blend? Using states to dictate what happens/is displayed for the various screen sizes? Here is a video that might help: https://channel9.msdn.com/Blogs/Charles_Sterling/Expression-Blend-Animations-and-Visual-Studio-Integration

For all dynamic actions (animations from point to random point, including that case if you know how many points can be used), you should use programmatically created animations. You can use this solution for common application, not for games that have some game engine.

Yeah, you can use pre-rendered animation files but if this really necessary. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM