# 3D Idea - Tilemap Layering

**URL:** <https://forum.makecode.com/t/3d-idea-tilemap-layering/19292>\
**Category:** Arcade\
**Tags:** game, graphics-and-math, extension\
**Created:** [April 19, 2023, 9:56pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292 "2023-04-19T21:56:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![CodeoSchool](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@CodeoSchool](https://forum.makecode.com/u/CodeoSchool)\
**Post date:** [April 19, 2023, 9:56pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/1 "2023-04-19T21:56:58Z")

</div>

So, I’m wondering, would it be possible to layer tilemaps on top of eachother in the raycast 3d engine to create a pseudo 3d? I created a demonstration image to show what I mean (blue circle represents player spawn.

 ![demonstration](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/faa2c522d1772e6dfd2d843e449eeffc028dde22.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:** [April 19, 2023, 11:20pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/2 "2023-04-19T23:20:58Z")

</div>

Is it possible? Yes.

Will you have good performance? Most likely not. @AqeeAqee, the creator of the wonderful ray casting extension, already said that rendering a floor and ceiling is a big performance hit already.

> [@Raycasting 3D render -- Blocks Edition](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/63):
>
> @jwunderl @CarltonFade @Kiwiphoenix364 Hi guys! as to the multi-level and floor/ceiling: Thanks for your valuable suggestions! These will be adopt when I coding them. I did some test, the FPS will down to about 8 on device/console with just drawing walls twice. So this extension is not fast enough to do these features right now, I think. We can’t add these until perf has a significant impovement some day. But, I know, these are all attractive features, I love them too. I will do my best to …

---

<div class="post-metadata">

**Author:** ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)\
**Post date:** [April 20, 2023, 2:04am UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/3 "2023-04-20T02:04:04Z")

</div>

Wait it is **RAYCASTING** I bet it could have better performance if it was **RAYTRACING**.

---

<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:** [April 20, 2023, 9:27pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/4 "2023-04-20T21:27:12Z")

</div>

Ray casting and ray tracing are completely different things.

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [April 20, 2023, 10:01pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/5 "2023-04-20T22:01:30Z")

</div>

Excuse me, sir. What’s raytracing? 😇

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [April 24, 2023, 1:47pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/6 "2023-04-24T13:47:29Z")

</div>

Tracing rays, duhh… JK, it’s a method used to retrieve data from rays that are emitted from the player. While the same is done in raycasting, raytracing attempts to simulate realistic lighting effects. Raytracing is super heavy though, and even the best computers struggle with it sometimes so for MakeCode it’s completely out of bounds. You can learn more about it here:

> **[Ray tracing (graphics)](https://en.wikipedia.org/wiki/Ray_tracing_(graphics))**
>
> In 3D computer graphics, ray tracing is a technique for modeling light transport for use in a wide variety of rendering algorithms for generating digital images.
> On a spectrum of computational cost and visual fidelity, ray tracing-based rendering techniques, such as ray casting, recursive ray tracing, distribution ray tracing, photon mapping and path tracing, are generally slower and higher fidelity than scanline rendering methods. Thus, ray tracing was first deployed in applications where tak...

> **[What is ray tracing? The games, the graphics cards and everything else you...](https://www.techradar.com/news/ray-tracing)**
>
> The holy grail of gaming graphics has arrived

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [May 8, 2023, 4:38pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/7 "2023-05-08T16:38:38Z")

</div>

Thank you Mr. @Sarge! 😇

---

<div class="post-metadata">

**Author:** ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)\
**Post date:** [May 8, 2023, 5:17pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/8 "2023-05-08T17:17:30Z")

</div>

Without lighting.

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [May 11, 2023, 9:00pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/9 "2023-05-11T21:00:20Z")

</div>

[Here’s a video I found of how the original DOOM rendered layers.](https://youtu.be/ZYGJQqhMN1U) Something like this would probably be the best bet, but it all depends on if anyone wants to attempt making something like this in Arcade… I have no intentions on attempting something like this, and Idk if it will ever happen…

---

<div class="post-metadata">

**Author:** ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)\
**Post date:** [May 11, 2023, 9:20pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/10 "2023-05-11T21:20:39Z")

</div>

you should post this on 3d one!

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [May 12, 2023, 5:12pm UTC](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/11 "2023-05-12T17:12:09Z")

</div>

What do you mean by that? The point of raytracing is to simulate lighting effects…
