# Remove cover overlay from tiles on tilemap

**URL:** <https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390>\
**Category:** Help\
**Created:** [September 9, 2020, 4:17am UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390 "2020-09-09T04:17:09Z")\
**Posts on this page:** 5\
**Page:** 1

<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 9, 2020, 4:17am UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/1 "2020-09-09T04:17:09Z")

</div>

I’m playing around with having hidden/revealed tiles on a map. I remembered that the [`pxt-tilemaps` extension](https://github.com/microsoft/pxt-tilemaps) has a feature for covering a tile with another tile’s image, which seemed super handy.

However, it looks like there’s no way to remove a cover from a tile. (Maybe I’m just missing it!) I looked at the source and noticed the cover feature creates a sprite per covered tile with a special kind ([`SpriteKind._TileSprite`](https://github.com/microsoft/pxt-tilemaps/blob/5133388e72f5069ca4d71d63c93aa916186ba14a/tilemap.ts#L35)). I tried using the array of sprites of kind (to select and destroy them), but that block didn’t include the `_TileSprite` kind…

Is there any way to destroy tile sprite covers once they’re created?

… also… after seeing the implementation that each tile is covered by a sprite, should I be concerned about the performance of games with moderately sized tilemaps where a high percentage of tiles start out covered? Should I look for an alternate approach to implementing a hidden/revealed tile mechanic?

---

<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:** [September 9, 2020, 9:51pm UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/2 "2020-09-09T21:51:35Z")

</div>

Great question! We debated whether the special TileSprite kind should be visible to the user or not, and maybe incorrectly decided it shouldn’t be visible (because it is not obvious what it means). We might want to change that to enable situations like this.

If I recall correctly cover sprites are marked as “ghost” so they don’t affect physics checks which should mean you can have lots of them without impacting performance too much.

If you reload a level it should delete all tilesprites I believe, so that might be a work around. Otherwise I you might need to pop into javascript to destroy tile sprites for now…

---

<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 9, 2020, 11:22pm UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/3 "2020-09-09T23:22:42Z")

</div>

Thanks! That’s helpful.

I thought perhaps the reload trick plus some extra tracking for which tiles were revealed could work, but then I ran into another limitation: currently `cover` is only provided for covering all tiles of type. It might be nice to also have a way to cover a specific tile at a location.

… oh. I see that block used to be provided but has been [disabled because it was too confusing](https://github.com/microsoft/pxt-tilemaps/blob/5133388e72f5069ca4d71d63c93aa916186ba14a/tilemap.ts#L27). 😢

---

<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:** [September 10, 2020, 4:22pm UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/4 "2020-09-10T16:22:23Z")

</div>

We weren’t sure it would be useful to users, but yours is a great example of where it would be useful! 🙂

I think it’d make sense to re-enable that block and also make the TileSprite kind visible to the user, so I filed some issues:

> <https://github.com/microsoft/pxt-tilemaps/issues/13>
>
> See: https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/2
> We have user feedback that being able to cover only specific tiles would be useful.

  

> <https://github.com/microsoft/pxt-tilemaps/issues/14>
>
> Currently the special TileSprite sprite kind isn't visible to the user, but we have user feedback that it would be useful...

---

<div class="post-metadata">

**Author:** ![amg-12](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/amg-12/32/23606_2.png) [@amg-12](https://forum.makecode.com/u/amg-12)\
**Post date:** [July 21, 2025, 6:44pm UTC](https://forum.makecode.com/t/remove-cover-overlay-from-tiles-on-tilemap/3390/5 "2025-07-21T18:44:29Z")

</div>

I used this to uncover all tiles:  
`tiles.setCurrentTilemap(tileUtil.cloneMap(tileUtil.currentTilemap()))`

It works fine in my project, but there should really be a better way. This is slow.
