
Embark on a hands-on journey to build a 2D roguelike in Unity, from a custom art character and responsive joystick to a customizable wave system, enemies, weapons, and player stats.
Plan and design an arena shooter roguelike by outlining arena collisions, vegetation, weapon types, player controls, enemy waves, and a wave manager, then set up version control with GitHub desktop.
Learn to set up source control with GitHub Desktop for a Unity 2D project, create a repository, apply a Unity gitignore, and commit.
Open Unity, set the build target to Android or iOS, import the starter pack, and arrange inspector, hierarchy, and project window to preview your game on a device.
Learn to create a 2D player in Unity by rendering a sprite with a sprite renderer and configuring the transform for position, rotation, and scale, plus prep a player controller.
Apply 2D physics to Dave by adding a Rigidbody2D, freezing rotation, and using a player controller script to set velocity, while protecting the component with serialize field.
Control Dave with a mobile joystick by applying the joystick's get move vector to his velocity, while the canvas scales to screen size and time.deltaTime smooths movement.
Create a reusable mobile joystick in Unity by building a new scene, adjusting a responsive canvas with scale with screen size, and adding an outline, knob, and C# script.
Position the mobile joystick zone in the bottom half of the screen, detect pointer down events, and move the joystick outline to the click using input.mousePosition.
Finalize the mobile joystick by implementing show and hide methods and a controlled update to move the knob when visible. Use a canControl flag to optimize input handling.
Polish the mobile joystick by computing move magnitude, clamping it within the outline, and exposing a get move vector method for movement in the next lesson.
This lesson demonstrates a Unity 2D camera that follows Dave in an arena, clamping near edges so the camera preserves its prior position while keeping both Dave and enemies visible.
Attach a camera controller to the main camera to follow Dave in a 2D orthographic view, using fixed and late update to track the target.
Implement a clamped camera follow that tracks Dave within defined x and y bounds, using a Vector2 min max and clamp logic, with safeguards for missing targets.
Create a rustic arena by adding and arranging wall sprites, then apply 2D colliders and a rigidbody to enforce collisions with player and walls, while considering performance of collider choices.
Master render order in Unity 2D using sorting layers and order in layer to display walls and player, tune joystick alpha, and set up tilemap with camera and player controls.
Create and configure a Unity 2D tile map, paint tiles with a palette, adjust pixels per unit, add a tile map collider, and test player collisions.
Polish the arena by refining the scene with greenery, vegetation, and a shader graph, then place and rotate tiles to form rounded corners and colliders on the tilemap.
Beautify the arena by importing Riot Games’ free assets, adding bushes and grass, slicing sprites, and adjusting pivots to control rendering order for a more dynamic scene.
Learn to fix sprite sorting by offsetting pivots to the bottom center and using a Sprite Sorter that sets order in layer from y-position.
Explore how to use Unity's built-in sprite sorting with a pivot-based sort point and custom axis transparency to render in front or behind, and streamline movement with Vector2.MoveTowards.
This appendix compares 2d colliders—circle, box, capsule, and hexagonal polygon—testing 2000 instances to measure performance, showing circles are fastest, polygons slowest, and collisions impact fps.
Refactor the player by separating rendering from logic, creating a dedicated 'Dave render' object, and organize the scene hierarchy for environment, UI, gameplay, and managers; test the game.
Configure Unity build and player settings for landscape orientation and 32-bit ARM support, then test via USB debugging and implement a 60 fps target with a game manager.
Add a first enemy that follows the player using a separate movement script and an enemy renderer with a sprite sorter, plus a new player script to locate the player.
Explore how to destroy enemies on proximity using distance checks and a player detection radius, visualize it with gizmos, and organize logic with private follow and try attack methods.
Create a Unity 2d particle system that bursts from the enemy on death, color particles to match the enemy with a circle texture, emitting a one-shot burst with randomized sizes.
Implement the pass away logic to unparent and play the death particle system before destroying the enemy, with a planned refactor of the movement script and pooling for reuse.
Add a spawn indicator to reveal where enemies will appear by swapping to a dedicated sprite, centering and scaling it while hiding the enemy renderer during the spawn sequence.
Learn to use LeanTween to scale a spawn indicator, loop the animation, and reveal the enemy on completion while hiding the indicator.
Complete the spawn sequence by using a has spawned flag to control enemy movement, follow the player, and attack after spawning, with a security check and inspector-based setup.
Learn to implement enemy attack logic in a Unity 2D game by adding damage, attack rate, and a timer using time.deltaTime, then test, debug, and prepare for refactoring.
Refactor the enemy into modular scripts, create an enemy prefab, and wire movement, attack, and spawn logic so multiple enemies can reuse components and visuals.
Implement a player health system that processes damage from enemies, clamps health to zero, triggers a pass away, and integrates a health bar UI with structured scripts.
Set up a private serialized max health field for the inspector, initialize health to max, and drive a top-left health slider in Unity using a 0–1 ratio to reflect health.
Add a text overlay on the health bar with Text Mesh Pro, configure font, auto size, and outline. Update the health UI in code and test scene reload.
Add your first melee weapon and learn to aim at the closest enemy by aligning the weapon's up vector, while separating rendering from logic in a Unity 2D roguelike.
Learn to find the closest enemy by type and aim at it using two approaches. Practice filtering inactive enemies, computing distance, and selecting the target via minimum distance.
Detect enemies within a weapon’s range using Physics2D.OverlapCircleAll with an enemy layer mask, then get the Enemy component to target the closest foe.
Learn to smooth weapon aiming in Unity by lerping the weapon's up vector toward target or closest enemy, refactor into auto aim and closest enemy methods, with delta time tweaks.
This lesson demonstrates the bad way to animate a weapon using keyframes and rotation, showing how the animator can override aiming and movement if not used carefully.
Learn to create clean animations in Unity by unparenting the weapon and using an animation parent. Record keyframes, adjust the pivot, and sync with auto-aim for smooth weapon rotation.
Learn to detect enemies with a hit detection position and radius on the weapon, using them during the attack animation to destroy nearby enemies.
Learn how the weapon damages enemies using a takeDamage method, adds a damage property, and reduces enemy health until defeat, with health shown via Text Mesh Pro.
Improve your weapon attack in Unity by removing loop from the attack animation, adding an idle state, and implementing a state machine with start and stop attack and animation events.
Keep track of attacked enemies in a Unity 2D game by using a damaged enemies list to prevent double hits, add enemies after attacking, and clear the list each cycle.
Prevent enemy pushes and world-bound breaches by adjusting colliders, layers, and the physics 2d collision matrix, then tune attack speed with animator speed and attack delay for future damage particles.
Create the first damage particle by removing the enemy health text, setting up a text mesh pro label, and using an animator to bounce and fade to display damage.
Learn to build the first damage text particle by wiring an animator, TextMeshPro, and inspector buttons, then randomize damage values and ensure smooth idle transparency for on-screen hits.
Create a damage text manager to spawn damage text particles from a prefab using instantiate with a parent. Randomize spawn positions and use quaternion.identity for rotation; test by clicking play.
Learn to link damage events to visual feedback by using actions, subscribing to on damage taken, and spawning damage text and particles at the enemy position, with proper rendering order.
Learn how to implement object pooling with a damage text pool to boost performance in Unity, covering create, get, release, and destroy actions, activation on get, and one-second delayed release.
Fixes enemy spawning by enabling the collider after spawn, updates the weapon to aim at enemies, and switches to a box collider with overlap box all for accurate hit detection.
Learn how actions in Unity C# decouple code by using delegates that encapsulate methods with no return value, and guard against nulls with checks or the null-conditional invoke.
Add arguments to actions and test with increment and double integer methods. Pass integers to actions to enable decoupled code.
Learn to decouple game logic using actions and events, make actions static, subscribe listeners in audio and UI managers, and safely unsubscribe in onDestroy for health updates and damage feedback.
Hey Guys, Welcome to the Ultimate Journey into the creation of a 2D Roguelike game in Unity !
If you want to create an Amazing Roguelike game similar to Vampire Survivors, Brotato or Survivor . io, or simply take the source code, reskin it, and publish it, (...) you’re at the right place !
In this course, we will embark on a Thrilling Adventure through every aspect of game development, from Fundamental Mechanics to Advanced Features that will bring your game to life, and Drastically Improve your Game Development Skills.
First off, you will learn how to create a Safety Net that will save you HOURS, Source Control.
You will learn how to use Github Desktop so that you can have Local Backups of your game, and prevent any unhappy accident.
Once this is correctly setup, We can have fun !
You will learn how to Create a 2D Character using custom made art, Thank you Alex, Animate it, and Control it with a Responsive Joystick.
We will then add Enemies wandering around, looking to exterminate us, but We are not going to back down!
We will add Melee & Ranged Weapons so that we can properly defend ourselves.
And if we ever face tougher enemies, we can still Merge our Weapons and make them Stronger.
You will learn how to create a Fully Customizable Wave System, so that you decide which enemies spawn when.
Like any respectable Roguelike, and in line with Vampire Survivors or Brotato, our character will have Stats.
For this course, I’ve decided to add the following ones
Attack
AttackSpeed
CriticalChance
CriticalPercent
MoveSpeed
MaxHealth
Range
Health Recovery Speed
Armor
Luck
Dodge
LifeSteal
but we can still add more if you’ve got ideas, so Feel free to Contribute!
To manage all of these Player Stats, we do need a Great Code Architecture right ?
Of course we do !
And you are also going to master that !
You will learn some of the Best Coding Practices to make for a SOLID basis, that will allow you to expand on the game, and jump boost your next one.
You won’t use public variables everywhere, this is not healthy
Instead, you will finally learn how to correctly use private, protected, static, override, virtual & abstract keywords.
Inheritance, Polymorphism, Interfaces & Scriptable Objects will make maintaining our code way easier and enjoyable compared to writing spaghetti code and dealing with whatever mess we would have created…
You will learn how to Manage the Flow of the Game correctly using a Game Manager, and Game States, so that you can correctly configure any system, at each stage of the game cycle.
To Manage all of the weapons & Items, we will create a versatile Inventory System, and give it a nice display with Double Sliding Panels !
Talking about that, it’s time to mention the User Interface. I can assure you that it won’t have anymore secrets to you.
You will learn how to Layout your elements so that they fit any screen size
Animate the UI the right way with interchangeable animations
Master Scroll Views & the different Layout Components so that your UI actually matches your Design (by the way, I came up with a super easy way for that)
And again, DOUBLE SLIDING PANELS !!!
We will add a sweat Character Selection panel, where players can purchase… characters of course with a Premium Currency.
Because yeah there is the candy, the currency used to purchase weapons & items during the battle, but this can’t be used for characters.
So I’ve decided to show you how to manage Multiple Currencies!
This is actually a good thing for the future of the course “Wink wink”
Cherry on the Top
You will learn how to polish the game, and make it shine. We will add
Camera Shake
Make use of Object & UI Shader Graphs (these are used to create the scrolling pear texture, sweat huh ?)
Sound Effects
Haptics (Bzzt Bzzt)
Particles
Damage Floating Text
Color Palettes
All along the way, I will give you some nice Tips & Tricks that will help you code Faster, in a More Consistent way & make your Game Dev Journey more Fun !
There’s even more to the course, you can scroll through the Curriculum because I also need to keep some things secret to spark your curiosity right ?
Are you Ready to Level Up your game development skills and create an Exceptional Roguelike Game?
Join us on this exciting journey, Enroll now!
Extra Packages !
I’m giving you 2 Hand Made Packages “Mineral” & “Sijil” for free in this Course.
Mineral will let you color your folders to make your experience more enjoyable.
Sijil will make Saving & Loading a breeze ! (No More PlayerPrefs ! (I will still show you how to use them though… Just in case!))
P.S. : You can also grab the Complete Source Code attached to the last lesson of the course (The one just before the Bonus Lecture), just sayin’