Microsoft MakeCode

3D raycasting in Arcade

I’ve been playing a bit with fake 3D raycasting, as done in original Wolfenstein 3D from id Software.

It’s not much of a game, you can just walk around, but there are no other characters and nothing really to do. This should become a package to make 3D games. I’m a bit on the fence here, if it should use the tilemap APIs, or have its own set of APIs (which are quite similar to tilemap - you set the map and assigned textures to each pixel).

It runs on SAMD51 at around 50fps and on STM32 at around 35fps.

It only works in https://arcade.makecode.com/beta (in fact you can make it work on the released version, but it’s somewhat slower then, especially on hardware).

12 Likes

This looks so cool! Should I stop working on my side project, then? It seems like there is a lot of overlap.

Not at all! You have a different algorithm and it will allow for different games - you can go up and down. Also it’s unclear if I will have time to turn mine into package…

1 Like

Wow, really awesome! This brings me way back to Wolfenstein and Doom and Marathon in such a great way.

1 Like

Thanks for the code man i have custmize the world and know it is fnaf1 and fnaf 2 here is the link 3d maze fnaf 1 & 2

1 Like

Do you think you can make the render machine into an extension? For example:
//% block="make a 3d map $image with block size of $number
Or
//% block="set $color pixel to block with image $image"
This is just the block looks because I still can’t figure out the math for this. Or maybe make q tutorial? Im a fast learner and I’m taking algebra 1.