Raycasting 3D render -- Blocks Edition

@AqeeAqee Is it possible to make textures that have clear in the texture actually be see-through, I know it might be tough because you would have to determine what to render behind objects (and get worse perf), but it could be cool, since currently black and clear do the same thing. A way to do this would be to render everything l normally, but if a texture has clear in it, treat it as empty, then render the textures with clear in them after. I don’t expect this to be easy, or for you to do this (because it could require reworking the renderer quite a bit), but it’s just an idea.

1 Like

Hi, @Kiwiphoenix364 !
Thanks for your wonderful advice.

I think so at a time too, and tried. But the result is disappointed.

  • one is you said, I should render the texture behind the transparent wall. Our view direction is horizontal, all walls behind that should be rendered. This leads to all walls in view field should be rendered, instead of “first layer” walls, the perf get to very slow.
  • another is sprites. Only the part that didn’t covered by walls is rendered for perf, so if wall at side are transparent, sprites looks like didn’t drawing correctly.
    Overall, the result is somewhat ugly, or performance would get to slow. I am afraid can’t add this to my extention, until got good idea to resolve these issues.
1 Like

Hi! Is there any way that you can do a second layer of walls for high buildings with another tilemap or something! Next is floors which should be added so that you have a perfect view! I want to make the Monaco GP track (F1 street circuit) which has high buildings and stuff like curbs (kerbs) so those would be cool! Mainly the floor though!

From your ask, I realized further that how mutil-layer and floor features are expected.
These are asked many times(include myself). And there is a reply about it and explained why it can’t be implemented right now.
I am working on optimizing perf, and made a small progress. A new faster algorithm with “bisearch”. (not “the new algorithm” I mentioned before, which should be more faster but more complicate to code) Maybe the multi-layer become possible, but not fast enough for floor though, I guess.

I will release a preview maybe on tomorrow or later, for I have not much time recently.

Alright, that’s okay. But this extension by itself is a lot of work, so I don’t mind.

1 Like

This project is pretty awesome keep it up.

1 Like

Hi all
This is a preview of a optimized edition, faster walls rendering by bisearch, instead of row-by-row before. This algorithm try to found all in-screen walls by bisearch for less rows calculating. So the less walls in the screen, the faster it will be. Has its advantage for small tilemap(maybe 32x32), not suit for large tilemap.
press “menu” button will switch within these two, and the score showing micro seconds taken. You can download onto your console for testing.

  • no anti-alias yet
  • wall positions changed a little for fixed a texX calculating bug in the original rendering codes

Very Good Keep It Up Man.

1 Like

@AqeeAqee I really admire your skills in programming, how did you find the time to make all of the raycasting extention and its demos? I’m also curious about how is the extension is able to make the flat images stand up or turn a 2D tilemap to a 2.5D tilemap?

I have found a bug where if you spawn too many projectile sprites and move backwards against a wall, you clip into the wall.

Whoops! Just now found out that you fixed it already. Thanks!

1 Like

Hi @LDJ101 !
Thanks very much for you like this extension. I just start up from @mmoskal 's 3d map project, which is wonderful, and bring our into 3d world. Than I add sprites and some feature to make it easy to use in blocks.
To take care kids sometime, I have to work at home, so I have more spare time to do stuffs I am interesting. But our school and kidgarden are closed temporarily due to the COVID, I have to look after them whole day recently, so updates of this extension and replies have to delay.

If you are interesting on raycasting, this artical can help.
If you are interesting on my implementation details, feel free to ask me and we could discuss together.


I made a game with raycasting :smile:, hope you like it!

Controls and gameplay:

  • Arrow keys to move
  • Menu button to toggle view mode
  • Every 30s you take 1 damage, find the chest before you die!

And, I have forgot to say @kwx also make many amazing 3d projects, which you will like and could learn a lot.

Just now updated It’s A-maze-ing, here are the new features:

  • Press and hold A to sprint and release to stop sprinting, it’s harder to turn while sprinting but makes you go much faster.
  • Added a floor that disappears when in tilemap mode and reappears when in raycasting mode.
1 Like

CAN I SUGGEST THAT YOU can jump on tiles

thats probably not gonna happen bro…

how do i add ui?

Hi, @CuteMrMerp

Basically, you can add UI as usual, this extension can work with most other extensions, but I can’t garentee all of them. If they can work well in a 2D project, but has any issue working with this one, let me know pls.

1 Like

Pretty easy, make a sprite/your ui, then set the sprite to “related to camera” and the sprite will become camera ui.