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.

x, y (deprecated)

Deprecated — kept for older projects, avoid using this in new code.

Problem it solves

Older projects used `pos` to create a location value.

What this block does

Deprecated. Creates a location value at the given x, y coordinates. Use `point` instead for new projects.

The block

Block ID: spriteutilpos

x $x y $y block

Parameters

NameTypeDefaultMeaning
xnumberX coordinate
ynumberY coordinate

Returns

PositionA location value (extends util.Point).

Example

let target = spriteutils.point(80, 60)
console.log(target.x)

Add the extension

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