Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Ep. 09 | Optimizing Code: Finite State Machine | Let's Make A Metroidvania in Unity!
Play lesson

Metroidvania Tutorial Series - Ep. 09 | Optimizing Code: Finite State Machine | Let's Make A Metroidvania in Unity!

5.0 (3)
46 learners

What you'll learn

This course includes

  • 10 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

⚙️ Ready to take your 2D character controller to the next level? In this Unity 6 tutorial, we’ll refactor our Player controller code into a Finite State Machine — giving us cleaner logic, easier debugging, and the flexibility to expand with new mechanics down the road. This is my longest video yet (30 minutes!) — a deep dive compared to the usual 10. We’re laying the groundwork for smoother systems and future-proof architecture. We’ll cover: 🔄 Converting messy if-else checks into clear, modular states 🎯 Building a State Machine to handle switching between Idle, Run, Jump, Crouch, and Slide 🧩 Writing each state as its own script for easy tweaks and scalability 🚀 Optimizing performance and reducing bugs by centralizing and re-using important functions By the end, your character controller will be fully state-driven, setting us up for advanced mechanics and polished gameplay in upcoming videos. 🔗 Assets Used (Free for Commercial Use!) Character → Brullov’s Generic Character v.0.2 https://brullov.itch.io/generic-char-asset Building Decorations → Brullov’s Castle of Despair https://brullov.itch.io/2d-platformer-asset-pack-castle-of-despair Cave Tilemap → Szadi’s Pixel Fantasy Caves https://szadiart.itch.io/pixel-fantasy-caves Kobold Warrior → Mattz Art’s Kobold Warrior Pack https://xzany.itch.io/kobold-warrior-2d-pixel-art 💡 Support the Channel Want more tutorials (2 per week!), early access, and source code? Join the community here: 👉 / nightrunstudio Or become a YouTube member! 🎹 Music Chasing Shadows – Night Run Studio From the Willard soundtrack ⚡ Perfect for: Unity 6 Beginners, 2D Pixel Art Devs, Platformers, Metroidvania Movement Systems, Character Animation Tutorials

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere