How to improve Wolfenstein effect

So recently I’ve been trying a lot of different things and discovered this cool thing called the Wolfenstein effect (No idea if it’s called that, but sounds cool). I have tried making it with my limited knowledge and it looks really bad. I can add more ray casts, but is there a simple solution? I’m using an old example Huckleberry made for it, so there are probably better ways to do this.

What I want it to look like:

The garbage that I made

7 Likes

Sadly I don’t have a single clue on any of this 3D stuff, lol.

4 Likes

I honestly have no clue, but, to be honest, even your “garbage” version still looks pretty 3d and cool and stuff. I look forward to seeing what you do with this!

5 Likes

I might have something for you…Flowlab Game Creator - Raycaster 2.0

5 Likes

You did a great job! I think your 3D attempt may even be the best one I’ve seen yet because I can actually tell the walls apart from the floor and ceiling, lol.

4 Likes

ty for that example, but it seems very buggy and gives a fish-eye effect. I’m trying to at least make it so you can see the side of the wall, but I’m not sure how. Currently, the side of the wall is larger than the front of it because it’s closer. I tried using a cosine formula but Ray Casts don’t give the length of the ray because if I move to the side, the output the ray gives changes (This also gives it a fish-eye effect sometimes). If someone knows an Expression that I can use for this that would be very helpful.

4 Likes

Can you send the game, maybe I can help you with that

3 Likes

Oh, I forgot to send it Flowlab Game Creator - Wolf Test. It’s in the second level

4 Likes

well first, the object called raycast shouldn’t be solid

3 Likes

This is extremely cool, but looking at it and trying to understand how it is you have done this is giving me a headache, so I’m just going to assume that you have secretly been practicing black magic in your free time, and perhaps have made some sort of deal with a wizard (don’t touch my zucchinis)

3 Likes

Yes, I have been practicing black magic in my free time, but it’s simple to learn.
Basically, I have 21 different ray casts sent out at a range between -30 degrees to 30 degrees. When one of them hits a wall it sends a message to a specific object telling it to increase in height depending on the value sent to it. That kinda maps out what your character would see in 3D. There’s a little more to it, but that’s the basics

2 Likes

I found something, you can make the horizontal wall longer in the y axis and making it thinner in the x axis, and put it inside the vertical wall

1 Like

Having so few ray casts does cause some problems like 2 hitting the same object, causing gaps in the walls, but this is just a prototype

1 Like

Gaps appear in the wall when I do that

1 Like

you can make the vertical wall 105 of size, and make the horizontal one 100 thin and 110 long, but I think that the gap may be caused by the raycast itself, it used to make the same thing with mine

1 Like

Do you know how to fix the fish-eye effect?

1 Like

Sadly not yet, im actually trying to, but it may take some time before I find a solution

2 Likes

what’s a fish-eye effect?
also, this is probably obvious but having more lines/raycasts would have the resolution looking better. Another little thing is I was wondering if you could add sideways movement? just to make it easier lol.

2 Likes

I’ll add sideways movement as well as more ray casts once I figure some of the bugs out. A fish-eye effect is where a flat surface (The wall) has a curve.

2 Likes

just guessing from the name, a fish had an eye on each side of its head, while a human has two eyes in front. maybe you can have two objects act as “eyes” and emit raycasts, then somehow combine the images…
I’ll think about it. So far this is looking really cool! You’ve inspired me to make my own version lol

2 Likes