We may earn an affiliate commission when you visit our partners.
Fantacode Studios

In this course, you’ll learn to create a third-person melee combat system in Unity with features like combos, counterattacks, intelligent enemy AI, etc. We'll design this system in a modular, data-driven, and scalable way using clean coding practices. So in this course, you’ll not only learn to build this system, but you’ll also learn lots of valuable game programming concepts that you can use throughout your career

Read more

In this course, you’ll learn to create a third-person melee combat system in Unity with features like combos, counterattacks, intelligent enemy AI, etc. We'll design this system in a modular, data-driven, and scalable way using clean coding practices. So in this course, you’ll not only learn to build this system, but you’ll also learn lots of valuable game programming concepts that you can use throughout your career

So the combat system that we’re going to create will be a free-flow combat system. That means enemies won’t attack the player mindlessly; instead, they’ll attack in a coordinated way by circling the player and attacking one at a time. This is the type of combat used in modern-day games like Assassin's Creed, Batman Arkham series, Marvel’s Spider-Man, etc. This combat system will also be easily customizable, so if you want to use punch and kick attacks instead of sword attacks, you can do that easily without changing a single line of code

So we’ll be building all this step-by-step from scratch. We’ll start by making a basic third-person controller. We’ll not use any assets for it; we’ll build it from scratch because it’s a good way to learn the fundamentals of gameplay programming. And then we'll give our character the ability to attack. We’ll architect the attacks using scriptable objects in Unity so that the designer will be able to create and edit different attack combos without changing the code. Then we'll start building the enemy AI. We'll be architecting the enemy AI using a finite-state machine. It's a technique that’s been used for building AI in games for the last 25 years. It's used in popular games like Last of Us, the Batman Arkham series, and many more. So we'll build a Finite-State Machine from scratch and create our enemies using it. We'll start by creating simple enemy behaviors like Idling and Chasing the player, then we'll implement more advanced behaviors like circling the player and attacking him in a coordinated way. Once we're done with the Enemy AI, we'll implement the counterattacks.

Throughout this course, you’ll learn lots of game programming skills. You’ll learn lots of intermediate-level C# concepts like Generic Classes, Dictionary, LINQ, Inheritance, etc. You’ll also learn to use Mathematical concepts like Trigonometry, Dot Product, Cross Product, etc. So the skills and techniques that you learn from this course will be really helpful for you if want to pursue a career as a game programmer.

Enroll now

What's inside

Learning objectives

  • Create a third-person meele combat system in unity
  • Learn to create scalable, modular and reusable gameplay systems in unity
  • Learn to write clean & modular code in c#
  • Learn to architect data driven systems in unity using scriptable objects
  • Learn important 3d gameplay programming concepts

Syllabus

Introduction
Download the completed project
How to ask questions?
Third-Person Controller
Read more

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Uses C# and Unity, which are industry-standard tools for creating games across multiple platforms and developing interactive experiences
Employs a modular, data-driven design, which promotes code reusability and maintainability, essential for large-scale game development projects
Covers the implementation of a finite-state machine for enemy AI, a widely adopted technique in game development for creating complex and reactive behaviors
Explores intermediate C# concepts like Generic Classes, Dictionary, and LINQ, which are valuable for writing efficient and organized code in Unity projects
Requires knowledge of trigonometry, dot product, and cross product, which are essential mathematical concepts for 3D game development and character movement
Focuses on creating a third-person melee combat system, which may not be applicable to learners interested in other game genres or development styles

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Unity c# melee combat system creation

According to learners, this course provides a strong foundation in creating a third-person melee combat system in Unity using C#. Students appreciate the focus on modular and data-driven design principles, particularly the use of Scriptable Objects and implementing Finite-State Machines for enemy AI. Many found the step-by-step approach and building the system from scratch helpful for understanding fundamentals. While the course covers intermediate-level C# and math concepts effectively and the instructor is generally seen as knowledgeable, some learners note that the pace can be fast and it is not ideal for absolute beginners in Unity or C#. There are mentions that integrating the system into existing projects might require effort due to the from-scratch approach.
Develops core components from the ground up.
"Building the system step-by-step from scratch is very helpful."
"Building the system from scratch helps understand the fundamentals deeply."
"We’ll be building all this step-by-step from scratch."
Detailed coverage of Finite-State Machines for AI.
"The section on enemy AI using FSM was particularly insightful."
"Explains complex topics like FSMs... in a practical way."
"We'll be architecting the enemy AI using a finite-state machine."
Applies concepts directly to a functional system.
"The combat system built is cool and the concepts... are important."
"One of the best Unity courses I've taken. Explains complex topics... in a practical way."
"You’ll not only learn to build this system, but you’ll also learn lots of valuable game programming concepts."
Teaches valuable modular and data-driven principles.
"Learned a lot about creating modular systems using Scriptable Objects."
"The modular design principles taught are valuable."
"We learned to create scalable, modular and reusable gameplay systems in Unity."
"Creating systems in a modular, data-driven way using clean coding practices was a key takeaway."
Code can be complex; some sections are fast-paced.
"Some parts of the code felt a bit rushed or could have been explained with more depth."
"Some code structures felt overly complicated for the task."
"The pace is quite fast... expect to pause and rewatch sections."
Best suited for those with some Unity/C# background.
"Requires a good understanding of Unity fundamentals."
"The pace is quite fast, especially if you are not already comfortable with intermediate C#."
"It feels like it assumes more prior knowledge than stated. Not for beginners."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Create a Melee Combat System in Unity and C# with these activities:
Review C# Fundamentals
Solidify your understanding of C# syntax, data types, and control flow to prepare for the course's coding challenges.
Show steps
  • Review C# documentation and tutorials.
  • Practice writing simple C# programs.
  • Complete online C# coding exercises.
