# Pizzas, Pirates & Ninjas

**URL:** <https://forum.makecode.com/t/pizzas-pirates-ninjas/327>\
**Category:** Arcade\
**Tags:** game\
**Created:** [July 10, 2019, 7:40pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327 "2019-07-10T19:40:33Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [July 10, 2019, 7:40pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/1 "2019-07-10T19:40:33Z")

</div>

A Little game I made about some of my favourite things…  
 ![arcade-Pizza-Pirates-Ninjas%20(7)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/58c2cfb00efb897835c6878a88ec91a2aadf21ad.png)

> **[Pizza, Pirates & Ninjas](https://arcade.makecode.com/77557-31833-68492-25460)**
>
> Made with ❤️ in MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [July 10, 2019, 7:59pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/2 "2019-07-10T19:59:46Z")

</div>

I love this one! It’s deceptively challenging. That speedy ninja got me every time! Nice work, @teachcreamer. Welcome to the community!

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [July 10, 2019, 8:16pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/3 "2019-07-10T20:16:53Z")

</div>

Thanks Alex! Maybe you can help, i want to make the ninjas fly from different corners of the screen. How would I go about doing this?

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [July 11, 2019, 9:12pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/4 "2019-07-11T21:12:22Z")

</div>

Sure! From the docs:

“The sprite starts at the screen coordinate of (0, 0) unless you tell it to come from another sprite.”

I would pick a random number, then, from 1 to 4 to represent one of the four corners of the screen. Set the coordinates of the projectile based on the random number that is chosen.

You may need to restructure your logic a bit. Try something like this:

![temp](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/5502154f3b06904ce180fa5026ad6e7458aa9f5e.png)

I only filled in two of the corners. You’ll need to adjust the `x`, `y`, `vx`, and `vy` when adding the other two corners.

@devs: Is there a way to have Markdown render blocks dynamically here in the forums?

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [July 11, 2019, 9:56pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/5 "2019-07-11T21:56:21Z")

</div>

You can do the embed from the share view, not sure how well it will work on here though (and I just noticed the just code version seems to now be broken too… will look into that)

 ![58](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e26d3362eca3a53b0985036caab159f33685f629.gif)

https://arcade.makecode.com/#pub:_Jui57VA2rJ6M

Right click -\> `snapshot` in the workspace will generate a png of the blocks with a clear background for you though

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [July 11, 2019, 9:59pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/6 "2019-07-11T21:59:40Z")

</div>

Been meaning to ask you this, too, Joey: What do you use to create those animated GIFs? Pictures are worth 1,000 words … moving pictures are worth so much more!

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [July 11, 2019, 10:15pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/7 "2019-07-11T22:15:08Z")

</div>

I use [gifox](https://gifox.io/) on my mac, as it was the easiest to use one I could find when I started needing to make gifs to respond to students on my class forum, but [screentogif](https://www.screentogif.com/) is what I’ve heard is good for windows. If I need to edit a gif (compress, shorten, etc) I just use [ezgif.com](http://ezgif.com), as it does a good job at most things and the compression algorithm (gifsicle) it implements is real nice / one I used on the command line before I found the site.

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [July 13, 2019, 4:55am UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/8 "2019-07-13T04:55:42Z")

</div>

Alex, this is awesome. Thank you for tightening up my code. Here is the version 2:  
[https://makecode.com/\_K1pL6h8HELuw](https://makecode.com/_K1pL6h8HELuw)

My next challenge is to add boundaries to stop the pirate going of screen.

---

<div class="post-metadata">

**Author:** ![jwunderl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jwunderl/32/5308_2.png) [@jwunderl](https://forum.makecode.com/u/jwunderl)\
**Post date:** [July 13, 2019, 6:04am UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/9 "2019-07-13T06:04:58Z")

</div>

Nice! Just so you know, this block will keep the pirate inside the screen if you set it to refer to the pirate and turn it `on`:

 ![Screenshot_20190712-230326_Chrome](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/3a2989ad0a73e8470c5bf4866e88cb58f3273f24.jpeg)

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [July 13, 2019, 7:59am UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/10 "2019-07-13T07:59:43Z")

</div>

Oh that’s easy! I spent an hour last night creating a tile map to keep the pirate in with no success!

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [July 16, 2019, 7:25pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/11 "2019-07-16T19:25:17Z")

</div>

Thanks for your help everyone! Here is is version 3!

> **[Pizza, Pirates & Ninjas](https://arcade.makecode.com/24542-47109-38170-28895)**
>
> Made with ❤️ in MakeCode Arcade.

I made it 10 levels with increasing difficulty and made a new ninja.

---

<div class="post-metadata">

**Author:** ![croc](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@croc](https://forum.makecode.com/u/croc)\
**Post date:** [July 23, 2019, 5:09pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/12 "2019-07-23T17:09:43Z")

</div>

nice topic to discuss and im learning to create a program by the end of this year hopefully ill be working for something like this …

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [October 9, 2019, 4:33am UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/13 "2019-10-09T04:33:38Z")

</div>

@teachcreamer make sure to update the first post with the latest version. this is what the makecode editor picks up in the home screen.

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [October 9, 2019, 5:50pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/14 "2019-10-09T17:50:17Z")

</div>

![pizza](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/1836b1156d46c67353b0a6b8642e1f45a110bf54.png)

New Version!

> **[Pizza, Pirates & Ninjas](https://arcade.makecode.com/94025-94760-03281-62764)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [October 9, 2019, 6:04pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/15 "2019-10-09T18:04:11Z")

</div>

Don’t hesitate to update your top comment. It’s the one we pick when we showcase the game in the editor.

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [October 9, 2019, 6:27pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/16 "2019-10-09T18:27:43Z")

</div>

There is no ‘pencil’ option available for me to press to edit the post… Is there something i’m missing?

---

<div class="post-metadata">

**Author:** ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)\
**Post date:** [October 9, 2019, 6:43pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/17 "2019-10-09T18:43:13Z")

</div>

After clicking the …, do you see the pencil? ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/41231c6b47a0487b486fb12202bc12ddb3337b5f.png)

---

<div class="post-metadata">

**Author:** ![teachcreamer](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@teachcreamer](https://forum.makecode.com/u/teachcreamer)\
**Post date:** [October 9, 2019, 6:44pm UTC](https://forum.makecode.com/t/pizzas-pirates-ninjas/327/18 "2019-10-09T18:44:49Z")

</div>

No, I don’t…strange. I can in my other recent posts this evening.

 ![Capture](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/bd2f26043885a0310205b8ae1867117d8d97885e.png)
