
Download and unzip the pixel assets zip from GitHub, organize models and sounds into your survival 2D project's assets folder, and create a resources folder with links.txt for later use.
Create a new player controller script in Unity and implement frame-by-frame movement by updating the player's transform with a vector3 and delta time.
Create a scriptable object input reader to forward movement vectors from arrow keys to the player controller, enabling persistent, shareable input data across UI and gameplay components.
Learn to implement action delegates in Unity 2D by creating a move event that passes a Vector2 input from the input reader to the player controller.
Create a player behavior script that updates the animator's speed parameter from the movement blend, enabling automatic idle and run transitions based on player movement.
Create a skeleton enemy behavior in Unity 2D using a state machine with follow player and attack states, actions, and conditions that trigger animation changes when the player is close.
Create a follow player state action in the enemy state machine to make the enemy chase the player, wiring a follow player script and asset menu in Unity.
Initialize and wire state actions in a Unity 2D C# skeleton state, creating and loading action instances, iterating updates, and overriding follow player behavior with debug logs.
Implement enemy movement towards the player by updating the enemy transform with moveTowards using the player position and delta time, after obtaining the player position in the game manager.
Set a distance to keep between the player and enemy using a distance threshold, adjust in the inspector, and prevent collisions by returning early in the enemy's follow logic.
Implement collision handling for OnCollisionEnter2D and OnCollisionExit2D in Unity 2D with capsule colliders, using a player tag and collision attack string on prefabs.
Explore how sterilized and non-sterilized fields in Unity drive runtime values, using on after serialize and on before serialize to update and reset values in the editor.
Display player's health using a Unity slider and a C# script. Create a UI slider bar, expose current and max values, attach to the health bar, and initialize to 100.
Display damage text on the canvas to show player or enemy damage, building on the health bar, and set up TextMeshPro with a Pixel Unicode font and centered alignment.
Create an empty animation state and a transition to show the damage text only once, then use an on exit state machine behavior to destroy it.
Display damage above enemies or the player using a UI manager and a damage display script; render the damage value on a canvas.
What is Unity?
Unity is a versatile cross-platform game engine, with editor support for Windows, macOS, and Linux. The engine itself allows game development for over 25 platforms, including mobile, desktop, consoles, and virtual reality.
What Will We Build?
Prepare for an immersive journey as we dive into the creation of a compelling 2D survival game with a top-down perspective, aptly named "Undead Survival." Throughout this course, you'll not only build a game but gain invaluable insights into various game development aspects.
Project - Undead Survival:
The primary focus of this course is to guide participants in constructing an entire game from the ground up. The game's objective is to challenge players to endure relentless waves of enemies, striving to survive for as long as possible against an unending onslaught
Here's an in-depth look at what you'll construct:
Survival Dynamics: Implement a captivating survival concept, challenging players to endure relentless waves of enemies.
Scriptable Objects: Utilize Scriptable Objects for a modular and reusable game structure.
State Machine Mastery: Dive into State Machine intricacies for dynamic NPC behaviors with adaptable state transitions.
Versatile Ability System: Develop diverse player and enemy abilities with customizable stats using scriptable objects.
Enemy Spawning: Implement a dynamic enemy spawning mechanism for an ever-evolving challenge.
UI for Game Stats: Create an intuitive UI system to display crucial game statistics in real-time.
Damage and Health System: Construct a comprehensive system for balanced player and enemy health management.
Start/Options Menu: Design a user-friendly menu with navigation and protagonist selection features.
Score Screen and Replay: Implement a score screen for player achievements and seamless replay functionality.
Focus on Reusability: Emphasize creating reusable systems and components for efficient game development.
Main Goal:
The course's primary objective is to teach the creation of reusable systems applicable to various games. Emphasis is placed on the reusability of each component, fostering a deep understanding of how to construct flexible and efficient game development systems.