# Arcade Advanced Stream #104 - Zoom Zoom

**URL:** <https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394>\
**Category:** Live\
**Created:** [September 9, 2020, 4:24pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394 "2020-09-09T16:24:53Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 9, 2020, 4:24pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/1 "2020-09-09T16:24:53Z")

</div>

Join @hassan and me as we make a city tilemap with the 8x8 tileset! Here’s the Javascript you need to copy and paste into a new “custom.ts” file to make a new 8x8 tilemap block:

namespace custom {  
//% blockId=tilemap\_editor\_eight block=“set tilemap (8) to $tilemap”  
//% weight=200 blockGap=8  
//% tilemap.fieldEditor=“tilemap”  
//% tilemap.fieldOptions.decompileArgumentAsString=“true”  
//% tilemap.fieldOptions.filter=“tile”  
//% tilemap.fieldOptions.tileWidth=8  
//% tilemap.fieldOptions.taggedTemplate=“tilemap”  
//% blockNamespace=“scene” group=“Tiles” duplicateShadowOnDrag  
//% help=tiles/set-tile-map  
export function setTilemap(tilemap: tiles.TileMapData) {  
scene.setTileMapLevel(tilemap);  
}  
}

Watch the full stream here. Sorry the audio is echo-y 😭. Hassan is fine, if you want to listen to his cooking journey!: [https://youtu.be/RSDBnChJCnw](https://youtu.be/RSDBnChJCnw)

Check out the code below:

> **[stream #103 - zoom zoom](https://arcade.makecode.com/08770-87722-92582-73510)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The MakeCode Arcade Advanced stream happens weekdays at 1:00 PM PST on [twitch.tv/msmakecode](http://twitch.tv/msmakecode)

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [September 9, 2020, 8:10pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/2 "2020-09-09T20:10:16Z")

</div>

> [@livcheerful](#):
>
> namespace custom {  
> //% blockId=tilemap\_editor\_eight block=“set tilemap (8) to $tilemap”  
> //% weight=200 blockGap=8  
> //% tilemap.fieldEditor=“tilemap”  
> //% tilemap.fieldOptions.decompileArgumentAsString=“true”  
> //% tilemap.fieldOptions.filter=“tile”  
> //% tilemap.fieldOptions.tileWidth=8  
> //% tilemap.fieldOptions.taggedTemplate=“tilemap”  
> //% blockNamespace=“scene” group=“Tiles” duplicateShadowOnDrag  
> //% help=tiles/set-tile-map  
> export function setTilemap(tilemap: tiles.TileMapData) {  
> scene.setTileMapLevel(tilemap);  
> }  
> }

Is there a way to make it 32 by 32?

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 9, 2020, 9:21pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/3 "2020-09-09T21:21:57Z")

</div>

> [@livcheerful](#):
>
> namespace custom {  
> //% blockId=tilemap\_editor\_eight block=“set tilemap (8) to $tilemap”  
> //% weight=200 blockGap=8  
> //% tilemap.fieldEditor=“tilemap”  
> //% tilemap.fieldOptions.decompileArgumentAsString=“true”  
> //% tilemap.fieldOptions.filter=“tile”  
> //% tilemap.fieldOptions.tileWidth=8  
> //% tilemap.fieldOptions.taggedTemplate=“tilemap”  
> //% blockNamespace=“scene” group=“Tiles” duplicateShadowOnDrag  
> //% help=tiles/set-tile-map  
> export function setTilemap(tilemap: tiles.TileMapData) {  
> scene.setTileMapLevel(tilemap);  
> }  
> }

yes there is! You can use that same bit of Javascript, but for the `.tileWidth` setting, change it from `8` to `32`. And for clarity, you can rename the block to be `blockId=tilemap_editor_thirtytwo` and then `block="set tilemap (32) to $tilemap"`

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [September 10, 2020, 12:54am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/4 "2020-09-10T00:54:55Z")

</div>

Finnnnnnnnnnnnnnnnnaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaallllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy!!!

I always wanted to do that.

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [September 10, 2020, 9:06am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/5 "2020-09-10T09:06:39Z")

</div>

I have always been wondering, how do you make screen icons?

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 10, 2020, 4:11pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/6 "2020-09-10T16:11:57Z")

</div>

ooo what do you mean by screen icon?

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [September 10, 2020, 11:29pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/7 "2020-09-10T23:29:04Z")

</div>

There is a screen icon in that game at the bottom of the left hand side

---

<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:** [September 11, 2020, 4:10am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/8 "2020-09-11T04:10:27Z")

</div>

I think @LcAtonal means that speed display you made

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [September 11, 2020, 8:11am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/10 "2020-09-11T08:11:12Z")

</div>

Yeah…

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 11, 2020, 3:56pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/11 "2020-09-11T15:56:08Z")

</div>

OOOOOO yeah so that’s actually just a sprite! I used the “relative to camera” flag to stick it to the bottom of the screen

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

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [September 12, 2020, 4:44am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/12 "2020-09-12T04:44:03Z")

</div>

Something like this?[https://makecode.com/\_6UsRyodE5i3T](https://makecode.com/_6UsRyodE5i3T)

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [September 12, 2020, 10:49pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/13 "2020-09-12T22:49:47Z")

</div>

yeah!!! that looks awesome 😃

---

<div class="post-metadata">

**Author:** ![jacob\_c](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jacob_c/32/1532_2.png) [@jacob\_c](https://forum.makecode.com/u/jacob_c)\
**Post date:** [September 16, 2020, 7:34pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/14 "2020-09-16T19:34:49Z")

</div>

Do tilemap tile sizes have to be powers of two (8, 16, 32…)? I think I saw some old posts from @jwunderl ([like this one](https://forum.makecode.com/t/bug-cant-make-tilemaps-that-would-use-8x8-tiles/222/2)) that mentioned there are some optimizations that don’t support arbitrary sizes…

---

<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:** [September 16, 2020, 7:47pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/15 "2020-09-16T19:47:29Z")

</div>

It’s pegged to powers of two, lots of bit shifting in the implementation for performance on hardware

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [October 11, 2020, 8:37pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/16 "2020-10-11T20:37:45Z")

</div>

Wait… So does this let you make smaller 8x8 walls?

---

<div class="post-metadata">

**Author:** ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)\
**Post date:** [October 12, 2020, 4:42pm UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/17 "2020-10-12T16:42:51Z")

</div>

yupyup!

---

<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 13, 2021, 5:40am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/18 "2021-02-13T05:40:42Z")

</div>

What about 2\*2?

---

<div class="post-metadata">

**Author:** ![omnisImperium](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/omnisimperium/32/2728_2.png) [@omnisImperium](https://forum.makecode.com/u/omnisImperium)\
**Post date:** [February 14, 2021, 2:49am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/19 "2021-02-14T02:49:56Z")

</div>

I might be wrong, but technically speaking, isn’t every number a power of two? For example, 2^1.5849625 = 3. Again, I might be wrong.

---

<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 14, 2021, 3:09am UTC](https://forum.makecode.com/t/arcade-advanced-stream-104-zoom-zoom/3394/20 "2021-02-14T03:09:13Z")

</div>

@Agent_14 right, 2 \* 2 = 2 ^ 2 so it would be possible to make a tilemap of 4x4 tiles, though it’s untested / likely slow on hardware (I would suspect it to would work fine in most cases / you shouldn’t run into any weird wall handling cases. 2^1 might work just fine as well, but that would be bit iffy with wall hitting / bumping as there are some cases we try to handle clipping with 1 or 2 pixel adjustments).

@omnisImperium `powers of {n}` is typically defined to be the set of results of all expressions `n^i` where `i` is an integer and `i >= 0` - you’re right that you can always put another expression / non integer as the exponent, but you wouldn’t typically call the result a power of the base unless it were a nonnegative integer.

In this case that is true as well, as the technical reason for it is that we use bit shifting for faster calculations for hardware, which is only defined for integers / anything after the decimal will get truncated during the operations so you wouldn’t be able to meaningfully use a scale of 2.5 / it would probably behave exactly the same as a scale of 2, with potentially a few bugs due if there are some expressions that don’t implicitly change it to be an int.
