MakeCode Games!

A fan-made community library of MakeCode Arcade games. Visit MakeCode Arcade to make a game!

← Back to extensions

Sprite Utils

A grab-bag of sprite math and rendering helpers for MakeCode Arcade: distances, angles, movement, timers, and simple drawing.

fill circle

Problem it solves

You want a solid, filled circle—for example to represent an explosion, a shield, or a highlighted area—instead of just an outline.

What this block does

Draws a filled circle onto an image at the given center and radius.

The block

Block ID: spriteutilextdrawfilledcircle

fill circle in $to at cx $cx cy $cy radius $r color $col block

Parameters

NameTypeDefaultMeaning
toImagemyImageThe image to draw onto
cxnumber80Center x (0-160)
cynumber60Center y (0-120)
rnumber5Radius (0-40)
colcolor index3The color to fill with

Example

let myImage = image.create(160, 120)
spriteutils.fillCircle(myImage, 80, 60, 5, 3)

Add the extension

Add github:jwunderl/arcade-sprite-util to your project, or open: Import arcade-sprite-util.