Unity 2020 Urp How To Make A 2d Roguelike Shooter

Create a fun shooting mechanic, simple enemy AI and juicy gameplay by adding visual and sound feedback

Last updated 2022-01-10 | 4.7

- Unity 2020 in 2D
- C# programming
- Game Development

What you'll learn

Unity 2020 in 2D
C# programming
Game Development
Game Design

* Requirements

* Know how to use Unity at a basic/intermediate level.
* C# intermediate level

Description

UPDATE:

In this course we tackle some intermediate topics like AI and we code it in a way that you can reuse it - which also can be a bit more difficult for beginners. The course is about creating the 2d shooting mechanic and polishing it with multiple special effects for it to be fun to play. We will create a simple AI system for the enemy using FSM, create custom Shaders, and explore why it is important for others to playtest your games and give you feedback.

Course should work with changes done to Shader Graph in version Unity 2020.


UPDATE 2:

Full project files in zip archive added to each section at the end.

Each video where we write some code now has a link to scripts on github.

Introduction:

Let's make a 2d top-down shooter in Unity 2020 using universal Rendering Pipeline and focusing on juiciness of the gameplay!

In this course beside implementing a standard game mechanics like shooting, picking up health/ammo and enemy AI we will focus our attention on adding visual and audio details into our game. URP will helps us a lot with its 2D lights system and the Shader Graph Editor which makes creating shaders (how game graphic is rendered) really easy.

While it is important to have bug free game mechanics that fits our game genre we also want to make our game stand out. Our goal is to make the game fun to the players and it is achieved only by balancing our game and making sure that our player knows exactly what is going on in the game. In this course we will focus on the latter.

Feedback is the main path that we as game designers have to communicate to the player what is going on inside the game. To make sure that our player feels like his / her actions influence the game world (Agency) we will make sure to give every action appropriate visual and audio queue. An example would be that shooting will cause the screen to shake, enemies on being hit flash and are knocked back, bullet that hits a wall will produce ricochet sound and a cloud of dust - in summary the player will hopefully have fun playing our game.

We will implement custom shaders, animations, tweens (animations using code - DoTween asset and inbuilt Coroutins), audio effects and light effects. in addition we will stricture the project in a way that you can easily balance the game by exposing important settings/values using ScriptableObjects.

To create the project we will utilize UnityEvents to make sure that we can easily add new actions to the events happening in the game from Unity inspector instead of having to modify out code. I will do my best to show you how to write object oriented, clean code so that you can easily understand it.

I encourage you to check out the free video about the outline of the course to learn more.

See you in the course!

-Peter from Sunny Valley Studio

Who this course is for:

  • Intermediate Unity developers
  • Intermediate Game Developers

Course content

12 sections • 116 lectures

Course content Preview 01:28

Make sure that you use Unity 2020! Preview 00:26

Project setup Preview 05:37

Using resources and getting help Preview 03:24

Intro - Preparing the project Preview 06:15

Camera Setup - Ghosting fix Preview 00:15

Preparing sprites for pixel graphics Preview 05:48

Preparing sprites - splitting tilemap Preview 04:34

Creating player avatar Preview 06:30

macOS users Visual Studio tip Preview 00:19

Getting input Preview 11:23

Basic Player Movement Preview 05:54

Movement Data Scriptable object Preview 07:32

Better player movement Preview 09:26

Better player movement fix Preview 00:49

Adding player animations Preview 10:35

Playing animations Preview 07:59

Getting pointer input Preview 05:20

Making player look at pointer Preview 12:22

Adding step audio Preview 11:16

Project files so far Preview 00:08

Tilemap setup Preview 08:24

Creating floor tiles Preview 07:19

Sprite sorting order Preview 04:32

Creating walls Preview 07:47

Adding collisions Preview 05:47

Adding cinemachine camera to follow player Preview 04:10

Fixing 2D light Preview 04:35

Adding Torches Preview 10:55

Adding shadows Preview 05:54

