I need help with some old concepts

I made something with behaviors that aren’t like trying to read a calculus textbook written by an english major https://flowlab.io/game/play/1679857

1 Like

Also, Raytracing? Like as in super detailed AAA games Minecraft ratracing?
Also ragdolls are ez https://flowlab.io/game/play/1244443

1 Like

The system works by spawning raycast objects that moves with the player. These beam objects grow infinitely every frame until it’s own raycast finds the wall.

These examples were made before the list update, so I could simplify it more. But the problem I’m having is still some more things.

@MetaNinja is right about my comment, the game I want to make doesn’t require raycasting. You can see the method on tbe right side of that gif.

2 Likes

I’ve been working on this a bit. THERE IS A WAY TO MAKE A 3D MAP USING 2D IMAGES. You just have to make a couple of variables:

  1. Direction
  2. X
  3. Y

On start, set the X, Y, and direction to zero. A and D control your direction. Direction has four presets: 0,1,2,3.
WHEN W PRESSED:
If direction is 0, change Y by 1
If direction is 1, change X by 1
If direction is 2, change Y by -1
If direction is 3, change X by -1

FOR THE 2D IMAGES:

Make a sprite called “Room”. This is the WHOLE ENTIRE MAP FOR THE LEVEL. Make your map in the animations, make it fit the screen, blah blah blah. Name the animations by the position and direction. EXAMPLE: 103. X=1 Y=0 Direction=3. Then, set the animation to the global variable of X, Y, and Direction.

FOR SOLID WALLS

Make a variable called Forward Yes. When the X, Y, and Direction variables are a certain number, you can turn this on and off. Let’s say the position is 672. There is a wall here. Continuously send a message to the device controlling the movement, saying that the switch for the W trigger is off.

1 Like

@hihilogic this won’t work unless you never turn.

1 Like

what are you talking about.

How do they “grow,” though?

As soon as you turn your head your no longer able to see the map properly.

when you press W, A, and D, it just changes the animation of Room

1 Like

That makes sense. I’ve seen this before, but it’ll only work for a point-and-click, not for an LOZ or a Minecraft.

Making the map into an animation is a lot and is very chunky, Todorrobot made a 3D game by using animations for the rooms.

Turn with Space + z / x:

3 Likes

Yes, I remember that. Nostalgia trip lol. This won’t work for me though, sadly.

I still need a solution though… ;(

I said the solution, I use an objects called -Beam that uses its own raycast.

Yes but how do they know how far away the wall is?

You do know that the raycast outputs distance, right?

1 Like

No it doesn’t. I outputs “hit” and “miss”. You can change the length, but that wouldn’t do anything. In order to determine the distance of something, you would have to create, like, 10 raycasts, each with increasing size. You can then add coding from there.

1 Like

@hihilogic, you should check what the “hit” is actually outputting…

In the example, I’m actually increasing the cast for every miss until hit. Then hit outputs the distance away from the wall. The Always is resetting the cast length every frame.

1 Like

Ohhh okay. So basically, hit can go to set in a number variable, then boom! Ummm… numbers!

2 Likes

Now you get it. o( ̄▽ ̄)d