Raycast engine showcase

just showcase… Im not sure why is it so laggy (anyways it does 600 operations per frame)
i also tried to make mirrors

2 Likes

Not bad but I would suggest adding more of a depth perception to it as it looks a bit bland. It’s also probably laggy because you haven’t use parallel luaU. Try that.

2 Likes

I’m not even sure what you can do with parallel lua. The only things you can do are calculations, anything vanilla - and this uses raycasting which isn’t so there’s not much use for parallel lua.

This is my raycaster engine I made last year. Runs well over 100 fps at 240x240 with textures and floor/ceiling rendering. No parallel luau or multithreading. The only real optimization i made was using a custom raycasting algorithm specifically for tile maps to reduce the amount checks done during the raycast via the DDA algorithm

I suspect the lag might be coming from your for loops, im not sure why else it would be lagging that bad.

Be sure you’re only doing a for loop for each column for the main raycasting and distance maths and calculations. Not every pixel.

4 Likes

No, you definitely can do that with parallel luaU.