[p]In Lobo, encounters are designed with a few enemies at a time, rather than huge crowds. This is both a design choice and a technical necessity. [/p][p]By design, encounters should feel meaningful and challenging, no matter the enemy’s size. Technically, smarter AI is heavier on performance: the more complex their behavior, the more processing they require. On top of that, Lobo is a small open world. Some enemies spawn at runtime, but most are manually placed in the level. To keep performance smooth while maintaining engaging encounters, I improved enemy “presence” with a distance-based system: [/p]
- [p]A timer checks each enemy’s distance to the player. [/p]
- [p]Distance bigger than 4000 units: Enemies are in sleep mode. No visibility, no tick, no animation, no AI. [/p]
- [p]Distance 4000–2000 units: Enemies are visible in idle mode, but still mostly inactive. [/p]
- [p]Distance less than 2000 units: Tick and animation are enabled, but at a reduced rate depending on distance. [/p]
- [p]Combat range within 500 units: Enemies are fully active, 100% functional, and ready to fight. [/p]
[p]This ensures that only the enemies near the player are fully active and using their potential, while keeping the game smooth and reactive.[/p][p][/p][p][/p][previewyoutube][/previewyoutube][p][/p]