My Favorite Arcade Extensions — Arcade Sprite Data

Kiki Prottsman
Kiki’s Corner
Published in
3 min readJan 23, 2023

--

Microsoft MakeCode Arcade starts as a powerful block-based editor that lets you quickly create games with little or no previous coding background. But, after you’ve played with it a while, you start to wish you could do more. This is where extensions come in.

In Arcade, extensions are libraries that add extra blocks to your toolbox. One of my favorite sets of blocks is the arcade-sprite-data extension. This extension adds a list of blocks that you can use to track additional attributes for a sprite — that’s why they appear inside the “Sprites” Category.

New blocks from the arcade-sprite-data extension

This extension is super useful when you want to keep track of things on a sprite-by-sprite basis. For example, you can easily create a simple variable if you want to keep track of hit points for your main player, but what if you also want to keep track of hit points for whatever enemies may have spawned and be visible on the screen? You may not know in advance how many will appear so there would be no way to create a variable for each one? This extension gives you a better way.

Read more about using this extension for hitpoints and experience points here.

How do I use it?

The arcade-sprite-data extension is essentially a way to add properties to a sprite that weren’t built into Arcade. The blocks let you name a data point (of a specific type) for any sprite. When used inside of an on created container, you can assign properties to all sprites of a kind.

Then, you can modify that data inside events.

This feature is also extremely helpful when you want to run comparisons on the name of a sprite, since sprite names aren’t stored as attributes.

Setting the name of this player to “star” so you can reference it later

You can even make “sub-kinds” for your game.

What happens if you want all enemies to reduce points from the player, but you want the green enemies to also reduce a life? Use arcade-sprite-data!

The ability to keep track of your own attributes on any sprite opens up a whole new world of creativity and simplicity.

Click here to read more about adding extensions to MakeCode Arcade, then explore this add-on for yourself and see how arcade-sprite-data can work for you!

--

--

Kiki Prottsman
Kiki’s Corner

Kiki is an author, educator, and the Director of Education for Microsoft MakeCode