# Sprite editor: extra functions

**URL:** <https://forum.makecode.com/t/sprite-editor-extra-functions/3825>\
**Category:** Game Design\
**Created:** [October 9, 2020, 4:06pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825 "2020-10-09T16:06:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 9, 2020, 4:06pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/1 "2020-10-09T16:06:32Z")

</div>

In the sprite editor, it would be great if you could rotate an image. I’d probably only be interested in rotating it a 90 degree angle, so if flipping it horizontally/vertically were possible, that would also be fine. I think that would aid in making frames for an animation, or separate images for in a game.

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 9, 2020, 4:16pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/2 "2020-10-09T16:16:16Z")

</div>

You might need to put the pictures in an array. There is no block for rotating a sprite

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 9, 2020, 4:31pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/3 "2020-10-09T16:31:17Z")

</div>

No, he wants the ability to rotate an image in the image editor. So you could have a sideways coin or an upside-down tree. I also agree and would definitely like a 90-degree angle flipper.

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 9, 2020, 4:33pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/4 "2020-10-09T16:33:11Z")

</div>

Ohhhhh in the editor…

> [@UnsignedArduino](#):
>
> . I also agree and would definitely like a 90-degree angle flipper.

agreed

---

<div class="post-metadata">

**Author:** ![ractive](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ractive/32/928_2.png) [@ractive](https://forum.makecode.com/u/ractive)\
**Post date:** [October 12, 2020, 7:40pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/5 "2020-10-12T19:40:08Z")

</div>

That why I came up with this vscode extension:  
[Textmatrix: A Visual Studio Code extension to manipulate images in text form](https://forum.makecode.com/t/textmatrix-a-visual-studio-code-extension-to-manipulate-images-in-text-form/2084) 😉

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 13, 2020, 12:20am UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/6 "2020-10-13T00:20:02Z")

</div>

Yes! We’ve talked about a lot of features to add, and I think image flipping/rotation is high up on the list. I know I also would really like to add layers at some point (if I can figure out a kid-friendly way to do it) and maybe color replace. The main blocker is that we need to figure out a good UI that keeps the basic experience of drawing images easy and uncluttered.

If you have any specific requests, please file them [on GitHub](https://github.com/microsoft/pxt-arcade/issues) or if you don’t have a GitHub account just post them on this thread and I’ll collect them.

---

<div class="post-metadata">

**Author:** ![Kat](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kat/32/2596_2.png) [@Kat](https://forum.makecode.com/u/Kat)\
**Post date:** [October 14, 2020, 12:51pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/7 "2020-10-14T12:51:35Z")

</div>

I would **totally** love to have layers in the sprite editor! That would be **amazing!!**

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 14, 2020, 12:55pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/8 "2020-10-14T12:55:06Z")

</div>

For rotating, what I would think to be the easiest is you select what you want to rotate with the marquee tool and then press a button to rotate 90 degrees in either direction. If nothing is selected, just rotate the entire image. Flipping goes the same. But the problem is when the image isn’t an exact square…

> [@richard](#):
>
> The main blocker is that we need to figure out a good UI that keeps the basic experience of drawing images easy and uncluttered.

You could just have a button that says `advanced` or something like that and when you press on it, more buttons appear like the image flipper and layers manipulation. Press the `advanced` button again, and the buttons would disappear.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [October 14, 2020, 3:10pm UTC](https://forum.makecode.com/t/sprite-editor-extra-functions/3825/9 "2020-10-14T15:10:48Z")

</div>

Well, here’s a Python script that I wrote that will horizontally flip the image.

```auto
old_matrix = []

while True:
    line = input("Please enter matrix data: ")
    if line == "":
        break
    else:
        old_matrix.append(line)

width = len(old_matrix[0])

new_matrix = old_matrix

for count, row in enumerate(old_matrix):
    new_matrix[count] = row[::-1]

print("img`")
for row in new_matrix:
    print(row)
print("`")

```

Gosh, that looks ugly. Just copy the entire image by pressing `ctrl` + `a` to select everything and `ctrl` + `c` to copy. Then paste it in the console. Then press enter and out comes the flipped image. Copy that, and you should get something like this:  
So you would have this:

```auto
img`
 . . . . . . c c c c c c . . . .
 . . . . . c 6 7 7 7 7 6 c . . .
 . . . . c 7 7 7 7 7 7 7 7 c . .
 . . . c 6 7 7 7 7 7 7 7 7 6 c .
 . . . c 7 7 7 c 6 6 6 6 c 7 c .
 . . . f 7 7 7 6 f 6 6 f 6 7 f .
 . . . f 7 7 7 7 7 7 7 7 7 7 f .
 . . c f 6 7 7 c 6 7 7 7 7 f . .
 . c 7 7 f 6 7 7 c c c c f . . .
 c 7 7 7 7 f c 6 7 7 7 2 7 c . .
 c c 6 7 7 6 c f c 7 7 2 7 7 c .
 . . c 6 6 6 c c f 6 7 1 1 1 1 c
 . . f 6 6 6 6 c 6 6 1 1 1 1 1 f
 . . f c 6 6 6 6 6 1 1 1 1 1 6 f
 . . . f 6 6 6 1 1 1 1 1 1 6 f .
 . . . . f c c c c c c c c c . .
`

```

Then paste (`ctrl` + `v`) into the image editor.
