Mô tả

Making games is fun but there is nothing more frustrating than adding new code to create a new game mechanic just to have the old code break. At this point it stops being fun and bug search begin - which honestly is the least fun thing to do when you could instead design a new level for your game. That is why it is so important to learn how to create maintainable and extensible code base for your game. If you search for a solution you will find Design patterns and SOLID principles. If you have every tried to learn design patterns you surely know that it is not intuitive when to use it. Each presents a solution but requires time and additional code to work. Implementing them just for the sake of it is just a waste of time - so when should we use them? The answer is - when adding new features or extending the old ones seems like a lot of work and effort.


In this course you will learn how to use state pattern as a base to create your character controller and how to refactor your code to other design patterns when you can see that adding new feature starts to be "painful" and unintuitive. At the end you will know the way of thinking behind the refactoring process and behind the decision when to use design patterns.

You will learn how to write decoupled classes - meaning that class A doesn't rely on Class B but if they both exist they can communicate witch each other to create our desired game mechanics.

This is an Intermediate course about creating a maintainable and extensible codebase and in effect a full 2d platformer game. You should know your way around Unity and feel comfortable coding in C# using Visual Studio IDE.

You will learn how to:

  • Create a character that can move and jump and extend it's character controller with new features like: climbing behaviour, attack logic etc.

  • How to reuse players character controller for enemies

  • How to create 3 types of enemies as well as a end level boss

  • How to use factor method pattern to make your code more maintainable

  • How to use Strategy pattern to implement simple AI system

Specific platformer features that we will implement:

  • picking up resources

  • respawn system

  • adding platforms with one-way collider

  • creating parallax effect for our level

  • melee and throwable weapons

and much more!

If for any reason you don't enjoy the course you have 30 days from the purchased date to get your money back - no questions asked.

I hope to see you in the course :)

-Peter

Bạn sẽ học được gì

Yêu cầu

Nội dung khoá học

27 sections

Introduction

6 lectures
Content of this course
04:52
Resources used to create this course
00:52
How to use project files and ask Questions
04:39
How to use github repository
01:39
Rating the course and getting a refund
01:44
Project setup
06:27

Working with Tilemaps

10 lectures
Section 2 - Introduction
01:48
Exploring the assets
05:53
Update - Importing tiles for the Tilemap
00:22
Setting up tilemap
04:11
Editing tilemap
05:38
Creating ground
08:22
Adding Background
04:45
Sorting Layers
07:41
Setting camera
03:01
Project files so far
00:08

Basic Character movement

12 lectures
Section 3 - Introduction
02:04
Creating player agent setup
07:14
Setting Physics 2D collision layers
08:53
Player Input Script 1
08:25
Player Input Script 2
04:46
Player Input Script 3
09:08
Creating Agent scripts to move the player
08:07
Animations: Idle & Run
10:19
AgentAnimations script
10:12
Flipping Player Sprite when moving left
07:29
Character gets stuck to a wall!
02:48
Full Project so far
00:01

Making character movement system extendable

9 lectures
Section 4 - Introduction
02:51
Problem with extending the character controller
08:05
What is state pattern
06:42
Creating State script
14:04
Creating Idle State
07:38
Creating MovementState P1
10:21
Creating MovementState P2 - Adding acceleration
10:55
Refactoring Agent script to state pattern
12:54
Project files so far
00:02

Adding jumping mechanic

16 lectures
Section 5 - Introduction
03:53
Challenge: Adding animations
03:19
Solution: Adding animations
02:56
Grounded Detector - Idea
05:22
Ground Detector - Gizmos
12:51
Ground Detector - Detection
08:34
Adding jump and fall state
04:00
Jump State class - Challenge
02:53
Jump State class - Solution
06:20
Jump State - Better Jump
07:05
Testing Jump
05:43
Fall state class - Challenge
03:48
Fall State class - Solution
06:48
Finishing Fall State
09:24
AgentData SO
09:29
Project files so far
00:02

