UnderwareDESIGN

PlayBASIC => Beginners => Topic started by: ScottieB on May 10, 2016, 08:20:21 AM

Title: Raybaster Help???
Post by: ScottieB on May 10, 2016, 08:20:21 AM
I am trying to continue with my raycaster engine.

I'm working on doors and the code is right but...

How do I fix the texturemaps on the doors they are not a nice as the walls.
Any ideas???

Please help if you can.
ScottieB
Title: Re: Raybaster Help???
Post by: kevin on May 11, 2016, 12:17:23 PM
 just use polygons like.. Wolf 3D (http://www.underwaredesign.com/forums/index.php?topic=606.0) demo does.
Title: Re: Raybaster Help???
Post by: kevin on May 20, 2016, 12:05:12 PM
 there's also a must more optimal version of your original code posted [plink] here (http://www.underwaredesign.com/forums/index.php?topic=4306.15) [/plink]
Title: Re: Raybaster Help???
Post by: stevmjon on July 07, 2016, 10:23:21 PM
hey scottie

I spent the last week going through your code, figuring out how it worked, using step-trace mode etc.
I worked out most of it (see pic 2) and have come up with a few ideas.

1. I worked out a door texture fix, by extending the ray until it hit the door offset position. it works but is not perfect yet(see pic 1).
2. I added a lockbuffer loop after the main ray loop, to draw the screen texture strips much faster.
3. I removed a bottle neck loop that was greatly slowing down the FPS.

I hope this helps you, and I think it is a clever idea how you created a 3D image from a 2D map.

I will continue to refine the door texture, as it is slightly different between + direction, and - direction.
I also want to look at smoothing out the wall top and bottom edges, as this will also smooth out the wall textures too.

   stevmjon
Title: Re: Raybaster Help???
Post by: kevin on July 10, 2016, 12:44:35 PM
Steve,

QuoteI hope this helps you, and I think it is a clever idea how you created a 3D image from a 2D map

    It's as old as the hills man,   but John Carmack popularised the idea.    Wolfenstein 3D Director's Commentary with John Carmack  (http://www.underwaredesign.com/forums/index.php?topic=4334.0)