# Arcade and Documentation - template starting blocks showing errors

**URL:** <https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214>\
**Category:** Arcade\
**Created:** [February 14, 2020, 11:11am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214 "2020-02-14T11:11:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 14, 2020, 11:11am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/1 "2020-02-14T11:11:55Z")

</div>

Hi there,  
I’m working on Arcade docs to support a Family Game making programme I’m running.

I may be stretching the limits of the system, but I’m looking to start my docs from a relatively full project that works, and then for users to tweak aspects of the project. A learning my remixing approach.

I’m getting errors when trying to make the following project code available as a starting template, using the template macro.

> **[GGT: Duck Run with Levels](https://arcade.makecode.com/18265-91441-17406-69275)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here is my result with errors showing in the starting code.

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/#tutorial:https://makecode.com/_fFDbDuTTJYMf)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

Can anyone see the problem here? Thanks in advance for your help.  
Many

---

<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:** [February 14, 2020, 6:39pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/2 "2020-02-14T18:39:44Z")

</div>

You are using the old tilemap APIs so you need to add the `color-coded-tilemap` package. Add this at the bottom of the file:

````auto
```package
color-coded-tilemap
```

````

If you want to add other packages, you can add them on new lines like this:

````auto
```package
color-coded-tilemap
animation
```

````

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 15, 2020, 2:47am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/3 "2020-02-15T02:47:20Z")

</div>

ok  
super helpful.  
i’m on this.  
it does make me think if this is a bit deprecated, should I rethink.

Thanks  
Mick

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 17, 2020, 1:05pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/4 "2020-02-17T13:05:04Z")

</div>

Hi there,  
I’m tacking on to here as it seems related.Let me know if I should repost.

My from scratch tutorial is progressing well - the process is flowing but some tricky bits about getting blocks to display in tooltips correctly, which I understand from seeing a MakeCode tutorial demo at Microbit Live is the preferred way of doing things.

Here’s the latest.

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/#tutorial:41388-44098-80122-35806)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

Blocks in the latest step 14 - the blocks aren’t showing.  
I haven’t added any packages but can’t quite get a combination that shows my desired loop.

Here’s a project with the blocks needed [https://arcade.makecode.com/31308-11867-77961-95200](https://arcade.makecode.com/31308-11867-77961-95200)

Here’s what I’m trying

````
```blocks
for (let value of tiles.getTilesByType(myTiles.tile1)) {
    strawberry = sprites.create(img`
        . . . . . . . 6 . . . . . . . .
        . . . . . . 8 6 6 . . . 6 8 . .
        . . . e e e 8 8 6 6 . 6 7 8 . .
        . . e 2 2 2 2 e 8 6 6 7 6 . . .
        . e 2 2 4 4 2 7 7 7 7 7 8 6 . .
        . e 2 4 4 2 6 7 7 7 6 7 6 8 8 .
        e 2 4 5 2 2 6 7 7 6 2 7 7 6 . .
        e 2 4 4 2 2 6 7 6 2 2 6 7 7 6 .
        e 2 4 2 2 2 6 6 2 2 2 e 7 7 6 .
        e 2 4 2 2 4 2 2 2 4 2 2 e 7 6 .
        e 2 4 2 2 2 2 2 2 2 2 2 e c 6 .
        e 2 2 2 2 2 2 2 4 e 2 e e c . .
        e e 2 e 2 2 4 2 2 e e e c . . .
        e e e e 2 e 2 2 e e e c . . . .
        e e e 2 e e c e c c c . . . . .
        . c c c c c c c . . . . . . . .
    `, SpriteKind.Food)
    tiles.placeOnTile(strawberry, value)
    tiles.setTileAt(value, myTiles.tile0)
}
```

````

Here’s what I’d like to show.  
 ![Screenshot_2020-02-17 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/623b7c63e791efcfd8c16e8025eb076950851971.png)

**On a related note**

How would you display only one block so that it excludes the wrapping on start function? Or is using an image preferred in this case?

For example

````
```blocks
scene.setBackgroundColor(9)
```
````

---

<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:** [February 17, 2020, 4:24pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/5 "2020-02-17T16:24:50Z")

</div>

The ```block macro (no s) shows just just the blocks you put in it (no on start) in the docs view, but I can’t say I’ve ever it in a tutorial - it currently might not filter the tutorial or render incorrectly, the feature hasn’t been used much lately.

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 17, 2020, 4:51pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/6 "2020-02-17T16:51:57Z")

</div>

It looks like block doesn’t render unfortunately.

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

I’ll use an image or just try to describe little ones like this well in text and colour coded macros.

Any ideas on the other scenario?

---

<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:** [February 18, 2020, 7:39am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/7 "2020-02-18T07:39:59Z")

</div>

This is something we should fix.

---

<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:** [February 18, 2020, 7:40am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/8 "2020-02-18T07:40:37Z")

</div>

block is supported in docs but not in app yet

---

<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:** [February 18, 2020, 9:21pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/9 "2020-02-18T21:21:02Z")

</div>

Oh, I missed the other question, sorry! Looks like it’s missing the tiles namespace, which stores information about the tilemap – in particular, the custom tiles you drew.

in this case, it looks like we should be able to trim the set tile and still have the block show up exactly as you wanted:

````auto
```blocks
namespace myTiles {
    //% blockIdentity=images._tile
    export const tile0 = img`
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
        . . . . . . . . . . . . . . . .
    `
    //% blockIdentity=images._tile
    export const tile1 = img`
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
        5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
    `
}
let strawberry: Sprite = null
for (let value of tiles.getTilesByType(myTiles.tile1)) {
    strawberry = sprites.create(img`
        . . . . . . . 6 . . . . . . . .
        . . . . . . 8 6 6 . . . 6 8 . .
        . . . e e e 8 8 6 6 . 6 7 8 . .
        . . e 2 2 2 2 e 8 6 6 7 6 . . .
        . e 2 2 4 4 2 7 7 7 7 7 8 6 . .
        . e 2 4 4 2 6 7 7 7 6 7 6 8 8 .
        e 2 4 5 2 2 6 7 7 6 2 7 7 6 . .
        e 2 4 4 2 2 6 7 6 2 2 6 7 7 6 .
        e 2 4 2 2 2 6 6 2 2 2 e 7 7 6 .
        e 2 4 2 2 4 2 2 2 4 2 2 e 7 6 .
        e 2 4 2 2 2 2 2 2 2 2 2 e c 6 .
        e 2 2 2 2 2 2 2 4 e 2 e e c . .
        e e 2 e 2 2 4 2 2 e e e c . . .
        e e e e 2 e 2 2 e e e c . . . .
        e e e 2 e e c e c c c . . . . .
        . c c c c c c c . . . . . . . .
    `, SpriteKind.Food)
    tiles.placeOnTile(strawberry, value)
    tiles.setTileAt(value, myTiles.tile0)
}
```

````

looks like

 ![Screen Shot 2020-02-18 at 1.18.38 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/8f55c288d5cc895f3bed731439708b117698c60f.png)

and as mentioned above, once the fix is released for ```block, could look like this if you wanted

 ![Screen Shot 2020-02-18 at 1.20.06 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/e9a9b8a05ecf06220544d0cd0387b222e885cb93.png)

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 19, 2020, 7:57am UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/10 "2020-02-19T07:57:10Z")

