SFML community forums

General => SFML projects => Topic started by: LibertyBear on April 20, 2021, 11:12:20 am

Title: HELP with sprite rendering in Raycast engine
Post by: LibertyBear on April 20, 2021, 11:12:20 am
Hi lads, new to this forum. Ok heres the story thus far:

Im new to SFML and right off the bat wanted to make a Raycaster (life is short), and kinda found a lack of prebuilt raycaster libraries... so thats what Im going for, a simple raycast engine/library.

I came across this(https://lodev.org/cgtutor/raycasting.html) golden text, but its on a custom SDL library, but the formulas and such still work on SFML.
So I started interpreting it in SFML and then found out a chad called Thomas van der Berg already did that and better than me. So the repository Im gonna link is 80% his stuff.

Anyhow, the key element I'm still lacking is sprite rendering. I cant for the love of me get it working. The walls ceiling and floors render alright, but the sprites either turn into a wall or screw all the rendering.

Here's what I've got so far: https://github.com/LibertyBear/sfmlTest/blob/main/main.cpp

Any help would be greatly appreciated