Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 27 15:23

    Leopotam on develop

    * README: Example urls updated.… (compare)

  • Nov 22 15:23

    Leopotam on master

    Merge tag 'v20191022' into deve… * README: Info about using `ref… * EcsEntity: Fix Destroy behavi… and 4 more (compare)

  • Nov 22 15:22

    Leopotam on v20191122

    (compare)

  • Nov 22 15:22

    Leopotam on develop

    Merge branch 'release/v20191122' Merge tag 'v20191122' into deve… (compare)

  • Nov 22 15:21

    Leopotam on develop

    * Refactoring. * README: Fix l… (compare)

  • Nov 19 08:46

    Leopotam on develop

    * UnityPackage description fixe… (compare)

  • Nov 14 10:15
    jeffcampbellmakesgames closed #26
  • Nov 14 09:59

    Leopotam on develop

    * README: Old api updates. (compare)

  • Nov 14 09:54
    Leopotam commented #26
  • Nov 14 09:44
    jeffcampbellmakesgames commented #26
  • Nov 14 09:37
    Leopotam commented #26
  • Nov 14 09:36
    Leopotam commented #26
  • Nov 14 09:31
    Leopotam labeled #26
  • Nov 14 09:31
    Leopotam assigned #26
  • Nov 14 09:28
    Leopotam commented #26
  • Nov 14 08:38
    jeffcampbellmakesgames opened #26
  • Nov 06 21:46

    Leopotam on develop

    * EcsEntity: Fix Destroy behavi… (compare)

  • Oct 26 16:05

    Leopotam on develop

    * README: Info about using `ref… (compare)

  • Oct 21 23:18

    Leopotam on master

    Merge tag 'v20190922' into deve… * Cleanup previous ecs implemen… * New Ecs implementation. and 10 more (compare)

  • Oct 21 23:13

    Leopotam on v20191022

    (compare)

Leopotam
@Leopotam
btw, i thought that you returned to classic oop way due to ecs is not comfortable to use in your project
RUSshy
@RUSshy
what do you mean "2 different filters" ?
i returned to classic OOP, but i still try to experiment with ECS
i created the type because it doesn't work with reflection free more of CoreRT
Leopotam
@Leopotam
typeof(Filter) != typeof(EcsFilter<CPosition, CVelocity, CInterpolated>)
RUSshy
@RUSshy
Unhandled Exception: EETypeRva:0x00277270: Reflection_Disabled
StackTrace_AtWordInternal.Reflection.RuntimeTypeInfo.get_Assembly() + 0x2b
StackTrace_AtWordLeopotam.Ecs.EcsWorld.GetFilter(Type) + 0x64
StackTrace_AtWordArc.Client.Ecs.Systems.SInputSystem.Init() + 0x26
StackTrace_AtWordLeopotam.Ecs.EcsSystems.Init() + 0xa5
StackTrace_AtWordArc.Client.States.PlayEcs.init() + 0x3fa
StackTrace_AtWordArc.Game.register[T](T, String) + 0x2c
StackTrace_AtWordArc.Client.MyGame.init() + 0x11a
StackTrace_AtWordArc.Graphics.update(Time) + 0x30
StackTrace_AtWordArc.Engine.run() + 0x545
StackTrace_AtWordArc.Client!<BaseAddress>+0x1d1164
Leopotam
@Leopotam
is it clear?
RUSshy
@RUSshy
yes but that doesn't matter
it still is a filter
difference of enabling reflection mode or no is : ~3mb vs ~10mb
Leopotam
@Leopotam
well, then you can keep old version with optional DI
i dont want to support optional DI for all other parts like ecs-reactive and ecs-ui
now only DEBUG is optional compiler definition
RUSshy
@RUSshy
yes i understand, i keep custom version, i removed stuff for ilcpp already and other blocks of reflection
maybe stuff will change with .net 5 aot
corert is still experimental and not even supported
but it gives me great results
Leopotam
@Leopotam
any performance changes?
RUSshy
@RUSshy
explorer_aNeTKRHTmM.png
look at the size :)
for performance i get less memory usage, fast startup
there is no JIT
peak performance by default
Leopotam
@Leopotam
well, GC still here :)
Leopotam
@Leopotam
what you think about rust as main lang?
RUSshy
@RUSshy
yeah gc is annoying but with pooling and stack alloc / span / unsafe it is manageable
i got TCP server/client without allocations thanks to Span
i don't like rust syntax
maybe in the future i will try again
Leopotam
@Leopotam
pure tcp or websocket?
RUSshy
@RUSshy
TCP i exchange binary data
Leopotam
@Leopotam
websocket is binary too, text data is just one of supported types

unsafe

no way :)

RUSshy
@RUSshy
    public ref struct PReader
    {
        public int position;
        public Span<byte> buffer;

        public byte readByte()
        {
            var data = buffer[position++];
            return data;
        }

        public bool readBool()
        {
            return readByte() == 1;
        }

        public short readShort()
        {
            var ret = BinaryPrimitives.ReadInt16BigEndian(buffer[position .. (position + 2)]);
            position += 2;
            return ret;
        }
        public ushort readUShort()
        {
            var ret = BinaryPrimitives.ReadUInt16BigEndian(buffer[position .. (position + 2)]);
            position += 2;
            return ret;
        }

        public int readInt()
        {
            var ret = BinaryPrimitives.ReadInt32BigEndian(buffer[position .. (position + 4)]);
            position += 4;
            return ret;
        }
        public uint readUInt()
        {
            var ret = BinaryPrimitives.ReadUInt32BigEndian(buffer[position .. (position + 4)]);
            position += 4;
            return ret;
        }

        public float readFloat()
        {
            var ret = BitConverter.Int32BitsToSingle(BinaryPrimitives.ReadInt32BigEndian(buffer[position .. (position + 4)]));
            position += 4;
            return ret;
        }

        public string readString()
        {
            var l = readShort();
            var data = buffer[position .. (position + l)];
            position += l;
            return Encoding.UTF8.GetString(data);
        }
        public string readUTF32()
        {
            var l = readInt();
            var data = buffer[position .. (position + l)];
            position += l;
            return Encoding.UTF8.GetString(data);
        }
    }
Leopotam
@Leopotam
otherwise i can use unity NativeArray and forget about other environments
RUSshy
@RUSshy
example of my allocation free binary reader
RUSshy
@RUSshy
you only use C#?
Leopotam
@Leopotam
in unity - yes. on server - node + ts
and i still in search for not so boring system lang for tools and maybe server side code
golang is bad as for me
rust much better
RUSshy
@RUSshy
there is Swift that is coming to windows
also windows is working on high level system language
maybe answser to rust/swift
Leopotam
@Leopotam
language from ms? no. way. anymore
typescript looks good, but its just syntax sugar over javascript
i dont want to get vendor lock for one platform as ms did before
go-lang or rust-lang looks not so bad as for me