Skip to content

Laaksori/UnityECS_FPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityECS_FPS

A project I started after a course in which we learned about Unity’s Data-Oriented Technology Stack (DOTS) and entity systems. I got interested in data-driven design and wanted to learn more, so I created some FPS elements using components and systems.

Some videos of the project (links open on current tab)

Here's a video of the project highlighting most features it has: Link to youtube
Another video after implementing damage, health and object destruction Link to youtube

About the project

Since the entity package was overhauled right before the course started, learning material was scarce. Documentation was lacking and most user-made tutorials were outdated, but this was probably the best way to learn how to search and find information. I was very interested in designing functionality in data-driven design, using components that held data, entities that were containers for these components, and systems that processed the data in components. Since I was used to doing things in OOP, it was a nice change of pace.

Most functionalities have their own systems that are run each frame (unless there is no data to process) in certain order and all of the data are held in their own components.
For example, we have three systems related to shooting a weapon and they run in a certain order each frame (given there is data to process): FiringCooldownSystem -> WeaponChamperSystem -> WeaponUseSystem. Each weapon has a fire rate component which dictates how fast it can shoot, and if a weapon has been used it can used again after the cooldown has passed. First we reduce the cooldown, then if there is no cooldown left the weapon chambers a new bullet (unless the magazine is empty) and then WeaponUseSystem checks if the weapon is being used that frame.

About

A project to learn about DOTS package and entity systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published