# Help with pixel art end math issue's

**URL:** <https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809>\
**Category:** Arcade\
**Tags:** make, art, graphics-and-math, extension, game\
**Created:** [March 27, 2023, 11:15pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809 "2023-03-27T23:15:28Z")\
**Posts on this page:** 20\
**Page:** 6

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 27, 2023, 6:36pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/107 "2023-11-27T18:36:33Z")

</div>

hey @richard i have a problem creating a extension  
when i try to open the github page this is what i get

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7779f5efb5609956d5149a6b1aeed868e3d16cf7.png)  
but other wise the extension works

> **[Yu-hayates\_Mouse](https://yu-hayate.github.io/Yu-hayates_Mouse/)**
>
> allows you to get the mouse position at the cost of some distortion. but over all i give it a 8/10 great extension

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [November 27, 2023, 6:38pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/108 "2023-11-27T18:38:41Z")

</div>

When you’re trying to open the extension, you want to make sure you’re using the [github.com](http://github.com) address and not [github.io](http://github.io).

The address you need should look like this:  
[https://github.com/Yu-Hayate/Yu-hayates\_Mouse](https://github.com/Yu-Hayate/Yu-hayates_Mouse)

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [November 28, 2023, 6:14pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/109 "2023-11-28T18:14:13Z")

</div>

i see, thank you

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 6, 2023, 10:41pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/110 "2023-12-06T22:41:01Z")

</div>

hey! @richard. I’m once more asking for your help XP

so here is the problem

so I’m working on a Hitbox extension and I’m making a way to draw something where certain hitboxes are, like draw the outline of a hitbox called “bob”  
but i have been trying to only draw it if its in the screen and only the parts in the screen with the camera  
i have yet to find a way to do so  
here is the project

> **[Hitbox extension](https://arcade.makecode.com/12687-67304-43102-37807)**
>
> Fait avec ❤️ dans Microsoft MakeCode Arcade.

if you have any advice i would be happy to hear it

---

<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:** [December 7, 2023, 12:10am UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/111 "2023-12-07T00:10:59Z")

</div>

@YuHayate all you need is to use the current camera on the scene. There are two properties on the camera object that are worth noting: camera.drawOffsetX and camera.drawOffsetY. Whenever you are drawing anything to the screen, just subtract those two numbers from the x and y respectively:

```typescript
const camera = game.currentScene().camera;
screen.fllRect(
    x - camera.drawOffsetX,
    y - camera.drawOffsetY,
    width,
    height,
    color
)

```

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 11, 2023, 5:36pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/113 "2023-12-11T17:36:45Z")

</div>

hey @richard. i started making a rendering engine and i can’t seem to figure out how to clear the screen [https://makecode.com/\_HhCakzRvkFye](https://makecode.com/_HhCakzRvkFye)

---

<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:** [December 11, 2023, 5:37pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/114 "2023-12-11T17:37:42Z")

</div>

@YuHayate you can clear the screen by using the fill method: `screen.fill(0)`

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 11, 2023, 7:18pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/115 "2023-12-11T19:18:42Z")

</div>

ya thats what i ended up doing yesterday

---

<div class="post-metadata">

**Author:** ![Future\_Knight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/future_knight/32/22166_2.png) [@Future\_Knight](https://forum.makecode.com/u/Future_Knight)\
**Post date:** [December 11, 2023, 7:50pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/116 "2023-12-11T19:50:33Z")

</div>

am I allowed to post a game that has a small amount of blood and limb chopping, but would have a warning saying this game is 13+ ?

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 11, 2023, 7:50pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/117 "2023-12-11T19:50:43Z")

</div>

`screen.fill(0)` doesnt work you have to do ` scene.backgroundImage().fill(0)`

---

<div class="post-metadata">

**Author:** ![GamerGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamergod/32/12217_2.png) [@GamerGod](https://forum.makecode.com/u/GamerGod)\
**Post date:** [December 11, 2023, 8:42pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/118 "2023-12-11T20:42:53Z")

</div>

probably

---

<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:** [December 11, 2023, 8:44pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/119 "2023-12-11T20:44:05Z")

</div>

blood isn’t against the rules; it really depends on the other content of the game!

---

<div class="post-metadata">

**Author:** ![Future\_Knight](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/future_knight/32/22166_2.png) [@Future\_Knight](https://forum.makecode.com/u/Future_Knight)\
**Post date:** [December 11, 2023, 9:47pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/120 "2023-12-11T21:47:36Z")

</div>

what about chopping limbs off

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 21, 2023, 11:46pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/121 "2023-12-21T23:46:47Z")

</div>

hey @richard. do you know why these functions dont work?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/f88eab9dcf292b086b97e988c1b09642c587aecf.png)

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [December 21, 2023, 11:47pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/122 "2023-12-21T23:47:29Z")

</div>

Would you mind adding a link to your project? It will help with the debugging.

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 26, 2023, 6:32am UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/123 "2023-12-26T06:32:32Z")

</div>

sure (sorry for the late reply i was off to see my family)

> **[art. animation by Yu-Hayate](https://arcade.makecode.com/00499-49359-70154-46845)**
>
> Fait avec ❤️ dans Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [December 28, 2023, 9:55pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/124 "2023-12-28T21:55:49Z")

</div>

hey @richard! i wanted to know a thing or two here, first off in the math section theres the math block with the `sqrt(0)` but using the enum on that block you can change the number of inputs like if you select the `atan2(0,0)` option, i wanted to know if you can do that in an extension and if so was there a way to make is so that it doesnt just change the number of inputs but does something like every option of the enum leads to an other enum that might have an other enum after or not?

---

<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:** [January 3, 2024, 12:16am UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/125 "2024-01-03T00:16:14Z")

</div>

ah, that’s not possible to do in an extension! that block is special.

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [January 31, 2024, 5:15pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/126 "2024-01-31T17:15:39Z")

</div>

yea about the data loss.  
i forgot about this but it was because my SSD was Full

---

<div class="post-metadata">

**Author:** ![foxrii](https://avatars.discourse-cdn.com/v4/letter/f/71e660/32.png) [@foxrii](https://forum.makecode.com/u/foxrii)\
**Post date:** [February 23, 2024, 10:38pm UTC](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809/127 "2024-02-23T22:38:32Z")

</div>

> [@richard](#):
>
> o

how do you colorpick a different color when making a sprite? (ex. i want a darker shade of green)

[Previous page](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809.md?page=5)

[Next page](https://forum.makecode.com/t/help-with-pixel-art-end-math-issues/18809.md?page=7)
