Git Product home page Git Product logo

svelto.miniexamples's People

Contributors

iaincarsberg avatar sebas77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

svelto.miniexamples's Issues

Multiplayer examples?

It would be great to have at least a minimal multiplayer example with Svelto.ECS

I know that this might seem a bit beyond the scope, but:

  • Organizing network sync of ECS-based worlds quite fundamentally depends on the ECS itself and its detailed workings. Much more so than in just a OOP game where networking is mainly a question of general architecture and patterns.
  • Although networking might be seen as something platform/library-dependent, the important part is not the transport, but the most idiomatic way of syncing Svelto.ECS world between server and client.

An exception that prevents the DOOFUSES_DOTS example from working

When trying to run the DOOFUSES_DOTS example I'm getting this exception

ArgumentException: Unknown Type:`Svelto.ECS.SveltoOnDOTS.SyncSveltoToDOTSEngine` All ComponentType must be known at compile time. For generic components, each concrete type must be registered with [RegisterGenericComponentType].
Unity.Entities.TypeManager.ManagedException (System.Type type) (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManager.cs:1706)
Unity.Entities.TypeManager.ManagedException[T] () (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManager.cs:1687)
Unity.Entities.TypeManager.GetSystemTypeIndex[T] () (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManagerSystems.cs:1005)
Unity.Entities.World.AddSystemManaged[T] (T system) (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/World.cs:930)
Svelto.ECS.SveltoOnDOTS.SveltoOnDOTSEnginesGroup.AddSveltoToDOTSSyncEngine (Svelto.ECS.SveltoOnDOTS.SyncSveltoToDOTSEngine engine) (at ./Packages/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs:75)
Svelto.ECS.MiniExamples.DoofusesDOTS.SveltoCompositionRoot.ComposeEnginesRoot () (at Assets/Code/SveltoCompositionRoot.cs:100)
UnityEngine.Debug:LogException(Exception)
Svelto.ECS.MiniExamples.DoofusesDOTS.<ComposeEnginesRoot>d__3:MoveNext() (at Assets/Code/SveltoCompositionRoot.cs:103)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(ValueTuple`5)
Svelto.ECS.MiniExamples.DoofusesDOTS.<LoadAssetAndCreatePrefabs>d__5:MoveNext() (at Assets/Code/SveltoCompositionRoot.cs:155)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()

On line https://github.com/sebas77/Svelto.ECS/blob/master/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs#L72 in Svelto.ECS.

I'm using Unity 2023.1.7f1 instead of the 2023.1.0f1, but this error seems to be resulting from some facts that were known for quite some time already: https://forum.unity.com/threads/all-componenttype-must-be-known-at-compile-time.713900/ (circa 2019), so it should not be affecting this matter.

Note: This exception is not readily available to see, I had to explicitly search for why the example was silently just doing nothing, so I had to debug the code, and I put an explicit try-catch with debug output around that statement to catch the exception. Otherwise the exception is just silently ignored by Unity because it happens in another thread.

Inconsistent comment

In the 6th example (the vanilla example), the comment said ID 1 but in the code an ID of 0 is created.

    public class SimpleContext
    {
        ...
            //build Entity with ID 1 in group 0
            entityFactory.BuildEntity<SimpleEntityDescriptor>(new EGID(0, ExclusiveGroups.group0));

compile error

compile error cause missing script 'UECSEntityComponent' .
in project https://github.com/sebas77/Svelto.MiniExamples/tree/master/Example1-DOTS-DoofusesMustEat/DOOFUSES_UECS

error message: Assets\Code\DoofusEntityDescriptor.cs(6,60): error CS0246: The type or namespace name 'UECSEntityComponent' could not be found (are you missing a using directive or an assembly reference?)

aha, i fix it , new script named UECSEntityComponent, code is:

using Unity.Entities;
using Unity.Mathematics;

namespace Svelto.ECS.MiniExamples.Example1C
{
    public struct UECSEntityComponent : IEntityComponent
    {
        public Entity uecsEntity;
        public float3 spawnPosition;
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.