# Drawing lines

**URL:** <https://forum.makecode.com/t/drawing-lines/3813>\
**Category:** Arcade\
**Created:** [October 8, 2020, 6:13pm UTC](https://forum.makecode.com/t/drawing-lines/3813 "2020-10-08T18:13:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [October 8, 2020, 6:13pm UTC](https://forum.makecode.com/t/drawing-lines/3813/1 "2020-10-08T18:13:54Z")

</div>

can somebody help me?

 ![2020-10-08](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/4b5767e16ecb050e520cae70fac9e80254f0edec.png)

---

<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 8, 2020, 6:46pm UTC](https://forum.makecode.com/t/drawing-lines/3813/2 "2020-10-08T18:46:49Z")

</div>

Well, first you will need to define `picture`. You can’t just draw it on nothing.

Sharing your code will help, unless that’s the only line of code in it.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [October 8, 2020, 6:50pm UTC](https://forum.makecode.com/t/drawing-lines/3813/3 "2020-10-08T18:50:25Z")

</div>

yea that is… but how do i define `picture`?

---

<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 8, 2020, 6:55pm UTC](https://forum.makecode.com/t/drawing-lines/3813/4 "2020-10-08T18:55:53Z")

</div>

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

The second method will fill it with blank pixels (color 0)

You can also do this:

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

You can also do this too, but it will take up about `10KB` of memory if I remember correctly since it has to bring the whole picture into memory. (Actually `9600` bytes, if each pixel is half a byte)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a4fae1ef146841f2ed82ec68afe5a09c2e241ce5.png)

EDIT: Actually, modifying any image programically will be loaded in memory. Keep that in mind if you want to run games on hardware.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [October 8, 2020, 7:12pm UTC](https://forum.makecode.com/t/drawing-lines/3813/7 "2020-10-08T19:12:42Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [October 8, 2020, 7:34pm UTC](https://forum.makecode.com/t/drawing-lines/3813/8 "2020-10-08T19:34:27Z")

</div>

oh, and is there a way to stop code but not reset game?

---

<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 8, 2020, 7:40pm UTC](https://forum.makecode.com/t/drawing-lines/3813/9 "2020-10-08T19:40:03Z")

</div>

What do you mean? If you want the entire game to freeze, just `pause` inside an `on game update`.

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [October 8, 2020, 7:45pm UTC](https://forum.makecode.com/t/drawing-lines/3813/10 "2020-10-08T19:45:29Z")

</div>

thanks!

---

<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 8, 2020, 7:46pm UTC](https://forum.makecode.com/t/drawing-lines/3813/11 "2020-10-08T19:46:45Z")

</div>

Beware, this will freeze _everything._ Even the pause menu button.