Cinemachine camera setup

5 lectures
Section 6 - Introduction
01:04
Creating a 2D Cinemachine camera
05:21
Improving the camera setup
08:45
Adding Camera confiner
07:29
Project files so far
00:02

Creating Level 1

9 lectures
Section 7 - Introduction
02:19
Challenge - Creating more ground
03:46
Solution - Creating more ground
04:41
Adding platforms - basic setup
08:33
PlatformEffector 2D
09:07
Adding a ladder
11:33
Adding map details
12:12
Adding Parallax Effect to the background
06:30
Project files so far
00:02

Climbing Mechanic

7 lectures
Section 8 - Introduction
01:28
Adding Climb Animation
04:50
Can I climb?
15:55
Climbing state - Challenge
05:01
Climbing state - Solution
13:21
Transitioning to Climbing state
09:47
Project files so far
00:02

Adding player UI

10 lectures
Section 9 - Introduction
02:40
Creating Player Canvas
07:20
Text Mesh Pro - adding font
05:18
Adding Health UI
11:42
Challenge - Adding Points UI
02:20
Solution - Adding Points UI
07:31
Health UI Script
10:15
Point UI Script
03:45
Player UI Script
03:47
Project files so far
00:02

Respawn system

9 lectures
Section 10 - Introduction
01:57
Idea behind respawn system
02:29
Respawn Point Script
10:46
Respawn Point Manager
06:38
Pit Collider
07:35
Respawning the Player
08:03
Placing Spawn Points on the map
07:06
Respawn Helper
06:51
Project files so far
00:02

Adding Music and Audio Feedback

9 lectures
Section 11 - Introduction
02:24
Background Music
05:16
Audio mixer
06:13
Adding Animation Events
08:18
Step sound Audio Feedback
11:28
Jump Sound
04:15
Challenge - Land on the ground
02:18
Solution - Land on the ground
06:05
Project files so far
00:02

Weapons system

11 lectures
Section 12 - Introduction
02:49
Weapon Class Diagram
07:41
AgentWeaponManager script
12:54
Agent Weapon gameobject
04:12
WeaponStorage
06:19
Creating Weapon Data
08:43
Melee weapon and IHittable
07:32
Creating specific weapon - Club
07:07
Challenge - Use weapon in the State class
01:49
Solution - Use weapon in the State class
03:50
Project files so far
00:02

Attack State

8 lectures
Section 13 - Introduction
00:49
Attack animation
09:52
Creating Attack State
13:20
Creating Attack State p2
04:38
Challenge - Transition to attack state
02:25
Solution - Transition to attack state
06:07
Testing Ihittable
16:04
Project files so far
00:02

Hit & Die State

12 lectures
Section 14 - Introduction
01:45
Factory method pattern - Improving the state pattern implementation
18:25
Damagable script
09:38
Initializing player health
06:44
Challenge - Connecting to UI
00:58
Solution - Connecting to UI
03:33
Hit & Die animation
05:36
GetHitState
06:12
Die State
10:34
Die & GetHit states transitions
10:45
Adding feedback
05:02
Project files so far
00:02

Adding a patrolling enemy

14 lectures
Section 15 - Introduction
01:57
Reusing Agent prefab
07:19
Adding Animator Override
14:13
Enemy Agent Data SO
04:00
Strategy pattern - Enemy AI design
06:21
IAgentInput
04:58
AIEnemy script
04:25
AIPatrollingEnemyBrain
05:13
Patrol Behaviour
09:46
End Platform / Obstacle Detector
11:41
Attack Behaviour
05:38
Melee range detector
10:58
Finishing Lizard Enemy
14:38
Project files so far
00:02

Adding Feedback To Fighting system

