# Raycasting 3D render -- Blocks Edition

**URL:** <https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921>\
**Category:** Game Design\
**Tags:** game, graphics-and-math, extension\
**Created:** [April 1, 2022, 6:23pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921 "2022-04-01T18:23:28Z")\
**Posts on this page:** 20\
**Page:** 13

<div class="post-metadata">

**Author:** ![Sherbet\_cookie](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@Sherbet\_cookie](https://forum.makecode.com/u/Sherbet_cookie)\
**Post date:** [May 15, 2023, 3:39am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/246 "2023-05-15T03:39:35Z")

</div>

thx a lot ^-^

---

<div class="post-metadata">

**Author:** ![jadam5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jadam5/32/9261_2.png) [@jadam5](https://forum.makecode.com/u/jadam5)\
**Post date:** [June 20, 2023, 11:29pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/247 "2023-06-20T23:29:49Z")

</div>

i was wondering im new to raycasting but can someone give me the block code to make it so when i move it moves in the way im looking at because right now when i move left it moves foward or back same for the rest so if you know the block code for it is please tell me

---

<div class="post-metadata">

**Author:** ![jadam5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jadam5/32/9261_2.png) [@jadam5](https://forum.makecode.com/u/jadam5)\
**Post date:** [June 20, 2023, 11:29pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/248 "2023-06-20T23:29:57Z")

</div>

and also if it is possible to make floor, roof and make the walls higher

---

<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:** [June 20, 2023, 11:42pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/249 "2023-06-20T23:42:52Z")

</div>

It is possible, but the author won’t implement it due to the limited performance.

---

<div class="post-metadata">

**Author:** ![jadam5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jadam5/32/9261_2.png) [@jadam5](https://forum.makecode.com/u/jadam5)\
**Post date:** [June 21, 2023, 4:21pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/250 "2023-06-21T16:21:35Z")

</div>

how do you make a roof and floor i ment

---

<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:** [June 21, 2023, 4:22pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/251 "2023-06-21T16:22:21Z")

</div>

You can make the walls higher, though it’s just scaling one layer of walls instead of stacking multiple walls on top of each other if that’s what you want

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [September 8, 2023, 4:52pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/252 "2023-09-08T16:52:43Z")

</div>

New Release v0.3.18

- support dialog “see through”  
before:  
 ![download](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/dffedd089a76d1a1fce04a078d666165f06e47c5.png)  
after:  
 ![download](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/7528804892c83944bd25a6af900cc8978f52118c.png)
- optimize perf, skip blit back from “screen” if sprite has no any sayText or particle, this will save up to 14ms per sprite.
- fix, prevent crash if ParticleSource.anchor isn’t a Sprite. (Particle on Sprite supported already)

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [September 11, 2023, 4:45pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/253 "2023-09-11T16:45:27Z")

</div>

why doesn’t raycasting not work with a bigger screen size?

---

<div class="post-metadata">

**Author:** ![YuHayate](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/yuhayate/32/8275_2.png) [@YuHayate](https://forum.makecode.com/u/YuHayate)\
**Post date:** [September 11, 2023, 4:45pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/254 "2023-09-11T16:45:28Z")

</div>

nice.

---

<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:** [September 11, 2023, 9:09pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/255 "2023-09-11T21:09:44Z")

</div>

Because the algorithm’s made to draw on a 160x120 grid, nothing bigger

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [September 11, 2023, 9:16pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/256 "2023-09-11T21:16:37Z")

</div>

> [@YuHayate](#):
>
> why doesn’t raycasting not work with a bigger screen size?

That’s possible, but there’s not userconfig definations when I made this, so…

---

<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:** [October 10, 2023, 4:48pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/257 "2023-10-10T16:48:51Z")

</div>

I have a feature request! can you add a block with an 8 frame animation in it that makes the selected sprite’s image a certain frame from that animation depending on the angle between you and them and what direction they are facing? similar to the original super mario kart

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [October 10, 2023, 6:39pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/258 "2023-10-10T18:39:52Z")

</div>

This feature has build-in from the first version, right?  
In the test file of this extension(main.ts), I set directional animations (a 2d image array) for each sprite.

---

<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:** [October 10, 2023, 6:46pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/259 "2023-10-10T18:46:19Z")

</div>

I’m pretty sure that can be implemented on a project level, no need to add it to the extension itself

---

<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:** [October 16, 2023, 7:05pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/260 "2023-10-16T19:05:49Z")

</div>

Hi! Iv’e been making a backrooms game with this extension for a week now, and just recently I expanded the tilemap. But when I did I found that there were walls on the floor. I checked the tilemap but all the wall tiles had wall on so I have no idea whats going on. can someone plz help? heres a screenshot:  
 ![arcade-Backrooms (2)](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/165f28f38f1820174736c88ce1fb9e94755b021d.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [October 17, 2023, 9:33pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/261 "2023-10-17T21:33:51Z")

</div>

you are using a set copying sources, instead of the extension, right?  
Delete these files(especially you don’t want the floor feature, which is not released yet), then import the published version of raycasting extension would fix it.

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

---

<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:** [October 20, 2023, 6:21pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/262 "2023-10-20T18:21:29Z")

</div>

That worked! Thank you!

---

<div class="post-metadata">

**Author:** ![Bozo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bozo/32/11137_2.png) [@Bozo](https://forum.makecode.com/u/Bozo)\
**Post date:** [October 26, 2023, 5:27pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/263 "2023-10-26T17:27:40Z")

</div>

I know this is late, but I fixed it.

> **[idk](https://arcade.makecode.com/S96661-98314-59571-87287)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Mob112](https://avatars.discourse-cdn.com/v4/letter/m/dbc845/32.png) [@Mob112](https://forum.makecode.com/u/Mob112)\
**Post date:** [November 27, 2023, 6:16pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/264 "2023-11-27T18:16:41Z")

</div>

any clue on on how to calculate distance that works on this, im trying to play an animation when one sprite gets close to the player.

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [December 12, 2023, 5:17pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/266 "2023-12-12T17:17:15Z")

</div>

you can specify any version in your pxt.json file.

[Previous page](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921.md?page=12)

[Next page](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921.md?page=14)
