Raycasting 3D render -- Blocks Edition

Figured it out! (with help from a friend).

https://arcade.makecode.com/S55218-84444-80372-29329

3 Likes

Hey @AqeeAqee im a fellow coder and I can tell your good at ray casting im currently working on a Minecraft game in make code and I need a little help with the project would you be down to help with ray casting and 3d effects?

6 Likes

Feel free post your question on Arcade forum, I will answer as long as I have time. And more important, here are tons of coder members can help you either.
Good luck!

2 Likes

hi, I am also using this extension in my Minecraft game. I am trying to make grass blocks randomly generate on world creation, but whenever I add the walls, the texture gets removed. can someone please help me make this work in 3d?

1 Like

It’s pretty hard to work in 3D the raycasting is like face 3D you can really go up and down you’d stuck on this one layer

2 Likes

Hello @AqeeAqee ,
First off, thanks for the awesome extension! I wanted to ask you if there was a way to simulate the screen shake effect while using raycasting? Kinda like forcing a sway effect.

1 Like

That’s possible, like sway as you said, but not implemented yet.

4 Likes

Also is there a way to take away movement from the player / camera in raycasting?

1 Like

Just set both value to 0.

2 Likes

Yes! I did use that. Turns out I had other movement code that would override it because I forgot to add a condition to it :sweat_smile:
Thanks!

1 Like

How could you do the lantern effect with blocks?

2 Likes

I fogor

can someone please explain to me how floors and ceilings work because i am noob

3 Likes

no ceiling. floors can be done by making the bottom half of the bg img the floor color

3 Likes

@AqeeAqee How would I revert the extension to a version where non wall tiles are rendered?

2 Likes

Edit your pxt.json file, append or modify extension version to v0.3.15 or below. Just like the line in red box of following screen shot.

3 Likes

I know its been a full year, but is there any progress on the floor update?

2 Likes

can someone please make this compatible with random tile placement? like, the extension?

2 Likes

Right, here is an extension to add a ceiling, it can also make the sky move like sky! Here it is: GitHub - The-Code-Zone/Raycasting-pxt-extension: AqeeAqee’s raycasting extension now with ceiling rendering and MrFranko’s floor rendering

1 Like

It also adds a floor!