Brush Up on Trigonometry
Revisit trigonometric concepts like sine, cosine, and tangent, which are used for character movement and AI calculations.
Browse courses on Trigonometry
Show steps
  • Review trigonometric functions and identities.
  • Practice solving trigonometry problems.
  • Watch videos explaining trigonometry concepts.
Review 'Game Programming Patterns'
Study common game programming patterns to better understand the design choices made in the course.
Show steps
  • Read chapters related to state machines and command patterns.
  • Analyze code examples in the book.
  • Consider how these patterns apply to the combat system.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Prototype a Simple AI
Experiment with creating a basic AI using a finite state machine in Unity to reinforce the concepts taught in the course.
Show steps
  • Create a new Unity project.
  • Implement a simple finite state machine.
  • Design basic AI behaviors like idle and chase.
  • Test and refine the AI behavior.
Document Your Combat System
Create a document explaining the architecture and functionality of your combat system to solidify your understanding.
Show steps
  • Outline the key components of the system.
  • Describe the purpose of each component.
  • Explain how the components interact.
  • Include diagrams and code snippets.
Contribute to an Open Source Game Project
Contribute to an open-source game project to gain experience working with a team and applying your skills in a real-world setting.
Show steps
  • Find an open-source game project on GitHub.
  • Review the project's contribution guidelines.
  • Identify a bug or feature to work on.
  • Submit a pull request with your changes.
Expand the Combat System
Add new features to the combat system, such as new attack types, enemy behaviors, or special effects, to further develop your skills.
Show steps
  • Choose a new feature to implement.
  • Design the feature's architecture.
  • Implement the feature in Unity and C#.
  • Test and refine the feature.

Career center

