Log In  

Cart #eyn_raybase-1 | 2021-05-31 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

So, I fell into the raycasting hole. I'll keep around a small cart with a few routines so I can quickly do more stuff with that technique.

I'm not making a generic routine to display the walls because there are a lot of features one might want to use in their own caster (wall uvs, animations, etc etc), so instead, I made a few scenes to show how to augment a simple caster to do a few more things (like alternating textures on NS/EW sides or having a depth buffer to properly render world sprites)

In the future I might explore ray collision, there is potential to get fun stuff with that. A lead I'm following is using custom collision shapes per tile so hitting a tile will trigger the shape. An example of a possible shape would be a circular column smaller than a tile would be simple to do with a ray-circle hit detection and atan2 to compute the UV.

Addendum: the cart is in WIP because this cart'll never sum up to a finished project and because there is room for improvement. For instance I'm not totally satisfied with rspr.

Version 0: initial release

Version 1: quickly added a sspr map renderer. Costs less CPU than tline for a mostly similar look minus visual jumps in some angles. The renderer might need more work to avoid having the walls and their texture jump as much (experimenting with flooring/ceiling the coordinates might be a lead).

Topic update : moved to GFX samples as it might be a better place than WIP.

P#92849 2021-05-31 18:21 ( Edited 2021-09-13 11:50)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-28 11:31:30 | 0.009s | Q:11