The creator of an open-world RPG discusses their approach to implementing enemy movement in the game, focusing on creating a more engaging and realistic experience for the player. Initially, they used a steering behavior system, but encountered issues with opposing vectors canceling each other out, resulting in awkward AI behavior. To address this, they developed a context-based steering behavior system that takes into account the desirability of different directions, allowing the AI to make more informed decisions. This system uses a dot product to calculate the desirability of a direction and applies shaping functions to influence the AI's movement. The creator also discusses their approach to tweaking the movement to eliminate jitteriness and creating a more natural wandering behavior for enemies using Open Simplex noise. Additionally, they mention implementing a faction system for NPC targeting, which led to unexpected and interesting behavior, such as a "battle royale" scenario.
Here are the key facts from the text:
1. The developer is creating an open-world RPG game.
2. The game features lovable characters, dark and treacherous dungeons, and a base-building system where players can stash their cheese.
3. One of the challenges the developer faced was handling enemy movement in a way that's convincing and engaging for the player.
4. The developer initially used a steering behavior system but encountered issues with opposing vectors canceling each other out.
5. The developer then switched to a context-based steering behavior system that takes into account the desirability of different directions.
6. The system uses a dot product to determine the desirability of a direction, with values ranging from -1 to 1.
7. The developer applied a shaping function to the dot product to favor sideways movement over forward and backward movement.
8. The developer encountered issues with jitteriness due to entities rapidly changing direction and fixed it by applying a shaping function to the separation logic.
9. The developer improved the wandering logic for enemies, making them meander about and gradually change direction.
10. The developer used Open Simplex noise to adjust the direction of enemies, giving their wandering a more natural feel.
11. The developer is working on a faction system for NPC targeting, which led to an interesting battle royale behavior with enemies.
12. The developer plans to focus on a pet taming and raising system next.
13. The developer streams game development on Discord nearly every day and interacts with the community.