• Stars
    star
    588
  • Rank 73,708 (Top 2 %)
  • Language
    C#
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The DOTS project used for the presentation Converting Your Game to DOTS

AngryBots ECS

The DOTS project used for the presentation Converting Your Game to DOTS and contains an example of how DOTS could be used to replace a low performance process in your games (shooting many bullets at once, in this case). This is meant to provide a simple, targeted example. A video presentation of this project can be seen here

The basics

This project uses a combination of game objects and entities together. In this case, the player (game objets) spawns bullets (entity). There is an Enemy Spawner (game object) that spawns enemies (entities). When enemies die, they spawn particle effects (game objects).

Collision

Since the bullets and enemies are entities and the player is a game object, making them collide with the built in physics system won't work. As such, collision is handled by a system (CollisionSystem) and is very simplistic in nature. In this system general radius is used to calculate if bullets have collided with enemies or enemies with players. A more sophisticted collision algorithm, or even the new DOTS physics, could have been used, but this is meant to be a simple example and really isn't necessary.

The systems

Several systems are used to replace the monobehaviour functionality of the bullets and enemies

  • MoveForwardSystem - Moves any entity with the MoveForward component forward at some speed
  • TurnTowardsPlayerSystem - Turns enemy entities to face the player's position
  • CollisionSystem - Detects simple radius collision between bullets, enemies, and players
  • RemoveDeadSystem - Destroys any entities that have a Healt of zero or less
  • TimedDestroySystem - Destroys any entities that have run out of time to live (bullets)
  • PlayerTransformUpdateSystem - Due to the hybrid nature of the player game object, this sytem is needed to keep the entities position in sync with the game object's position

More Repositories

1

open-project-1

Unity Open Project #1: Chop Chop
C#
5,560
star
2

ShaderGraph_ExampleLibrary

A library of Shaders created using Unity's Shader Graph.
ShaderLab
1,696
star
3

ATerribleKingdom

Scripting the Timeline for games in creative ways. Includes a small RTS game build on the 'A Mighty Kingdom' assets
C#
752
star
4

MinecraftECS

This is a Workshop Project that made for a User group talk in Taiwan, It's about how to create a Minecraft like environment with huge number of blocks using ECS
C#
543
star
5

InputSystem_Warriors

Example Project for the new Unity Input System
ShaderLab
525
star
6

MachineLearningRoguelike

A small Roguelike game that uses Machine Learning to power its entities. Originally used in talks by Ciro & Alessia.
C#
431
star
7

LWRPScriptableRenderPass_ExampleLibrary

ShaderLab
247
star
8

LoadyDungeons

Demo for CCD+Addressables training and workshops.
C#
244
star
9

Presentation

No need to switch to Power Point anymore.
C#
230
star
10

Test_ShaderGraphBlog

Example Project to demonstrate Vertex Animation Shaders using Shader Graph.
C#
222
star
11

PhotoMode

A virtual photography system for creating in-game screenshots and photographic effects within Unity projects.
ShaderLab
221
star
12

AngryBots2

C#
203
star
13

URP-Defender-Character-Demo

TressFX Hair plugin (Beta), Character Package, and Hairstyles assets for Universal
HLSL
202
star
14

GalacticKittens

Get started making multiplayer games with Netcode for GameObjects
C#
180
star
15

SpaceShooterECS

The ECS project originally developed with Intel for GDC 2018
C#
150
star
16

PaddleGameSO

A demo project to showcase design patterns and game architecture using ScriptableObjects
C#
139
star
17

HDRP-Defender-Character-Demo

TressFX Hair plugin (Beta), Character Package, and Hairstyles assets for HDRP
C#
118
star
18

DOTS_Pong

This project is a simple creation of the classic Pong game with a DOTS implementation. The focus was on simplicity and using the latest entities syntax (as of 2019.3 beta and Entities 0.3.0-preview.4).
C#
117
star
19

ProceduralPatterns2D

C#
109
star
20

Pre-Baked-360

Making high quality levels for mobile platform using 360 videos and images. feel free to use it by all means.
C#
82
star
21

2D_IsoTilemaps

C#
80
star
22

UniteNow20-Persistent-Data

Example Scripts for the UniteNow 2020 Persistent Data talk
C#
60
star
23

Lightmapper-FPSSample-TheInspection

C#
46
star
24

PrefabWorkflows_3DGameKit

Demo Project showing the new Prefab Workflows: Prefab Mode, Editing and Nesting!
ShaderLab
35
star
25

PrefabWorkflows_SpiderRobots

Demo Project showing the new Prefab Workflows: Prefab Mode, Editing and Nesting!
C#
33
star
26

ParticleFeatures_2018.3

C#
30
star
27

NavMesh-Feature-Demo

The NavMesh demo for the new Unity 5.6 Navigation Features. This is the project that was used at GDC as well as Unite AMS
C#
27
star
28

UniteNow20-RuntimeProfiler

Example scripts from the UniteNow2020 Persistent Data talk
C#
21
star
29

Substacnce-Painter-To-Unity

C#
21
star
30

PrefabWorkflows_UIDemo

ShaderLab
20
star
31

blockyourfriends

C#
17
star
32

AR_Industrial

AR Foundation project showing off functionality for HoloLens 2 and mobile
ShaderLab
12
star
33

PiXYZWorkShop

C#
10
star
34

Unity-Entities-Dodge-the-Bullets

Unity Korea Entities(ECS) tutorial project
ShaderLab
10
star
35

BuffaloKing

Buffalo King is a Slot Machine game (demo) showcasing 2D animation and rigging workflows.
ShaderLab
8
star
36

ShaderGraph_HDRPNodes

C#
8
star
37

2D_RiggedCharacters

5
star
38

LightingWorkshop

C#
5
star
39

TankDotsWorkshop

Project used for the Unite India workshop on DOTS, similar to the one delivered at Unite CPH.
C#
3
star
40

ARFarm

ARFarm
Mask
3
star
41

SpriteRigging_ToonCharacters

2
star
42

DCC-RoundTripping

Digital Content Creation and round-tripping between Autodesk 3DS Max, Autodesk Maya and Unity.
C#
1
star
43

letsdev_ep1

C#
1
star
44

TooTooBaby-CartoonsUsingUnity

I will walk through how to make a cartoon show in Unity #UnityForFilm
1
star