# How do I use arrays and sprite data?

**URL:** <https://forum.makecode.com/t/how-do-i-use-arrays-and-sprite-data/41210>\
**Category:** Help\
**Tags:** game, extension, demo\
**Created:** [December 24, 2025, 1:04am UTC](https://forum.makecode.com/t/how-do-i-use-arrays-and-sprite-data/41210 "2025-12-24T01:04:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GotMilk](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@GotMilk](https://forum.makecode.com/u/GotMilk)\
**Post date:** [December 24, 2025, 1:04am UTC](https://forum.makecode.com/t/how-do-i-use-arrays-and-sprite-data/41210/1 "2025-12-24T01:04:01Z")

</div>

Hello again, for my game i need to make a battle system similar to pokemon. Basically i need an array with sprites, and then store information using sprite data. After i do that i create a sprite from the array randomly and use the correct information for it.

I found a way to do this, but the problem is… it’s really inefficient and not scalable.

I’m not entirely sure how to do this system properly so any advice helps a lot!

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/1/6/165b8b067c879fe5e8c373ace5799687f51d820a.png)

Project: [https://arcade.makecode.com/S52312-19611-53900-89153](https://arcade.makecode.com/S52312-19611-53900-89153)

---

<div class="post-metadata">

**Author:** ![GotMilk](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@GotMilk](https://forum.makecode.com/u/GotMilk)\
**Post date:** [December 24, 2025, 5:35pm UTC](https://forum.makecode.com/t/how-do-i-use-arrays-and-sprite-data/41210/2 "2025-12-24T17:35:15Z")

</div>

since this post was made i’ve been working on it some more. It’s still the same system just fleshed out. (the menu is wip)

> **[CC TestingBattleSystem](https://arcade.makecode.com/S22915-93397-78758-08242)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![BitBot](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bitbot/32/33272_2.png) [@BitBot](https://forum.makecode.com/u/BitBot)\
**Post date:** [December 25, 2025, 3:00am UTC](https://forum.makecode.com/t/how-do-i-use-arrays-and-sprite-data/41210/3 "2025-12-25T03:00:12Z")

</div>

Does this help? 😅

> **[Sprite Array](https://arcade.makecode.com/S60357-92847-07022-35499)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
