Tales from the TinkerShed

I would like it to be known that I was the root cause of this. So when DraftyScienceCoat75 makes an amazing game it was all because I asked how to improve the Wolfenstein effect and Drafty just did a 10x better job than I did. But seriously, really impressive and I can’t wait for the finished product.

5 Likes

You’ve started a flowlab revolution. Before you know it, 90% of games on flowlab are going to be 3D games

3 Likes

Haha, nope. This isn’t the first time we’ve had a Flowlab revolution. They die in a week or two, if it’s crazy enough it’ll be a month.

5 Likes

Hehe 3D is something that will slowly improve with more examples.
If only with had a draw line behavior.

5 Likes

Remember when they made an efficient Sprite Stacking method?

4 Likes

NO WAY

they did it, that’s crazy!
I gotta snoop the code and figure this out so I can make an fps game

4 Likes

The walls get kinda weird when you go up close

3 Likes

Fisheye effect, you can compensate for it. I think it’s somewhere far above in this thread, lol :slight_smile:

https://www.permadi.com/tutorial/raycast/rayc8.html

8 Likes

You have to watch out using cosine to compensate though, it technically can make the camera start to clip into the wall

2 Likes

So I think this actually isn’t the fish-eye effect, but something with the flowlab ray-casts.
I did include code for the fish-eye effect, and I think this screenshot shows it working
image

In the video you can kinda see how the wall is made of what looks like different squares, and I think it’s this way because the ray-casts return the distance to the middle of the object instead of where it hits it.
I’m not entirely sure though, I may have calculated the angle wrong or something, what do you think?

5 Likes

Yeah, I never got to thank you properly for the inspiration! That one scratch video was also very informing, I couldn’t have done it without that :slight_smile:

4 Likes

Yes, the ‘distance’ raycast returns seems to be the radius arc to the center of the object.
Somewhere i published a demo that shows that. That’s why i used a custom calculation in my raybeam examples :wink:

I think you can see the effect here

6 Likes

Ah, found it, here one where I used textured walls. But too slow and unreliable with raycasts.
At the moment building a version with equations, easier now with the multiple inputs.

As said, old, buggy, slow. Just to see how far one can push the raycast. And yes, couldn’t be bothered to remove the fisheye/bowl effect and add another expression, LOL

Screenshot 2022-02-21 224104

7 Likes

Ohhhhh I see, so you increase the length of the raycast until you hit something and then you will have the correct distance
Youre saying it was too laggy because there were too many raycasts and objects?

4 Likes

You could also do something like this:

There’s no raycasting at all, the wall objects each render themselves using their vertices’ distance to the player XD

4 Likes

looks amazing, just need to remove those weird glitches.

3 Likes