Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm developing a raycasting engine like the one used in DOOM, Wolfenstein 3D, etc.

My engine is capable of correctly displaying walls and textures on walls, but I'm stuck at sprites rendering.

Given that my engine is based on lines and angles only (just trigonometry), is there a way to render sprites without going for matrices? And if so, which technique should I use?

share|improve this question

1 Answer 1

In order for the correct parts of the sprite to be obscured by walls and other sprites, you need to create a plane in the rendering space upon which you can blit the sprite.

The plane itself should be the size of the interactable you want to draw, and its normal should be facing the camera, essentially a moving wall perpendicular to the view angle.

Once that is in place, you can just use the same techniques you've used to draw textures on walls.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.