</div>

Many thanks for these replies.  
That makes sense now and I should be able to put this into action.

The platformer tutorial is really coming along now (still a few things to tweak).

I’ve got a part one here. [https://arcade.makecode.com/#tutorial:37423-53392-83832-08292](https://arcade.makecode.com/#tutorial:37423-53392-83832-08292)

and part two here

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/#tutorial:19236-01876-82696-93163)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

These are still not ready for review yet. But let me know the best way to share them for community review. Would it be as links like the above or as a github repo? and if the second what kind of format - just the md and image files?

Thanks  
Mick

---

<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:** [February 19, 2020, 3:28pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/11 "2020-02-19T15:28:34Z")

</div>

Best to use GitHub so that you can update your tutorial. You can do [https://arcade.makecode.com/beta#tutorial:GITHUN\_URL](https://arcade.makecode.com/beta#tutorial:GITHUN_URL) to send people into it.

---

<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:** [February 19, 2020, 3:28pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/12 "2020-02-19T15:28:55Z")

</div>

“block” fix coming up

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [February 25, 2020, 12:37pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/13 "2020-02-25T12:37:26Z")

</div>

Hi there,  
I’ve struggled a bit more than I thought I would with this, would it be possible for someone to check that these load ok before I repost for community feedback - thanks. 🙂

Part One - Simple Platformer Tutorial (with new tilemap)

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/beta#tutorial:https://github.com/mickfuzz/makecode-platformer-101)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

Part Two - Simple Platformer Tutorial (with new tilemap)

> **[Microsoft MakeCode Arcade](https://arcade.makecode.com/beta#tutorial:https://github.com/mickfuzz/makecode-platformer-102)**
>
> Develop your programming skills by quickly creating and modding retro arcade games with Blocks and JavaScript in the MakeCode editor

---

<div class="post-metadata">

**Author:** ![mickfuzz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mickfuzz/32/419_2.png) [@mickfuzz](https://forum.makecode.com/u/mickfuzz)\
**Post date:** [March 9, 2020, 1:02pm UTC](https://forum.makecode.com/t/arcade-and-documentation-template-starting-blocks-showing-errors/1214/14 "2020-03-09T13:02:48Z")

</div>

Thanks for the help so far.

I’ve still been struggling but managed to get the links above working for review.

I’ve started a new thread requesting review and bringing up a couple more questions on docs here  
[https://forum.makecode.com/t/review-requested-on-a-platformer-tutorial-and-start-of-set-of-course-resourse/1355](https://forum.makecode.com/t/review-requested-on-a-platformer-tutorial-and-start-of-set-of-course-resourse/1355)
