# Help counting pixels

**URL:** <https://forum.makecode.com/t/help-counting-pixels/32183>\
**Category:** Help\
**Created:** [December 3, 2024, 11:06pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183 "2024-12-03T23:06:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DA\_PRO\_PLAYZ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/da_pro_playz/32/19214_2.png) [@DA\_PRO\_PLAYZ](https://forum.makecode.com/u/DA_PRO_PLAYZ)\
**Post date:** [December 3, 2024, 11:06pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183/1 "2024-12-03T23:06:34Z")

</div>

Hi, Andrew here! I have a question, as always. I am making a Splatoon-like game, and instead of using a tilemap, I am using the background image. The end goal is to have the characters leave a trail of their color behind them, and at the end of the countdown, the player who has covered the most of the screen with their color wins. But I don’t know how to get the game to count how many pixels there are of the color, determining the winner. Any ideas? Here is the code:

> **[Color Battle!](https://arcade.makecode.com/S05305-96656-90901-39959)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![MeatballDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meatballdev/32/28502_2.png) [@MeatballDev](https://forum.makecode.com/u/MeatballDev)\
**Post date:** [December 3, 2024, 11:09pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183/2 "2024-12-03T23:09:52Z")

</div>

This will be easy

---

<div class="post-metadata">

**Author:** ![DA\_PRO\_PLAYZ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/da_pro_playz/32/19214_2.png) [@DA\_PRO\_PLAYZ](https://forum.makecode.com/u/DA_PRO_PLAYZ)\
**Post date:** [December 4, 2024, 3:02am UTC](https://forum.makecode.com/t/help-counting-pixels/32183/3 "2024-12-04T03:02:36Z")

</div>

I used an AI

> **[Color Battle!](https://arcade.makecode.com/S27458-34915-95570-94533)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![MeatballDev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meatballdev/32/28502_2.png) [@MeatballDev](https://forum.makecode.com/u/MeatballDev)\
**Post date:** [December 4, 2024, 6:39pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183/4 "2024-12-04T18:39:43Z")

</div>

WOAH WOAH WOAH WOAH, NOT AI  
(sentence)

---

<div class="post-metadata">

**Author:** ![DA\_PRO\_PLAYZ](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/da_pro_playz/32/19214_2.png) [@DA\_PRO\_PLAYZ](https://forum.makecode.com/u/DA_PRO_PLAYZ)\
**Post date:** [December 4, 2024, 9:37pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183/5 "2024-12-04T21:37:55Z")

</div>

why not?

---

<div class="post-metadata">

**Author:** ![pecan4pi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/pecan4pi/32/20940_2.png) [@pecan4pi](https://forum.makecode.com/u/pecan4pi)\
**Post date:** [December 9, 2024, 7:17pm UTC](https://forum.makecode.com/t/help-counting-pixels/32183/6 "2024-12-09T19:17:54Z")

</div>

could you please stop just posting stuff like “this is so elementary” or “that’s so easy” and not actually posting an answer to the question asked? It’s really not helping anyone and also could make some people feel bad because your implying (whether your trying to or not) that their dumb for not knowing how to do that.  
  
  
  
  
thanks

-pecan4
