Work in Progress

Raycaster Demo

2

AstonBrown 2022-11-06 13:29 (Edited)

So this is interesting. I was fishing through old files and stuff looking for interesting things, and I came across this failed raycasting project. I'm probably not going to do anything to this, but I have decided to upload it anyway for fun.

It looks like the letters were going to display the product of the rays cast. If I remember correctly, I would cast a ray and count up from zero until it collided with the edge of the game. Then I would move the letters according to the number. Something like that.

It does beg the question, is there an easy way of making a raycaster?


nathanielbabiak 2022-11-07 04:33 (Edited)

I've definitely gone off-the-deep-end creating ray cast algorithms for this system. If you're interested in learning about those algorithms, I'd recommend avoiding the LowRes NX graphic/display stuff for now, and instead use cells to draw the walls. There's a bunch of ray cast algorithms uplaoded to this site: 1, 2, 3. None of them really work though.

The best option might be to use a cell drawing library and do it yourself. The system won't have any speed issues if you stay away from pixel-level graphics.

I'll upload a cell-based ray caster tomorrow and you can see how it's done.


nathanielbabiak 2022-11-07 07:08 (Edited)

Done here. Let me know if you have any questions.


AstonBrown 2022-11-08 09:37

whbat is a cell?


AstonBrown 2022-11-08 10:02

NVM I FIGURED IT OUT


Log in to reply.