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

<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:** [May 3, 2022, 9:17pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/21 "2022-05-03T21:17:16Z")

</div>

Oh, side move would be release next version, in fact, in which I plan to add a block to turn off move control inside extension, and then you can do it by the traditional “move sprite with buttons”.

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [May 4, 2022, 5:26pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/22 "2022-05-04T17:26:04Z")

</div>

Awesome! Then we will be able to change the speed, and limit directions for specific games!

---

<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:** [May 13, 2022, 11:29pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/23 "2022-05-13T23:29:01Z")

</div>

Hi @brandodon  
This is for your requirement, the strafing:

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

---

<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:** [May 13, 2022, 11:30pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/24 "2022-05-13T23:30:42Z")

</div>

Hi guys, **Raycasting V0.3.4 released**  
I am sure the interfaces is what you want or not, or is convenience for your projects.  
Let me know please, if you have any idea about it, or any feature you want in the future version.

> **[Demo\_RaycastingV0.3.4](https://arcade.makecode.com/78858-19004-86285-92839)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

add following blocks:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c56781a39f73fab51d486afc05b741a51f90d3e8.png)

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

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

And some of function name changed slightly, sorry.

BTW, the SayText have to be release in next version.

---

<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:** [May 16, 2022, 4:06pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/26 "2022-05-16T16:06:17Z")

</div>

Hi all:  
Just released a new version v0.3.6, thanks for @jackal’s feedback above.

Changes:

- changed project name back to “pxt-raycasting”
- add shadow picker for speed value in block
- fixed a little bug of drawing

---

<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:** [May 16, 2022, 4:06pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/27 "2022-05-16T16:06:29Z")

</div>

Oh, sorry for that!  
It may be caused by differrent project names, I renamed in branch, and forgot to change back when merge. It doesn’t cause error in my test project, so I missed it.  
Try to delete the jump-raycasting ext please, and upgrade again please, the new version should be v0.3.6

So sorry for that again!  
Let me know please if it fixed.

---

<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:** [May 16, 2022, 11:01pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/28 "2022-05-16T23:01:47Z")

</div>

released v0.3.7  
Changes:

- Anti-alias of walls, after involved wallscale and view point floating (at self sprite)
- setZOffset doesn’t work, if existed in array already

And here is a demo of jump function in js code.  
(Hold A+B press up/down can adjust wallscale at runtime)

