简体   繁体   中英

Animations in apps

I'm not familiar with app development so I want to gain a better understanding on how animations are implemented in apps as I have different ideas.

I have designed 4 images using Adobe Illustrator, 3 of the images are planets and 1 image is a rocket. In my app I would like the rocket to randomly move to a planet when clicking a button, the ideas I have to implement this are:

  1. Programatically move the rocket pixel by pixel towards the randomly selected planet

Or

  1. Create 3 different animations of the rocket moving to each planet and when the random planet has been selected play the correct rocket animation.

Which one is the best approach for what I am trying to achieve? If you have better please can you share as I do not know how to go about doing this.

Thanks!

It's a trade off between download size / performance / versatility / maintainability / implementation time.

  1. Will use more processor, result in a smaller program size, be more versatile (you could allow the user to control the rocket and detect when they arrive at a target planet)

  2. Will use less processor, be simpler to implement, result in a larger program size. You'd need to remake the animations in the case of adding a new planet, doesn't scale well (What happens when you have 20 planets? with different screen resolutions?)

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