Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: HELP with sprite rendering in Raycast engine  (Read 4858 times)

0 Members and 1 Guest are viewing this topic.

LibertyBear

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
HELP with sprite rendering in Raycast engine
« 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