> **[demo\_RaycastingV0.3.7](https://arcade.makecode.com/24020-02436-80636-54495)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![brandodon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brandodon/32/3625_2.png) [@brandodon](https://forum.makecode.com/u/brandodon)\
**Post date:** [May 18, 2022, 11:47pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/29 "2022-05-18T23:47:14Z")

</div>

> [@AqeeAqee](#):
>
> [https://arcade.makecode.com/24020-02436-80636-54495](https://arcade.makecode.com/24020-02436-80636-54495)

I can see the extension in the files of the game, but it doesn’t show up on the sidebar, do you know why?

---

<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:** [May 19, 2022, 12:09am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/30 "2022-05-19T00:09:46Z")

</div>

I opened the url you paste, all’s well. Weird, no idea.  
Any one here met this before?

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

---

<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:** [May 19, 2022, 6:33pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/31 "2022-05-19T18:33:19Z")

</div>

wait a minute. HORROR GAME TIME!

---

<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:** [May 19, 2022, 8:15pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/32 "2022-05-19T20:15:39Z")

</div>

Lol, really? 😂

---

<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:** [May 20, 2022, 4:13pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/33 "2022-05-20T16:13:23Z")

</div>

yes… hehehehehehehehehehehehehehehehehehehehehe

---

<div class="post-metadata">

**Author:** ![IvanPoon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ivanpoon/32/6232_2.png) [@IvanPoon](https://forum.makecode.com/u/IvanPoon)\
**Post date:** [May 20, 2022, 6:53pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/34 "2022-05-20T18:53:59Z")

</div>

oh. thank you very much I have been trying to put that in the block but it keeps giving me an air. but now you figured it out for me. Thank You 😄

---

<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:** [May 20, 2022, 11:34pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/35 "2022-05-20T23:34:44Z")

</div>

**[v0.3.9 released](https://github.com/AqeeAqee/pxt-raycasting/)** , with 2 valuable features:

# support for sprite.sayText() of Arcade

- create sayText as usual, auto takeover by extension
- no new block or extra action needed
- auto scaled depending on distance of sprite
- Note: have to sign the “timeOnScreen” value, for it has no default value, though it’s optional.
- Note: doesn’t support sprite.say() which has been deprecated already.

# new block to check overlap in Z dimension

- block: “ **is Sprites (sprite1) and (sprite2) onverlap in Z dimension** ”
- or function: “isSpritesOverlapZ(sprite1, sprite2)”
- best work with original “ **on spirte kind overlaps other kind** ”, which worked at X&Y dimension.

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

> **[demo\_pxt-RaycastingV0.3.9](https://arcade.makecode.com/48334-41673-84191-43936)**
>
> Made with ❤️ in Microsoft MakeCode 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:** [May 23, 2022, 9:43pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/36 "2022-05-23T21:43:35Z")

</div>

Hi, all  
Just released [v0.3.10](https://github.com/AqeeAqee/pxt-raycasting/), with follwoing improvements & small fixes:

- add variable block: “set mySprite to (myself sprite)”, for convenience and consistent with usage of sprite blocks  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/47256ccded1f130709dacc1fdf3c5a47bd16f304.png)

- perf improvement a little, sprites render filtered by horizontal view sector

- fix, not all sprites be takeovered at once

- fix, takeover myselft sprite after create

- fix setValue block, set fov may ruin wallZScale

- fix jump effect overrided by setZOffset

- fix a change of first row of a wall painted wrong size caused by anti-alias

- fix, sprite.sayEndtime=undefined when takeover.

- fix, draw sayText, if sayEndtime=undefined

_BTW, I miss understood logic of “no default value” in last post, sayText was drawn unlimite time if thimeOnScreen not provided._

_Just update to new version if you met these issues. No new demo yet._

> Import this extension with URL:  
> [https://github.com/AqeeAqee/pxt-raycasting/](https://github.com/AqeeAqee/pxt-raycasting/), or “ **AqeeAqee/pxt-raycasting** ” for short.

---

<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:** [May 24, 2022, 5:17pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/37 "2022-05-24T17:17:55Z")

</div>

Here is a great raycasting game made by @CarltonFade  
Almost all game elements involved, a good expample project for all.  
Thanks @CarltonFade.

The Gun Game:

> **[Gun](https://arcade.makecode.com/85731-36282-96159-24401)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<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:** [May 24, 2022, 9:32pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/38 "2022-05-24T21:32:30Z")

</div>

whoa… this is way better than stalker

---

<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:** [May 26, 2022, 6:38am UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/39 "2022-05-26T06:38:20Z")

</div>

Hi all  
**v0.3.13** just released. No new feature, and No bug fix, so update is not required.

**Changes:**

- add help docs for all blocks (open right-click-menu on block and choose help)
- rename repo to lowercase: pxt-Raycasting → pxt-raycasting
- SetAttribute() rename to setAttribute()

If you updated:

- there will be two extension “pxt-Raycasting” and “pxt-raycasting”, delete previous one please.
- update setAttribute() name in your codes if there is.

---

<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:** [May 31, 2022, 4:34pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/40 "2022-05-31T16:34:04Z")

</div>

# Good News !

## This extension has been approved and added into the Preferred Extionsions list.

So searching by URL not required any more, **raycasting** icon shows up in the list when the extensions page opened, and could be chosen by a single click.

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

Thanks you all who using this extension, your “usings” make this happen!

Great thanks to @jwunderl Joey, for your trust and proposal, and kindly support during the process. It’s my honor, this extension can be listed along with those wonderful extensions together. And absolutely, I would always keep on making it better!

At last, I would like to say again: Thanks Makecode team made this happy land for all-age-programmers!

---

<div class="post-metadata">

**Author:** ![CarltonFade](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/carltonfade/32/6381_2.png) [@CarltonFade](https://forum.makecode.com/u/CarltonFade)\
**Post date:** [May 31, 2022, 4:38pm UTC](https://forum.makecode.com/t/raycasting-3d-render-blocks-edition/12921/41 "2022-05-31T16:38:05Z")

</div>

Hello again!

Just wanted to ask, how close is this plugin to being completed?

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

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