These sprites take three different animation paths, or Bézier curves. This type of programming lends itself well to ‘space invader’ type games. You do not need concern yourself with the physics of a game, having only to follow straight lines. You just need to define explicit start/end points, and optional control points that the sprite deviates along, and the duration of the animation.
I am new to MakeCode, but I want to eventually make an extension that allows designers to choose animation paths in block code. Also when creating a path, you could add an optional ‘easing’ option (https://easings.net/).
Is there anyone interested in working together to make this type of extension? Please let me know I would love to hear for you and your ideas. Perhaps it is already done, please let me know.
Don’t worry. I started playing with the paths defined here
and got it working.
So a nice extension would be to have the user choose 2 points, and optionally two extra control points, by using the screen picker, and have that translate into an SVG path, and then use that with the other animation library. So actually it would be an extension of the animation extension. Is that possible?
I was playing around with idea of choosing points here:
Yes, if you want to you can make an extension that adds more blocks to the animation extension – when you create an extension you can add the animation package like you normally would, and it will become a dependency of the extension / automatically get loaded whenever your extension gets loaded. Then you just make the namespace the same as the animations namespace (or use the blockNamespace attribute to move blocks into that category, if you want your own namespace), and the blocks will appear within the animations category.