13 lectures
Section 16 - Introduction
01:59
Introduction to URP
08:25
Creating a Solid Color shader
16:37
Using the solid color shader
09:24
Knockback Feedback
08:10
Challenger - Temporary immortality
02:15
Solution - Temporary immortality
10:16
AI fix
10:55
UI scale animation feedback
16:23
Pickable items script
08:16
Pickable health item prefab
13:24
Spawning Pickable on enemy death
10:57
Project files so far
00:02

Adding range weapons

9 lectures
Section 17 - Introduction
01:25
Idea behind weapon system
03:03
Boomerang prefab
14:40
Range Weapon Data
08:23
Picking up a weapon
08:57
Challenge - Swapping weapon
01:44
Solution - Swapping weapon
09:37
Swapping Weapon Animations
08:31
Project files so far
00:02

Adding pickable points

5 lectures
Section 18 - Introduction
00:44
PlayerPoints script
12:09
Challenge - Pickable bone prefab
01:50
Solution - Pickable bone prefab
05:39
Project files so far
00:02

Adding a shooting enemy

8 lectures
Section 19 - Introduction
01:14
Reusing Patrolling enemy
11:50
Static enemy animations
08:45
Static enemy Detector
16:17
Challenge - Shoot behaviour
02:06
Solution - Shoot behaviour
10:52
Testing
07:48
Project files so far
00:02

Adding main menu

11 lectures
Section 20 - Introduction
01:49
Creating Main Menu
10:12
Challenge - Menu background
01:36
Solution - Menu background
02:06
Adding Logo
03:16
Adding Buttons
05:14
Shake animation
06:20
Moving Clouds Prefab
08:02
Placing clouds
05:55
Cloud Spawner
15:38
Project files so far
00:02

Level management system

8 lectures
Section 21 - Introduction
01:46
Creating Level Management script
16:11
Challenge - Win Scene
01:22
Solution - Win Scene
03:41
Adding Transition to level 2 sprite
05:51
Adding world space canvas
05:07
Exit Level Transition script
07:00
Project files so far
00:02

Save system

12 lectures
Section 22 - Introduction
01:56
Idea behind saving system
06:07
What are player prefs
03:59
Save system
11:41
SaveSystemManager & GameManger
15:27
Saving in GameManager
04:03
Continue button logic
06:38
ISaveData
06:57
Challenge: Saving points
01:54
Solution - Saving points
04:13
Saving Weapons
12:46
Project files so far
00:02

In-game menu

5 lectures
Section 23 Introduction
01:09
Adding Player In-Game Menu
07:03
InGameMenu UI script
05:09
Connecting InGameMenu script
10:10
Project files so far
00:02

Adding Level 2

9 lectures
Section 24 - Introduction
01:43
Level 2 Background
10:05
Challenge - Finish Background
01:25
Solution - Finish Background
04:12
Basic ground tilemap
06:38
Creating Custom platforms
05:47
Adjusting collider script
10:50
Platform prefab
05:26
Project files so far
00:02

Adding flying enemy

11 lectures
Section 25 - Introduction
02:04
Idea of a flying enemy
01:21
Bug fix - UI scale animation
04:05
Flying enemy prefab
09:20
Fly state
13:53
Patrol Path script
15:48
Preparing patrol path
03:24
Patrol Path Behaviour
15:30
Challenge - Place flying enemies
00:58
Solution - Place flying enemies
04:25
Project files so far
00:02

Boss fight

13 lectures
Section 26 - Introduction
02:26
Boss Prefab - Animations
10:01
Boss Prefab - Colliders
10:07
Detection Player the In Area
07:28
AI Data Board
11:08
Boss AI Brain
10:04
Idle, Wait & Attack behaviour
10:33
Charge Behaviour
08:11
Boss Weapon, Boss Agent Data & Test
05:36
Boss camera confiner
11:31
Challenge - Boss health UI
04:04
Solution - Boss health UI
14:55
Level Exit - End project files
07:24

Extra - New Input System

3 lectures
P1 - configuration
16:30
P2 - PlayerInputSO script
14:43
P3 - Integration with our game
14:29

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.