# 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:** 12

<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:** [April 12, 2023, 5:40pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/226 "2023-04-12T17:40:46Z")

</div>

These are all not supported by this extension yet.

---

<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:** [April 12, 2023, 7:41pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/227 "2023-04-12T19:41:49Z")

</div>

The target of support SayText feature by Raycasting extension is just “COPY” faithfully. So you could try some trick of SayText, eg: add a return letter inside words, like

> ```
> spr.sayText(" test\ntest\ntest\ntest\ntest\ntest\ntest\ntest\n", 9999)
> 
> ```

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

---

<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 13, 2023, 4:34pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/228 "2023-04-13T16:34:06Z")

</div>

When are you planning to fully release these features?

---

<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:** [April 13, 2023, 6:47pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/229 "2023-04-13T18:47:21Z")

</div>

You mean the Floor/Sky?  
Should be when I can optimized it to 15 fps on my Meowbit, or 10 fps at least.  
The current algorithm of floor take 3 times of wall’s each frame, plus sprites and other game logic, FPS is too low to be a qualified game, I think.

---

<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 13, 2023, 6:49pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/230 "2023-04-13T18:49:09Z")

</div>

Would you mind releasing it specifically for the simulator? I understand performance really matters since you work with hardware but it would be something nice to have on the simulator when the performance is not limited

---

<div class="post-metadata">

**Author:** ![EpicKitty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/epickitty/32/8358_2.png) [@EpicKitty](https://forum.makecode.com/u/EpicKitty)\
**Post date:** [April 13, 2023, 8:36pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/231 "2023-04-13T20:36:07Z")

</div>

> [@AqeeAqee](#):
>
> Should be when I can optimized it to 15 fps on my Meowbit, or 10 fps at least.

All the code is written in TypeScript (Arcade calls it JavaScript) right? If you want huge optimization, you can use C++ (It’s pretty hard to use though). Look through some C++ files in the screen and core folders in the explorer, (In an Arcade project/game) maybe you’ll understand how C++ works in Arcade.

---

<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:** [April 13, 2023, 10:27pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/232 "2023-04-13T22:27:48Z")

</div>

I tried add cpp file in extensionlong time ago, it does work in micro:bit, but failed generating the correct shim file in Arcade online.  
Have you tried in extension or project, how did you do?

---

<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:** [April 13, 2023, 10:28pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/233 "2023-04-13T22:28:02Z")

</div>

I am working on a perspective algorithm recent, which can be applied on floor/sky. But still on struggling performance too. I will consider release new version with current floor algorithm, if the new perspective one cann’t satisfied me. 😂

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 14, 2023, 4:45pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/234 "2023-04-14T16:45:20Z")

</div>

I am a noobie and i have like no experience and im trying to figure out if i should go do computer science when i get to high school

---

<div class="post-metadata">

**Author:** ![EpicKitty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/epickitty/32/8358_2.png) [@EpicKitty](https://forum.makecode.com/u/EpicKitty)\
**Post date:** [April 14, 2023, 4:45pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/235 "2023-04-14T16:45:29Z")

</div>

It wouldn’t really work straight if the box, I also can’t use my own extension in micro:but. I also didn’t create any extensions with C++ yet.

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 21, 2023, 4:32am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/236 "2023-04-21T04:32:58Z")

</div>

Speaking of which when would we be able to have custom floors?

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 21, 2023, 4:36am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/237 "2023-04-21T04:36:25Z")

</div>

Hello there i’m sorry to say that i would discontinue my backrooms game but instead of leaving off thier i decided to turn it to a functional wave defense game currently it’s in demo version but ill try to improve on it

> **[Zombie game Give CREDIT](https://arcade.makecode.com/S97863-83154-86158-94204)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 24, 2023, 1:25pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/238 "2023-04-24T13:25:52Z")

</div>

Its finally out a sort of functional game that I would continue working on

this update adds -zombie body system, -brand new sounds- random drip- retexture zombie- and More- also with a few bugs but that’s it for this update ill try to add a weapon changing system next but i might need help from somebody so if you can help please replies to this please and thanks

> **[Zombie game Give CREDIT](https://arcade.makecode.com/S93137-12423-14575-74910)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 24, 2023, 1:52pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/239 "2023-04-24T13:52:52Z")

</div>

This is my final update ill work on something new i hope

---

<div class="post-metadata">

**Author:** ![Shade9788](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Shade9788](https://forum.makecode.com/u/Shade9788)\
**Post date:** [April 24, 2023, 7:11pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/240 "2023-04-24T19:11:00Z")

</div>

> **[Zombie game Give CREDIT](https://arcade.makecode.com/S00326-24503-99261-03614)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

It seems to be like it came out quick but it took 2 days to actually get the post accepted

---

<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 8, 2023, 4:50pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/241 "2023-05-08T16:50:27Z")

</div>

How can i remove gray scale effect?

---

<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 9, 2023, 4:20pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/242 "2023-05-09T16:20:53Z")

</div>

First, make sure your project is backed up so you can restore it at any point. Then, remove any of the new block that I added (the one that controls the darkness modifier and texture visibility from your project). Then, install the original raycasting extension that does not have the grayscale. Press “Remove extension(s) and add pxt-raycasting” and after it loads you should be good to go!

---

<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 11, 2023, 8:52pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/243 "2023-05-11T20:52:57Z")

</div>

But how to make sure that the blocks with your extension remain?

---

<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:16pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/244 "2023-05-11T21:16:47Z")

</div>

I mean that you delete the EXTRA block that I added, all the other raycast blocks are fine. If you mean that you want colors AND fog, that isn’t really possible because there are only 16 colors. If you want to, you can change the color palette in the assets tab and have like everything being tinted a color or the walls being a different color depending on the distance though.

---

<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 12, 2023, 12:20am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/245 "2023-05-12T00:20:39Z")

</div>

@labfox29 wanted me to post this here (I assume on this topic)

> [@3D Idea - Tilemap Layering](https://forum.makecode.com/t/3d-idea-tilemap-layering/19292/9):
>
> [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…

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

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