Board Thread:General Discussion/@comment-24490630-20140131234126

I've noticed that the NPCs have weird stair-climbing AI.

Consider the picture:



In this example, I've noticed that:

1. When going to the left:

a. He must go up stairs if there is a platform in the the way. If he was going from room C to room D, even though there's a stone floor beneath him, he would still climb platform 2. This means he cannot go downstairs if that is in the way.

b. He can ascend through platforms like platforms 1 and 3, when moving from room C to room A

2. When going to the right:

a. He can go up or down platforms. For example, when going from room D to room C, he would not climb platform 2. He would simply walk across the stone blocks. Also, he can go from room D to room B choosing to climb that same platform.

b. He cannot ascend through platforms, meaning that they must be at least 3 blocks above his head. In the case of going from room D to room B, if platform 1 was one block more to the right, he would not be able to get there.

3. In either direction, he can't drop through platforms like the enemies.

This complex mix of direction makes it difficult to make multidirectional stairs that can move betweeen floors, as you have to make sure that one side can only be used when going up/down. It would be nice if the AI designers of Terraria could make NPC AI to be behave the same way going left or right, such that:

1. They can choose to go up or down

and

2. They can ascend through stairs going up.

If they want, it would also be nice if they could make it so that they can, like enemies, drop through platforms. However, as long as the first two are met, making stairs is possible. After a while of turning around on the platforms, visiting all of the rooms first, and returning to the room from which they started, (they've done all of those trying to get to each of these rooms) they'll be able to find their way to their destination.

In either case, I must applaud your NPC AI, as I love to watch them figure out how to get to the room while they walk, and mess up a couple of times. I'm currently taking AI, and can see how much of a monster path-finding can be. Kudos for you guys, and thanks for listening to my proposition.

Thank you.

-AirStyle 