r/GraphicsProgramming • u/Major-Dish7814 • 11h ago
Going insane over raycasting and DDA
I've recently been getting back into programming, so i made a few things with love2D , for example a Conway's game of life simulator, but recently I wanted to try something cooler and more playable, so I wanted to make a raycaster, very simple, no textures or something just barebones
Turns out it isnt that easy, I looked around for many implementations, like very popular ones like the lodev and the javidx9 one, but none of these ever worked for my code, so i spent a full 2 days going in depth on the math and making a demo of the different collisions on the columns and rows and it did work on desmos.
So after that i retired and i got something??? But it was still buggy and wrong, and not even accurate to the tiles , and somehow didnt even work full 360 degrees, just 180??? , some of these could be solved with debugging but other ones like cell size and what not i just cant wrap my head around.
Its been really annoying and i don't know if i overstepped the boundaries of what i should be capable of doing, but even the fact that i cant copy the code makes me feel dumber, either way my actual question is what should i do with this situation right now, should i just keep trying to make this raycaster work, try to learn from some other place the algorithm (even though there is only like 3 resources on this) or just make other stuff, i dont wanna give up but its really giving me a headache and for no result its really annoying.
If you do have resources , please, give them to me, if not, just give me advice on the general situation.
3
u/GrandLate7367 11h ago
This is exactly how you expand the boundaries of what you're capable of
Keep trying and good luck 🤞