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).

22 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…

2 Likes

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

2 Likes

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.

1 Like

nice! with a little bit of code you could add jumping

can you make tis an extention

1 Like

i have been searching for a while and i came across 2.5d its whee you use a 2d sprite and instead of the prospective of the enemy changing from one to another the sprite just faces the player the entire time while animations are the only way that the prospective you have on the sprite while change if some one can help me figure out how to do this this has been used in Wolfenstein 3D and many of the dooms

Yeah, it basically uses a lot of math to calculate the position, scaling, and frame of animation of a sprite to position it in 3D.

billboards are what i am trying to make 2.5d billboards

can you code the 2.5 Demensions into this

1 Like

Just a spinoff with guns i made
controls:
A to shoot
press B to aim
hold & release B to reload (hold it for atleast ~500ms)

5 Likes

The best I could do with this engine was this: https://arcade.makecode.com/87598-96325-50064-01307

Its not finished, I don’t know Javascript, but I think it could be interesting to put here. If anyone has any solutions to the problem of putting an enemy or item in the game that would be awesome. But, this is the best I can do. Enjoy

1 Like

would there be a way to add ai to this?

1 Like