• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    C#
  • Created almost 6 years ago
  • Updated 4 months ago

Reviews

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

Repository Details

Svelto.ECS and Svelto.Tasks Mini Examples for Unity

Svelto.ECS.MiniExamples

New Mini Examples for Svelto.ECS.

These examples use the last beta version of unity available at the moment of the update.

Warning: these examples may use using unofficial versions of Svelto that you won't find on the main repository until officially released.

🔴Example 1: Doofuses Must Eat (Unity Version)🔴

Image

Object-less pure ECS example that shows the basics of Svelto.ECS.

Attention this demo is presented in multiple versions thanks to its flexibility. this demo is for advanced users, other demo are less overwhelming

Article:

http://www.sebaslab.com/svelto-mini-examples-doofuses-must-eat/ (obsolete now, new article incoming)

Goals of the SveltoOnDOTS example are to:

  • intoduce to the concept of entity descriptors, entity structs and groups.
  • Show the integration with DOTS ECS, shows the use of Svelto.Tasks 2.0 (alpha state)
  • show the integration with DOTS Jobs and Burst (using Svelto.ECS 3.0)
  • test Full jobified/burstified code with Svelto ECS 3.0
  • test integration with IL2CPP

Goals of the GameObjects example are to:

🔴Example 1: Doofuses Must Eat (Stride Version)🔴

Goals of the Stride example are to:

  • show a complex integration with an engine different than Unity (Stride Engine)

Goals of the Stride Compute Sharp example are to

🔴Example 2: The classic Survival demo (Hybrid ECS)🔴

Image

Basic integration with Unity GameObjects and Monobehaviours.

main article: https://www.sebaslab.com/the-new-svelto-ecs-survival-mini-example/

Goal of this example:

  • show the integration with OOP platforms (Unity in this case) throught the use of OOP abstraction layers.
  • Test WebGL support

I used the Survival Shooter Unity Demo to show how an ECS framework could work inside Unity. I am not sure about the license of this demo, so use it only for learning purposes. Most of the source code has been rewritten to work with Svelto.ECS framework. The Survival Demo is tested with the latest version of Unity, so I cannot guarantee that it always works.

  • Note: The purposes of this demo is NOT to show how to write fast code. In fact most of the solutions you will find in this demo may not be optimal. Svelto ECS is used only to wrap high level code as all the low level functionalities are executed through standard gameobjects.

Example 3: GUI and Service Layer (Hybrid ECS for GUI)

Integration with Unity UI and Svelto entities 3.0

Goal of this example

  • Show how EntityStreams work to publish data changes.
  • Show how to enable databinding with ExclusiveGroups.
  • Show how to setup a data oriented GUI with nested prefabs.
  • Show a basic usage of the Svelto.Services (https://github.com/sebas77/Svelto.Services)

Main article: http://www.sebaslab.com/svelto-miniexamples-gui-and-services-layer/

UI and ECS is an on going problem to solve. I have some better solutions than what proposed in this example now.

🔴Example 4: Pure .net + SDL example🔴

Goal of this example

  • Show how to use Svelto outside unity in an advanced scenario
  • Show how to use efficently group compounds

Image

Example 5: Hello World (previously called Vanilla)

Basic Platform Agnostic Svelto.ECS 3.0 example

  • Goal: Shows the very foundation of a simple entity and engine logic, without any Unity or other platform dependency (pure .net). This example won't cover all the aspects of SECS, but only the basics.

🔴Example 6: Abstract Object Oriented Code🔴

  • Goal: this example shows the two main strategies to abstract OOP code. Mixing the two strategies will result in the least boiler plate and fastest code.
  • Fist integration wraps gameobjects through the use of EntityViewComponents like seen in MiniExamples 2 Survival. Attention EntityViewComponents and Implementors are NOT reccomended to use over the second approach.
  • Second integration shows a more efficent approach, where pure ECS is used as much as possible and engines objects are synched only as late as possible.

🔴Example 7: Awkward foundation for a possible defense game built with the awesome engine that Stride is🔴

image

🔴Example 8: Run Svelto.Engines on GPU using ComputeSharp🔴

🔴Example 9: Simulation🔴

3 version of this demo are available:

  • Unity groups only version

  • Unity groups and filters version

  • Unity groups and filters version with Burst

  • Goal: these demos are interesting because are simple and show properly how to subset entities with filters and groups

More Repositories

1

Svelto.ECS

Svelto ECS C# Entity Component System
C#
1,188
star
2

Svelto.Tasks

Svelto Tasks - C# promises compliant multi-threaded tasks runner
C#
192
star
3

-Obsolete-Lightweight-IoC-Container-for-Unity3D

New version is here https://github.com/sebas77/Svelto-IoC
C#
95
star
4

-Deprecated-Svelto.IoC

[Deprecated] Svelto IoC - lightweight Inversion Of Control container for Unity
C#
91
star
5

Svelto.ECS.Examples.Survival

Unity based example for Svelto ECS
61
star
6

-Obsolete-TaskRunner

NEW VERSION IS HERE: https://github.com/sebas77/Svelto.Task
C#
56
star
7

Svelto.Common

Shared code between the Svelto repositories
C#
37
star
8

Svelto.SignalChain.Example

a better alternative to unity SendMessage and BroadcastMessage
C#
21
star
9

Murmur3.net

32bit Murmur3 hash algorithm compatible with Unity3D
C#
14
star
10

Svelto.ECS.Examples.Vanilla

Svelto.ECS example for Net Core / Net Standard
11
star
11

Svelto.SignalChain

Facilitates communication among hierarchical UI elements
C#
9
star
12

Svelto.Ioc.Example

Example for the Svelto.Ioc library
C#
5
star
13

Svelto.ECS.Tests

Svelto.ECS unit tests
C#
5
star
14

Svelto.Tasks.Tests

Tests and Examples for Svelto.Tasks
C#
4
star
15

com.sebaslab.svelto.unsafe

3
star
16

Svelto.Benchmarks

Benchmarks for Svelto.ECS and Svelto.Tasks
C#
3
star
17

Svelto.Benchmarks.Unity

Svelto benchmarks that run in Unity
C#
3
star
18

Svelto.ECS.Examples.CacheFriendlyECSWithEntityStructs

Svelto.ECS Cache Friendly code example through the use of EntityStructs
C#
3
star
19

Svelto.Profiler.Example

2
star
20

MillionsCubes

Use SubUpdates to upload millions of cubes
C#
2
star
21

Svelto.ProfilerInjector

C#
2
star
22

svelto-ecs-inspector-unity

Svelto.ECS Agnostic Inspector that runs in a browser
C#
1
star
23

Svelto.Tasks.Examples

WIP for Svelto.Tasks 2.0, not meant for public use yet
C#
1
star
24

Svelto.Tasks.MillionPointsBenchmark

This is the executable of the MillionPoints demo that can be used as CPU benchmark :)
ASP
1
star
25

Svelto.Services

Official Svelto Service Layer
C#
1
star