Log In  


Cart #ummmm_ok_raycaster-0 | 2023-02-03 | Code ▽ | Embed ▽ | No License

ok here's this. i want the edges to be clearer cos right now the view is fisheye. and idk how i should add clarity to the walls to distinguish them from walls behind them. thanks!

arrow keys to move, c to switch to overhead view



1

@Ummmm_ok:

Your raycaster has ... rounded edges to the walls. I'm not sure if that's a bug or a feature. :)

Is there a way to have the walls not bend ?


@dw817 idk. the rounded edges are what i want to fix. i'm thinking it has something to do with the way each ray calculates distance.


1

Pico-8 comes with a demo Raycaster written by @zep himself, @Ummmm_ok.

Cart #yiwuhedito-0 | 2023-02-04 | Code ▽ | Embed ▽ | No License
1

It might be worth investigating - seeing how he is getting sharp-angled walls and edges.


1

The fish-eye is caused because you're using the actual distance (ray length) from the camera to the wall to calculate the height of the wall. What you actually want is the perpenicular distance.

This might help: https://permadi.com/tutorial/raycast/rayc8.html


thanks @dw817 and @jasondelaat ! the article really helped and it's looking much better now :)



[Please log in to post a comment]