Microsoft MakeCode

Making a sprite run in a circle

How can I make my sprite go in a circle? (like this)

Built a helper block once, should work as an example, the basic idea is changing vx/vy periodically using sin/cos. Sadly the block has several issues, sprites are not in the exact circle according to parameter radius, and get drifted away as time goes by, but works fine if making a scrolling shooter game.

Implementation is here,

Hope it helps.

Thanks! It works pretty well.

Actually, the fact that they sprites drift out add a fun challenge to my game! :laughing: