Ray Casting

BlitzMax Forums/BlitzMax Programming/Ray Casting

MattVonFat(Posted 2005) [#1]
I've been trying for a week now to get some simple ray casting working. I have made 3 different versions (issues with me not saving properly :P) and only two of them had any sort of workability. When I started I just did horizontal checks and I could get a strait wall but when I started to use verticle checks aswell I started to get problems. There should be any problems with the verticle checks as it is a copy of the horizontal version with the bits that need to be changed changed.

Here's what I have so far. Its part of a corner and even though there should be some walls that were from verticle checks there isnt (they should be in red - horizontal in blue). The littl map at the bottom shows which direction the person is pointing.



I'm sure that the problem is simple to work out, and I would have liked to have been able to work it out myself, but I just can't get it. I've gone through the permadi tutorial over and over and have been checking each equation to make sure that I didn't didnt divide when I should have multiplied and other little errors like that, but I'm sure I've sorted all those little things out now.

Any help that can be given on this problem is highly appreciated.

Thanks

Matthew


GW(Posted 2005) [#2]
Did you check the raycasting demo that comes with Bmax?


MattVonFat(Posted 2005) [#3]
I thought I'd seen a demo with BlitzMAX but when I looked for it I couldn't find it. I had a look through them again just now but it doesnt seem to be there.