Pixel perfect camera Preview 04:56

Project files so far Preview 00:08

Preparing weapon sprite Preview 05:21

Aiming our weapon through script Preview 07:26

Rendering the weapon Preview 09:37

Fixing weapon flip logic Preview 00:30

Preparing Weapon script Preview 07:57

Using AgentWeapon script to shoot Preview 07:41

Finishing Weapon script P1 Preview 11:32

Finishing Weapon script P2 Preview 11:20

Weapon Data Scriptable Object Preview 10:01

Creating bullet prefab Preview 11:28

Bullet collisions and BulletDataSO Preview 09:00

Regular Bullet script Preview 09:16

BulletDataSO Preview 10:40

Spawning a bullet Preview 11:19

Detecting bullet collision Preview 07:18

Shoot sound effect Preview 09:55

Changing cursor icon to crosshair Preview 03:42

Project files so far Preview 00:08

Preparing enemy gameobject Preview 11:25

Shooting the enemy Preview 07:10

Enemy class and IHittable interface Preview 11:30

EnemyData Preview 07:02

Enemy Audio Preview 13:22

EnemyAI Introduction Preview 05:44

EnemyBrain Preview 12:55

State Machine architecture Preview 07:54

AI Action, Transition, Decision and State classes Preview 15:54

Adding AI structure to the Enemy object Preview 13:14

Distance decision Preview 09:16

ChaseState and IdleState Preview 09:03

Finishing the Attack state Preview 08:07

Fixing rendering issues - Transparency Sort Mode Preview 03:49

Enemy Attack player logic Preview 11:34

Adding IHittable to player Preview 09:06

FIx - Weapon Damage Preview 00:24

Project files so far Preview 00:08

What is juiciness? Preview 05:42

Feedback architecture setup Preview 08:57

Weapon feedback - muzzle flash Preview 07:10

Weapon Flash light Feedback Preview 09:39

Weapon Shake Feedback Preview 09:51

Cinemachine Camera shake feedback Preview 11:26

Bullet impact - prefabs Preview 13:35

Implementing Bullet impact feedback Preview 08:07

Minor fixes Preview 03:56

Enemy Feedback Hit - introduction Preview 03:16

Unity 2020.2 Shader Graph Changes Preview 00:17

Solid Color shader Unity 2020.2 Preview 16:03

Fixing Solid Color Shader Unity 2020.2 Preview 16:03

Dissolve shader Unity 2020.2 Preview 15:59

Improving Enemy Death Feedback Preview 09:51

PostProcessing Preview 08:20

Fixing bullet issues Preview 05:48

Adding Time Freeze feedback Preview 16:46

Player Death Animation Preview 12:22

Analyzing game testers feedback Preview 04:53

Adding knockback to enemies Preview 14:08

Bullet shell generator - object pool Preview 08:14

Bullet shell generator - implementation Preview 14:16

Background music Preview 02:23

Project files so far Preview 00:08

Creating UI layout Preview 06:59

Creating health UI Preview 10:43

Creating bullet UI Preview 08:07

Implementing health ui to our game Preview 05:10

Implementing bullet ui to our game Preview 08:34

Simple restart menu Preview 10:33

Project files so far Preview 00:08

Creating a spawner class Preview 13:13

Adding Line of sight to Enemy AI Preview 12:18

Project files so far Preview 00:08

Preparing resource scripts Preview 11:56

Item prefabs Preview 06:59

ItemDropper Preview 15:46

Making Enemy drop item Preview 06:42

Picking up items Preview 07:20

Project files so far Preview 00:08

FIX 1 - Adding Player backward movement animation Preview 15:41

Fix 2 - Building Standalone version Preview 03:09

Solid Color shader 2020.1 Preview 12:11

Fixing Solid Color Shader 2020.1 Preview 15:20

Dissolve shader 2020.1 Preview 14:52

End project files Preview 00:06

Want to learn more? - Procedural 2d dungeon generation free tutorial Preview 00:12