# Bloons Tower Defense v1.6rev3

**URL:** https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212
**Category:** Show & Tell
**Tags:** game, featured-game
**Created:** [May 24, 2020, 8:50pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212 "2020-05-24T20:50:19Z")
**Posts on this page:** 18
**Page:** 1

<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: [May 24, 2020, 8:50pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/1 "2020-05-24T20:50:19Z")

</div>

**Version 1.6rev3:** Let’s give the monkeys some (more?) education by teaching them which Bloons are closest to the end!

> **[Bloons Tower Defense v1.6rev3](https://arcade.makecode.com/40546-73307-13095-17365)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

  
Yay, a tower defense game!

Press A to place a monkey for 50$. ̶P̶r̶e̶s̶s̶ ̶A̶ ̶o̶n̶ ̶a̶ ̶m̶o̶n̶k̶e̶y̶ ̶t̶o̶ ̶r̶o̶t̶a̶t̶e̶ ̶i̶t̶.̶ Hover over a monkey to display what will be upgraded. Press A on a monkey to upgrade it. Press B on a monkey to sell it for $30.

Thanks (hmmm…who made the path finding extension…just kidding) @jwunderl for those `a*` [path-finding improvements!](https://forum.makecode.com/t/tilemap-path-finding-a-beta/1846/19)

> **Issues**
>
> 1. ̶̶̶T̶̶̶h̶̶̶e̶̶̶ ̶̶̶o̶̶̶n̶̶̶l̶̶̶y̶̶̶ ̶̶̶p̶̶̶r̶̶̶o̶̶̶b̶̶̶l̶̶̶e̶̶̶m̶̶̶ ̶̶̶I̶̶̶ ̶̶̶h̶̶̶a̶̶̶v̶̶̶e̶̶̶ ̶̶̶i̶̶̶s̶̶̶ ̶̶̶t̶̶̶h̶̶̶a̶̶̶t̶̶̶ ̶̶̶w̶̶̶h̶̶̶e̶̶̶n̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶ ̶̶̶m̶̶̶o̶̶̶n̶̶̶k̶̶̶e̶̶̶y̶̶̶s̶̶̶ ̶̶̶m̶̶̶o̶̶̶v̶̶̶e̶̶̶ ̶̶̶o̶̶̶u̶̶̶t̶̶̶ ̶̶̶o̶̶̶f̶̶̶ ̶̶̶c̶̶̶a̶̶̶m̶̶̶e̶̶̶r̶̶̶a̶̶̶ ̶̶̶f̶̶̶o̶̶̶c̶̶̶u̶̶̶s̶̶̶ ̶̶̶(̶̶̶w̶̶̶h̶̶̶e̶̶̶n̶̶̶ ̶̶̶y̶̶̶o̶̶̶u̶̶̶ ̶̶̶n̶̶̶o̶̶̶ ̶̶̶l̶̶̶o̶̶̶n̶̶̶g̶̶̶e̶̶̶r̶̶̶ ̶̶̶s̶̶̶e̶̶̶e̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶m̶̶̶)̶̶̶,̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶y̶̶̶ ̶̶̶s̶̶̶t̶̶̶o̶̶̶p̶̶̶ ̶̶̶s̶̶̶h̶̶̶o̶̶̶o̶̶̶t̶̶̶i̶̶̶n̶̶̶g̶̶̶ ̶̶̶d̶̶̶a̶̶̶r̶̶̶t̶̶̶s̶̶̶.̶̶̶ ̶̶̶I̶̶̶ ̶̶̶t̶̶̶h̶̶̶i̶̶̶n̶̶̶k̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶ ̶̶̶m̶̶̶o̶̶̶n̶̶̶k̶̶̶e̶̶̶y̶̶̶s̶̶̶ ̶̶̶a̶̶̶c̶̶̶t̶̶̶u̶̶̶a̶̶̶l̶̶̶l̶̶̶y̶̶̶ ̶̶̶d̶̶̶o̶̶̶ ̶̶̶s̶̶̶h̶̶̶o̶̶̶o̶̶̶t̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶ ̶̶̶d̶̶̶a̶̶̶r̶̶̶t̶̶̶s̶̶̶ ̶̶̶b̶̶̶u̶̶̶t̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶y̶̶̶ ̶̶̶a̶̶̶r̶̶̶e̶̶̶ ̶̶̶i̶̶̶m̶̶̶m̶̶̶e̶̶̶d̶̶̶i̶̶̶a̶̶̶t̶̶̶e̶̶̶l̶̶̶y̶̶̶ ̶̶̶d̶̶̶e̶̶̶s̶̶̶t̶̶̶r̶̶̶o̶̶̶y̶̶̶e̶̶̶d̶̶̶ ̶̶̶b̶̶̶e̶̶̶c̶̶̶a̶̶̶u̶̶̶s̶̶̶e̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶y̶̶̶ ̶̶̶a̶̶̶r̶̶̶e̶̶̶ ̶̶̶n̶̶̶o̶̶̶t̶̶̶ ̶̶̶i̶̶̶n̶̶̶ ̶̶̶t̶̶̶h̶̶̶e̶̶̶ ̶̶̶c̶̶̶a̶̶̶m̶̶̶e̶̶̶r̶̶̶a̶̶̶.̶̶̶ ̶̶̶W̶̶̶o̶̶̶u̶̶̶l̶̶̶d̶̶̶ ̶̶̶t̶̶̶u̶̶̶r̶̶̶n̶̶̶i̶̶̶n̶̶̶g̶̶̶ ̶̶̶o̶̶̶f̶̶̶f̶̶̶ ̶̶̶a̶̶̶u̶̶̶t̶̶̶o̶̶̶ ̶̶̶d̶̶̶e̶̶̶s̶̶̶t̶̶̶r̶̶̶o̶̶̶y̶̶̶ ̶̶̶w̶̶̶o̶̶̶r̶̶̶k̶̶̶?̶̶̶  
> ̶I̶t̶ ̶d̶o̶e̶s̶n̶’̶t̶ ̶s̶e̶e̶m̶ ̶t̶o̶ ̶h̶a̶p̶p̶e̶n̶ ̶a̶n̶y̶m̶o̶r̶e̶.̶  
> Thanks @jwunderl for clearing that up!

Github repository:

> **[UnsignedArduino/Bloons-Tower-Defense](https://github.com/unsignedarduino/bloons-tower-defense)**
>
> The famous Bloons Tower Defense from Ninja Kiwi, now on MakeCode Arcade! - UnsignedArduino/Bloons-Tower-Defense

The real challenge is trying to figure out how to not crash your device 😉

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/system/32/2_2.png) [@system](https://forum.makecode.com/u/system)
#### Post date: [May 27, 2020, 12:45am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/2 "2020-05-27T00:45:00Z")

</div>



---

<div class="post-metadata">

### Author: ![shakao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shakao/32/113_2.png) [@shakao](https://forum.makecode.com/u/shakao)
#### Post date: [May 27, 2020, 12:57am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/3 "2020-05-27T00:57:35Z")

</div>

wow, awesome! i love how you solved the problem of setting the bloon paths. it would be cool to see a version with different path layouts as you progress too 😃

---

<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: [May 27, 2020, 1:12am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/4 "2020-05-27T01:12:49Z")

</div>

Thanks. 🙂

The real game does have different paths you can choose, and I was thinking we could just allow you to select a tilemap and use the a\* pathfinding extension (I can’t remember who made it, this quarantine stuff is killing me) so the Bloons can find a way.

Also, I’m kind of confused by this message. Does the system consider me spamming or something like that?

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

---

<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: [May 27, 2020, 1:26am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/5 "2020-05-27T01:26:13Z")

</div>

I made that one 🙂 Daryl’s been doing some updates to it as well (i think he had a game he was planning on using it in?), its

> **[jwunderl/arcade-tilemap-a-star](https://github.com/jwunderl/arcade-tilemap-a-star)**
>
> a star implementation for tilemaps in pxt-arcade ---beta - jwunderl/arcade-tilemap-a-star

Also, the reason the arrows were disappearing is because they were projectiles - those start with the AutoDestroy flag set to on, so if you don’t want that you need to turn it off.

---

<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: [May 27, 2020, 1:32am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/6 "2020-05-27T01:32:09Z")

</div>

> [@jwunderl](#):
>
> Also, the reason the arrows were disappearing is because they were projectiles - those start with the AutoDestroy flag set to on, so if you don’t want that you need to turn it off.

That’s what I thought 🙂  
But in version 1.4, it doesn’t seem to be happening to me. 😕

---

<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: [May 27, 2020, 1:37am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/7 "2020-05-27T01:37:19Z")

</div>

Yes, it looks like you changed the darts to just be regular sprites in 1.4 instead of using the `create projectile from` block - normal sprites have autodestroy off by default ~

---

<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: [May 27, 2020, 1:38am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/8 "2020-05-27T01:38:45Z")

</div>

Oh yes, I remember doing that!

But now I’m confused on how the darts are still popping the Bloons.

Better go look back again…

---

<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: [May 27, 2020, 1:39am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/9 "2020-05-27T01:39:58Z")

</div>

You can make regular sprites of kind Projectile - sprites created with the projectile blocks are just projectiles by default.

---

<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: [May 27, 2020, 1:41am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/10 "2020-05-27T01:41:27Z")

</div>

Just looked back, saw that it’s a regular sprite of kind projectile.

Well, probably should go edit my post _again…_

---

<div class="post-metadata">

### Author: ![darzu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/darzu/32/1882_2.png) [@darzu](https://forum.makecode.com/u/darzu)
#### Post date: [May 27, 2020, 3:53pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/11 "2020-05-27T15:53:58Z")

</div>

This is awesome! Very charming theme. I love how you announce waves. One thing I noticed is that I think you can use the “screen relative” flag to keep the narrator in the screen instead of setting it based on camera position:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e2f418f564e8a315ccbaa0b75328e54803bc8900.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: [May 28, 2020, 4:06pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/12 "2020-05-28T16:06:54Z")

</div>

But it doesn’t seem to work for me. I think you mentioned it in the stream where you made a customizable not racing 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: [May 28, 2020, 4:08pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/13 "2020-05-28T16:08:42Z")

</div>

And is there a way to set the `Z` flag of the text, because the monkeys seemed to be layered over it. I tried setting the monkey’s `Z` to like, 10 but that made it worse, so half of the monkeys still get layered over the text.

---

<div class="post-metadata">

### Author: ![darzu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/darzu/32/1882_2.png) [@darzu](https://forum.makecode.com/u/darzu)
#### Post date: [May 28, 2020, 4:41pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/14 "2020-05-28T16:41:16Z")

</div>

You’re right, my bad, there’s a bug with relative-to-camera not working for sprite say.

I’ve been working on an extension to make it easier to add text as sprites to games: [https://github.com/darzu/arcade-text](https://github.com/darzu/arcade-text)  
This would definitely let you set z index and use camera-relative, and also change the font size.

Example: [https://makecode.com/\_bFXY1U7ALMfK](https://makecode.com/_bFXY1U7ALMfK)

It’s still changing quite a bit as I work out the design we want, but it might be useful already.

---

<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: [May 28, 2020, 7:12pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/15 "2020-05-28T19:12:17Z")

</div>

That bug is fixed on beta!

---

<div class="post-metadata">

### Author: ![felixtsu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/felixtsu/32/12024_2.png) [@felixtsu](https://forum.makecode.com/u/felixtsu)
#### Post date: [May 29, 2020, 8:36am UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/16 "2020-05-29T08:36:34Z")

</div>

Coooooooooool prototype, well-written code with great readability.

Managed to introduce enemy hit points feature in a few minutes. I can see great potential for educational purpose.

Thank you for sharing!

> **[Bloons Tower Defense v1.4](https://arcade.makecode.com/87007-73218-27434-63101)**
>
> 用❤️创造，Microsoft MakeCode Arcade出品。

---

<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: [May 29, 2020, 2:58pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/17 "2020-05-29T14:58:27Z")

</div>

Thanks 🙂

I always try to strive for readability, and I have been thinking about adding upgrades for the monkeys and more Bloon colors other than red.

I’ll welcome suggestions!

---

<div class="post-metadata">

### Author: ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)
#### Post date: [February 6, 2021, 9:21pm UTC](https://forum.makecode.com/t/bloons-tower-defense-v1-6rev3/2212/18 "2021-02-06T21:21:20Z")

</div>

![SmartSelect_20210206-103404_Samsung Internet](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1900737d9a434bd83b02a3504bfdfb8221bffdd7.jpeg)  
Maybe less abllons cause look at the fps…
