This is wonderful! Now I can finally make better art for 3d games. Quick question, could you make the walls 1-2 tiles high? There is an option to scale it’s height but that results in stretched textures which isn’t great
To do this, well, @AqeeAqee and @MrFranko already did all the heavy lifting already and left a comment in the extension referring to this site which covers raycasting: https://lodev.org/cgtutor/raycasting2.html
Ceiling raycasting is just inverted floor raycasting so it wasn’t too tough inverting the logic when I initially ran it from tilemaps like this where the extension was reading from the bottom half of the screen.
The challenge really just came from feeding the editor a tilemap that isn’t currently loaded to avoid users having to create strange assets like the image above. From reading AqeeAqee’s logic on grabbing the tilemaps as textures it turned out to be fairly simple in the end.
As for how I learned to code, just trying a bunch of projects like this. Finding something challenging but exciting to you and failing at it over and over again until you finally get it right. The failures can be quite fun too honestly. Even in this project I had an issue with the z axis that resulted in a hopping ceiling, that was fun.
Interesting!
Maybe you raised the roof a little too much! XD
Now I’m wondering who will make real 3D with ramps and cliffs.
definitely not using this in TMF 3…
WOAH i cant wait!!!
It’s definitely possible, that’s what I was thinking about trying out next, ceiling rendering would probably be out of the question for the most part with higher walls in place as I’m thinking the ceiling rendering would have to be separated into different heights if we have walls of different heights around, it would be possible, but a real pain to produce and I’m assuming quite a performance hit.
I’ll see what I can come up with at some point once I’ve gotten through a few other bits I’m working on .
I have a problem the ceiling tiles are stuck in 8x8 instead of 16x16 and its glitching i need help making the floor ceiling tiles back into 16x16
too bad ur a platformer master; not a 3d master lolz
yeah… Its a work in progress… Anyway do you know how to make 16x16?
I’m not sure I understand the problem, could you link the project?
the “set ceiling as [tilemap]” block’s custom tile editor is 8x8, and not the default, 16x16.
@neintoes, @jackal I fixed it but I don’t know how to do the floor. and its kinda laggy so can you help me reduce that? Here is the link https://arcade.makecode.com/S95929-06881-80109-46935
tilemap editor → add the ground tiles that you want to your 2.5D map → make sure to not put walls on them → all done
The lag I’m afraid I can’t help you with as there are only three blocks in your project there isn’t much to be changed for perfomance (I think demonstrating AqeeAqee was right about the potential performance issues with raycasting ceilings and floors).
To display floors in your project simply paint down tiles on your non-ceiling tilemap without painting the red wall surface on them like this below:

I wasn’t aware about the 8x8 tilemaps in the block selector (whoops!), I’ve pushed a fix for that now.
Thanks. But i have another problem whenever there is dialogue the whole screen goes black is there a way to fix this?
Can you post a link to your project? Generally if you would like some help remember to post a link to your project so we can have a peek at the code and see what might need tweaking.
thats a problem with that main raycasting engine, take it up with one of the mods/devs of makecode and @AqeeAqee ?
Okay here https://arcade.makecode.com/S95929-06881-80109-46935 Im pretty sure it has nothing to do with my code. But check it out for me please.
@neintoes I had a question.
I’m not familiar with big extensions like this one but I was wondering if multiple floor layers is in the future. It would make recreating games like Minecraft so much easier.
Btw amazing work so far. Absolutely A+++++++++