# 3d Rendering with floor and ceiling!

**URL:** https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758
**Category:** Arcade
**Tags:** graphics-and-math, extension, game
**Created:** [July 20, 2024, 5:06pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758 "2024-07-20T17:06:04Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 20, 2024, 5:06pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/1 "2024-07-20T17:06:04Z")

</div>

I’ve been making some tweaks to AqeeAqee’s wonderful raycasting extension and there’s a bit to fix yet on some of my lazy code but I wanted to show off what I’ve got so far, now with the ability to add a tilemap to be rendered as the game’s ceiling.  
 ![ceiling render](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/a/5/a521f0070703151b03756a80133fadb5f89ae1ce.gif)

---

<div class="post-metadata">

### Author: ![Ima.notarobot](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ima.notarobot/32/26551_2.png) [@Ima.notarobot](https://forum.makecode.com/u/Ima.notarobot)
#### Post date: [July 20, 2024, 6:32pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/2 "2024-07-20T18:32:08Z")

</div>

wow! will this be for public use? I was thinking of making a doom video game…

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 20, 2024, 9:06pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/3 "2024-07-20T21:06:53Z")

</div>

Also, I forgot to mention the floor rendering code is from MrFranko.

Ignore the framerate in the gif. I accidentally locked the gif FPS to 15 so there aren’t any glaring performance issues, at least on my end (though I exclusively use MakeCode on the pc).

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 20, 2024, 9:07pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/4 "2024-07-20T21:07:05Z")

</div>

I’m happy to share the extension code with permission from AqeeAqee unless they’d like to absorb some of these changes in their repo (though I remember reading they didn’t implement floor/ceiling rendering due to performance issues).

If anyone could let me know how to tag someone on the forums I’ll go ahead and do that.

---

<div class="post-metadata">

### Author: ![kaleb3335](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kaleb3335/32/16382_2.png) [@kaleb3335](https://forum.makecode.com/u/kaleb3335)
#### Post date: [July 20, 2024, 9:07pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/5 "2024-07-20T21:07:07Z")

</div>

this looks amazing

---

<div class="post-metadata">

### Author: ![Octodemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/octodemon/32/15417_2.png) [@Octodemon](https://forum.makecode.com/u/Octodemon)
#### Post date: [July 20, 2024, 9:09pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/6 "2024-07-20T21:09:56Z")

</div>

I have been looking for something like this forever! Could you share it by chance? This is really cool.

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [July 21, 2024, 4:55am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/7 "2024-07-21T04:55:12Z")

</div>

WOW so cool!! @AqeeAqee  
someone make this an extension

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 21, 2024, 4:57am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/8 "2024-07-21T04:57:11Z")

</div>

I can’t seem to figure out how to tag the original authors of the pxt-raycasting and original floor rendering code, so while I figure out how to tag users, here’s the updated extension now with ceiling rendering (and MrFranko’s floor rendering) forked from AqeeAqee’s raycasting extension :

> **[GitHub - neintoes/pxt-raycasting: AqeeAqee's raycasting extension with...](https://github.com/neintoes/pxt-raycasting)**
>
> AqeeAqee's raycasting extension with ceiling rendering and MrFranko's floor rendering - neintoes/pxt-raycasting

The project in the gif above can be achieved by simply using code from the ‘3d Render’ section like this image:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/2/32f3f4a9adb479da521008ef952f6c3b8bc5b743.png)

**Note: the ceiling tilemap must match the width and height of the tilemap that is currently loaded or it will throw an error.**

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 21, 2024, 4:57am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/9 "2024-07-21T04:57:39Z")

</div>

I’ve attached a link to the extension in another reply in this thread below 🙂

---

<div class="post-metadata">

### Author: ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)
#### Post date: [July 21, 2024, 5:00am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/10 "2024-07-21T05:00:04Z")

</div>

I think i recall aqeeaqee talking about adding floor and ceiling in the future, but that was like a year ago. I hope this speeds up the process!

---

<div class="post-metadata">

### Author: ![Octodemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/octodemon/32/15417_2.png) [@Octodemon](https://forum.makecode.com/u/Octodemon)
#### Post date: [July 21, 2024, 7:41pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/11 "2024-07-21T19:41:33Z")

</div>

Thanks a lot! (And to tag users you use the @ )

---

<div class="post-metadata">

### Author: ![User7](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/user7/32/16035_2.png) [@User7](https://forum.makecode.com/u/User7)
#### Post date: [July 21, 2024, 7:43pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/12 "2024-07-21T19:43:42Z")

</div>

Im wondering if you could use the second player/jkil to move a camera

---

<div class="post-metadata">

### Author: ![Rune](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rune/32/18951_2.png) [@Rune](https://forum.makecode.com/u/Rune)
#### Post date: [July 21, 2024, 10:15pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/13 "2024-07-21T22:15:35Z")

</div>

WOWZEREEZ!!! @AqeeAqee said it was impossible! (I think)

---

<div class="post-metadata">

### Author: ![jackal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jackal/32/19506_2.png) [@jackal](https://forum.makecode.com/u/jackal)
#### Post date: [July 21, 2024, 10:16pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/14 "2024-07-21T22:16:05Z")

</div>

gonna see what i can do with this

---

<div class="post-metadata">

### Author: ![Josef](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/josef/32/12457_2.png) [@Josef](https://forum.makecode.com/u/Josef)
#### Post date: [July 21, 2024, 11:28pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/15 "2024-07-21T23:28:53Z")

</div>

WOW thanks alot

---

<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: [July 21, 2024, 11:29pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/16 "2024-07-21T23:29:38Z")

</div>

From the standpoint of a person who uses an iPad to code, I can confirm that this is 100% smooth ✅

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 21, 2024, 11:30pm UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/17 "2024-07-21T23:30:55Z")

</div>

Thanks I’m very happy with the end result. 🙂

If I remember correctly I think AqeeAqee said they were experimenting with it but the main issue was more to do with the performance impact on consoles like the meowbit.

To be honest, that’s likely still the case. I just use makecode exclusively on the pc so it’s less of an issue on my end.

---

<div class="post-metadata">

### Author: ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)
#### Post date: [July 22, 2024, 4:25am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/18 "2024-07-22T04:25:14Z")

</div>

This is AWESOME!!  
So much progress right now in 3D Makecode, and this is stunning!  
Where did you learn to do this / to code in general?

---

<div class="post-metadata">

### Author: ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)
#### Post date: [July 22, 2024, 4:26am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/19 "2024-07-22T04:26:19Z")

</div>

It’s definitely possible, but it would require some maths that are beyond me at this point in time. I’ve got a few personal projects in the pipeline outside of makecode but I’ll give it a swing when I have some time for sure.

---

<div class="post-metadata">

### Author: ![Frastheman](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@Frastheman](https://forum.makecode.com/u/Frastheman)
#### Post date: [July 22, 2024, 4:27am UTC](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758/20 "2024-07-22T04:27:56Z")

</div>

Haven’t been in tne comunity that long but this is the coolest thing I’ve seen so far continue making amazing things like this and I think you’ll go far in lif 👍

[Next page](https://forum.makecode.com/t/3d-rendering-with-floor-and-ceiling/29758.md?page=2)
