Summary
Keywords
Full Transcript
In this episode, we kick off a brand-new Enemy AI mini-series by building a modular, reusable enemy foundation in Unity — designed specifically for Metroidvania-style games. This “Foundations” episode focuses on setting up a clean state machine architecture that allows multiple enemy types to share the same logic, while behaving completely differently through data-driven configuration. In this video, we: • Set up the enemy sprite and controller • Create a base enemy state and patrol state • Build a reusable state machine helper • Implement an Enemy_Senses system for wall and cliff detection • Create an EnemyConfig ScriptableObject to control behaviour, stats, and abilities This system is highly modular. Enemies reuse the same scripts, and their unique behavior is defined entirely through the EnemyConfig — not duplicated code. Throughout this mini-series, we’ll build two complete enemy types: • A melee enemy that patrols, detects walls and cliffs, chases the player, and commits to clear, dodgeable attacks • A hovering imp that controls space with ranged fireballs and reactive movement Everything is built using: • Reusable enemy state machines • Clean, readable transitions • Shared logic across multiple enemy types • Data-driven configuration using ScriptableObjects This series plugs directly into our ongoing Metroidvania project and lays the groundwork for combat, hit reactions, and scalable enemy variety. 👀 Coming Up: ⚔️ Melee enemy AI — detection, chase, and attacks 🔥 Ranged enemies — hovering movement and projectiles ⚙️ Extending enemy behavior through data, not copy-paste code 🎟️ Early Access: Early access episodes are available for YouTube Members and Patreon supporters. 👉 patreon.com/NightRunStudio 🔗 Assets Used In THIS Video(Free for Commercial Use!) → Mattz Art’s Kobold Warrior Pack https://xzany.itch.io/kobold-warrior-2d-pixel-art 🔗 Assets Used in PROJECT (Free for Commercial Use!) → Minimal Fantasy GUI by Eta https://etahoshi.itch.io/minimal-fantasy-gui-by-eta → Unique Free Spell Icons by Marvyra https://marvyra.itch.io/unique-free-spell-icons/devlog/859741/my-free-8-bit-spells-is-now-available → Frostwindz Priest Animations https://frostwindz.itch.io/pixel-art-vfx-priest → Frostwindz Lightning Animations https://frostwindz.itch.io/pixel-art-skill-animations-lightning → Otsoga’s Training Dummy https://otsoga.itch.io/training-dummy → Brullov’s Generic Character v.0.2 https://brullov.itch.io/generic-char-asset → Brullov’s Castle of Despair https://brullov.itch.io/2d-platformer-asset-pack-castle-of-despair → Szadi’s Pixel Fantasy Caves https://szadiart.itch.io/pixel-fantasy-caves