Learners who complete Create a Melee Combat System in Unity and C# will develop knowledge and skills that may be useful to these careers:
Gameplay Programmer
A Gameplay Programmer brings game mechanics to life, implementing character controls, enemy behaviors, and interactive elements. This course helps build a foundation in creating a third-person melee combat system using Unity and C#, directly applicable to the role of a Gameplay Programmer. The course's emphasis on modularity and clean coding practices aligns with the need for maintainable and scalable game code. You'll learn to architect data-driven systems using Scriptable Objects, a core skill for designing flexible gameplay elements. The bonus lectures are icing on the cake. Creating enemy AI using a finite-state machine, as taught in the course, is a widely used technique you can apply. The course is particularly useful for aspiring Gameplay Programmers who want practical experience in implementing combat systems.
Indie Game Developer
An Indie Game Developer works independently or in a small team to create and publish their own games. This course is directly applicable to Indie Game Developers, providing a comprehensive guide to creating a third-person melee combat system in Unity. The course covers essential aspects of game development, including character controllers, combat mechanics, AI implementation, and data-driven design with scriptable objects. The step-by-step approach and emphasis on clean coding practices will help Indie Game Developers. The course emphasis on modularity makes it perfect for indie game development.
Combat Designer
A Combat Designer is responsible for designing engaging and balanced combat mechanics in video games. This course provides a hands-on approach to creating a third-person melee combat system, giving you a practical understanding of the elements that contribute to compelling combat. Architecting attacks using Scriptable Objects, as taught in the course, enables designers to create and edit different attack combos without affecting the code. The course’s emphasis on customizable combat systems and enemy AI helps Combat Designers to explore various design possibilities. A Combat Designer benefits from the course's focus on modularity and data-driven design, which will enhance a designers workflow.
AI Engineer
An AI Engineer develops and implements artificial intelligence solutions. This course is excellent for AI Engineers who want to apply their skills to game development, specifically in creating intelligent combat behaviors. The course focuses on designing enemy AI using a finite-state machine, a fundamental technique in game AI. You'll learn to implement coordinated attack strategies, improve combat movement, and create AI agents that react dynamically to player actions. The course is especially useful for AI engineers who want to specialize in AI or seek practical experience implementing AI systems.
AI Programmer
An AI Programmer specializes in creating intelligent behaviors for non-player characters. Creating a melee combat system in Unity, as taught in this course, helps enhance an understanding of AI implementation in games, specifically for combat scenarios. You will learn to design enemy AI using a finite-state machine, which is a cornerstone technique in game AI. The course's focus on coordinated enemy attacks and behaviors, such as circling and attacking one at a time, will enhance the skills of any AI Programmer. The course may be helpful for AI Programmers seeking to expand their knowledge of combat AI techniques and state machine implementation.
Game Programmer
A Game Programmer is a versatile role involving the implementation of various game systems and features. Learning to create a melee combat system with Unity and C# in this course helps build a strong foundation in gameplay programming. The course covers many valuable game programming concepts. The emphasis on clean coding practices and modular design will help Game Programmers write maintainable code. Game Programmers seeking to broaden their skills in combat systems and AI implementation may find this course useful.
Animator
An Animator brings characters and objects to life through movement and visual effects. This course helps Animators collaborate effectively with programmers by providing an understanding of how combat systems are implemented in Unity. You'll gain insight into animation setup, character movement, reacting to attacks, and creating combos. The course's focus on modular design helps Animators appreciate the flexibility needed for implementing animations in a game engine. Understanding the technical aspects of combat systems will help Animators and contribute to more realistic and engaging animations for game characters.
Technical Designer
A Technical Designer bridges the gap between design and programming, implementing gameplay features and tools. This course in Unity and C# may help a Technical Designer by providing hands-on experience in creating a third-person melee combat system. You will learn to architect data-driven systems using Scriptable Objects, enabling designers to create and modify gameplay elements without coding. The course helps build skills in enemy AI implementation, combat mechanics, and controller input, which are essential parts of a Technical Designer's toolkit.
Game Designer
A Game Designer is responsible for the overall vision and design of a video game. This course helps Game Designers understand the intricacies of creating a third-person melee combat system, providing a deeper appreciation for the technical aspects of gameplay. You'll learn about character controllers, AI implementation, combat mechanics, and data-driven design. The course helps Game Designers to make informed decisions about combat mechanics. The course is useful for designers who want to learn more about the technical aspects of game programming.
Software Developer
A Software Developer creates and maintains software applications. This course in Unity may help a Software Developer by applying their coding skills to develop interactive game systems. You'll learn to create a third-person melee combat system with features like combos, counterattacks, and intelligent enemy AI, which provide practical experience in software development. The emphasis on modularity and scalability in the course aligns with software development best practices. The course may be helpful for Software Developers who wish to familiarize themselves with game development.
Software Engineer
A Software Engineer applies engineering principles to develop software solutions. While this course focuses on game development using Unity and C#, it provides an opportunity to apply software engineering principles in a practical context. You'll practice clean coding, modular design, and data-driven architecture, all of which are valuable skills. Creating enemy AI using a finite-state machine helps Software Engineers in designing complex systems. Software Engineers interested in game development or seeking to improve coding skills may find this course useful.
Virtual Reality Developer
A Virtual Reality Developer creates immersive experiences for users of virtual reality platforms. This course may help Virtual Reality Developers by teaching them how to create interactive combat systems that can be adapted for virtual reality games. The course covers essential aspects of game development, including controller input, combat mechanics, and enemy AI, which are useful skills for building engaging virtual reality experiences. Understanding the technical aspects of combat systems will contribute to more realistic and engaging interactions in VR environments. You'll be well aware of the character controller.
Level Designer
A Level Designers craft immersive and engaging game environments. While this course focuses on combat mechanics, it indirectly helps Level Designers by providing a solid understanding of how combat systems function within a game world. Knowing how enemy AI works, how attacks are performed, and how characters move helps Level Designers create environments that support and enhance gameplay. The course may be useful for Level Designers who want to improve their understanding of how combat systems influence level design.
Simulation Engineer
A Simulation Engineer creates computer-based models to simulate real-world systems. Although this course focuses on game development, the underlying principles of creating a combat system may be applied to creating simulations of physical interactions. You will learn to create intelligent AI agents and model their behaviors, skills which are relevant to simulation engineering. Understanding how to create a third-person melee combat system helps improve modeling skills. Simulation Engineers who want to apply their skills in interactive simulation may find this course useful.
QA Tester
A QA Tester ensures the quality and stability of a software product by identifying and reporting bugs. This course may help QA Testers working on games by providing insight into the inner workings of a combat system. Understanding how the system is designed can enable QA Testers create targeted test cases. Knowing about enemy AI, attack animations, and controller input, can help QA Testers discover edge cases and potential issues. The course may be useful for QA Testers who want to improve testing skills for complex game systems.

Reading list

We've selected one books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Create a Melee Combat System in Unity and C#.
Provides valuable insights into common design patterns used in game development. It covers topics like the State pattern (relevant to enemy AI) and the Command pattern (useful for input handling). While not strictly required, it offers a deeper understanding of the architectural choices made in the course. This book is more valuable as additional reading to improve your understanding of game design.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser