#archived-dots

1 messages Β· Page 238 of 1

robust scaffold
#

burst inspector crashed

#

task manager kill unity task, then reopen

#

it'll fix itself

viral sonnet
#

it's already my 2nd try. :/

robust scaffold
#

....... RIP?

#

What version of burst?

viral sonnet
#

1.7 now

robust scaffold
#

did you restart after updating burst?

viral sonnet
#

i closed unity and edited the package manifest. maybe that was dumb

robust scaffold
#

"com.unity.burst": "1.7.0-pre.1",

viral sonnet
#

yes

robust scaffold
#

hrm, still stuck?

viral sonnet
#

i'll roll back and close the burst inspector

#

well, shit. same thing

robust scaffold
viral sonnet
#

lol, yeah, I'm not getting this to run with 1.7. shit, I had it running once

robust scaffold
#

1.7 is still fairly raw

viral sonnet
#

i'm still on 2020.3

robust scaffold
viral sonnet
#

one more try with deleting the library folder

#

deleting the library folder fixed it but, no unroll

robust scaffold
viral sonnet
#

yeah

robust scaffold
#

that is odd, post your code please

viral sonnet
robust scaffold
#

hrm.............

viral sonnet
#

looks identical, right?

robust scaffold
#
[BurstCompile]
public unsafe struct SpellCastJobSIMD_GCD : IJobEntityBatch
{
    [ReadOnly] public ComponentTypeHandle<Census> GlobalCooldownEnding_ReadHandle;

    public uint tick;

    public NativeArray<uint> gcdEnding_Array;
    public NativeArray<bool> ignoreGlobalCooldown_Array;
    public NativeArray<bool> validSpell_Array;

    public void Execute(ArchetypeChunk chunk, int chunkIndex)
    {
        int chunkCount = chunk.Count;

        var globalCooldowns = chunk.GetNativeArray(GlobalCooldownEnding_ReadHandle).Reinterpret<uint>();

        MethodReadOnly(chunkCount, (uint*) globalCooldowns.GetUnsafeReadOnlyPtr());
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private void MethodReadOnly(int chunkCount, [NoAlias] uint* globalCooldowns)
    {
        for (int i = 0; i < chunkCount; i++)
        {
            validSpell_Array[i] = ignoreGlobalCooldown_Array[i];
            validSpell_Array[i] |= globalCooldowns[i] < tick;
        }
    }
}```
#

no difference

viral sonnet
#

i tried with the GetUnsafeReadOnlyPtr but got the exact same result

#

oh fuck... i see it now ...

robust scaffold
#

what?

viral sonnet
#

bool4 validspell. from a previous test ... ahhhh

robust scaffold
#

right, make sure you restart Unity as a whole if you think the burst inspector is wrong, it may not have updated

#

a bug with 1.7

viral sonnet
#

perfect simd assembly now πŸ˜„

#

man, how can you work with 1.7. This update bug is already annoying me

#

can access to blob data be vectorized? like such an array: public NativeArray<BlobAssetReference<SpellBlobRoot>> spellBlobs. unlikely without manual vectorization

#

burst not understanding structs is making this exceptionally hard 😦

robust scaffold
robust scaffold
#

but the colors of 1.7 is so nice

viral sonnet
#

true πŸ™‚

#

i've tried it like this but no simd

robust scaffold
viral sonnet
#

expected as much, kind of weird design

#

so any job that uses blobdata is not vectorizable?

robust scaffold
robust scaffold
#

Because it's an array. You cant vectorize one data, well unless that data has an array in it

viral sonnet
#

ah, right! ok, gonna try it

robust scaffold
#

Just store the Asset somewhere common, like a singleton, and then on the entity containing a SpellBlobRoot, store the index to that BlobArray<SpellBlobRoot> for the specific SpellBlobRoot... Wait

robust scaffold
#

Vectorization requires linear access. You're using random access indices to determine spell blob root. Unless you somehow sort the source Entities by index, you wont be able to vectorize

viral sonnet
#

spellBlobs.Value.ToArray() is a memcpy. no method to nativearray or to get a subarray to align

robust scaffold
#

You need to construct the blob such that it's a single universal reference that points to a collection of spell blob roots

#

And, as I mentioned before, you're randomly accessing that array so you wont be able to vectorize it anyways

viral sonnet
#

i could setup a linear access beforehand but yeah, it's not helping me much then.

robust scaffold
#

it's definitely the tradeoff you need to consider, performance or memory

viral sonnet
#

i've tested memcpy on the data before and it was taking way too much time

robust scaffold
#

im putting my minimum specs to 16GB, 32GB recommended and 64GB for best experience in my specs

viral sonnet
#

so I think that won't work out

robust scaffold
#

the denormalized method would be making a component that mirrors SpellBlobRoot and then whenever a new entity is created, you'll need to copy from a "master" version.

viral sonnet
#

damn, I really didn't get far with this. sadly all my code is reliant on the spell data

robust scaffold
#

it really is a question of performance over memory. And that's a design decision. I really cant help ya there.

haughty rampart
#

*entities. everything else dots works

robust scaffold
#

Well, not perfectly. And Entity Inspector broke on 2022.1A14. So RIP.

haughty rampart
robust scaffold
#

But now I got actually readable inspector numbers rather than dark gray text on slightly lighter gray background (EntityInspector looked nice but god damn the color choices).

robust scaffold
viral sonnet
#

dat project name 🀣

haughty rampart
#

DOTS PROGRESS

robust scaffold
#

I renamed it when the CTO reappeared and I upgraded from 2020.3 directly to 2022.1. I dont trust the auto-updater for major version changes so I create a new project then copy over the files by hand

haughty rampart
#

Entities 0.21 31st December confirmed

robust scaffold
#

Wait what?

#

No

haughty rampart
#

XD

#

Progress

robust scaffold
#

I dont believe you

#

And the source is on 0.23 already anyways

#

they wont release an old entities version

haughty rampart
#

Well......2022 works already, no?

robust scaffold
#

"""works"""

haughty rampart
#

XD

robust scaffold
#

When 2022.2 comes out and still no DOTS news, Im renaming my project to UndeadDOTS

haughty rampart
#

And then when it releases:. DOTS! ..... resurrection

robust scaffold
#

That project has originated from 2019.2. Nearly 3 full years later and it's still chugging along

#

My camera code hasnt changed since the first iteration. Nearly everything else though has been touched a few times

haughty rampart
#

What would make dots truly good? Fucking finally main camera support

robust scaffold
#

true wizards would somehow find a way to make 1 camera do everything

haughty rampart
robust scaffold
#

My greatest accomplishment was a single multipass camera

robust scaffold
haughty rampart
robust scaffold
#

triple pass camera code that also handles raycasting and click code

haughty rampart
robust scaffold
haughty rampart
robust scaffold
robust scaffold
#

I think there are plans to expose more camera settings in HR 1.0 found in the github leaks but I dont recall what

#

Camera code is fundamental Render Pipeline structure. DOTS team cant do anything fancy in camera conversion unless they want to write their own RP. And as I said earlier, people are already breaking out in wars on the forums over the separation of URP and HDRP. Imagine DOTSRP

haughty rampart
#

I'd be for it. But it needs dotshdrp first and then dotsurp

robust scaffold
haughty rampart
#

Or the render pipeline teams just implement dots support

robust scaffold
haughty rampart
#

I know

#

Still need camera support tho

robust scaffold
#

And look at how fucked DOTS is right now. Full or even partial camera integration will take years. Maybe 2025

haughty rampart
#

I'm fine with that. Just get it done eventually

#

Hell when they upgrade to .net 6 monobehaviours will be mid grade racing cars themselves XD

#

So then the copying to transform isn't that bad anymore

robust scaffold
#

how would net 6 improve performance? I would imagine any improvement is compiler side which is why burst is so good

haughty rampart
#

But normal c# gets a huge increase

viral sonnet
haughty rampart
viral sonnet
#

i said it before, i'd just be happy with their patch notes

haughty rampart
#

same

#

although it'd make it worse

deft stump
#

yo what? 0.21?

#

does it have enable/disable component?

haughty rampart
haughty rampart
deft stump
#

damn

#

I was hyped

haughty rampart
#

i still am

viral sonnet
haughty rampart
#

definitely

viral sonnet
#

sure, we can't say more really, like how good a fix is but it would be something. for example, if it adding/removing ends up being really fast I can rewrite much of my architecture

haughty rampart
#

adding / removing?

viral sonnet
#

of icomps or tags

haughty rampart
#

i would be surprised if they could get more performance there. it's a whole structural change afterall so i doubt it

viral sonnet
#

well, not the full picture adding/removing via enable/disable

haughty rampart
#

oh

#

that would be kinda nice definitely

viral sonnet
#

that could end up being quite fast and is now not really possible

haughty rampart
#

but also niche? kinda. even with monobehaviours i pretty much always only need the whole gameobject or none of it so enabling / disabling whole works

#

if you could specify an example i'd maybe better understand why that is apparently so important for so many people

viral sonnet
#

it has quite a few uses for event systems or state machines

haughty rampart
#

i guess

viral sonnet
#

might also end up being a good solution for creating many entities in a frame

#

because that has quite the shitty performance

#

also for disabling empty buffers

haughty rampart
#

'many entities' well......but only if you're talking about a few hundred thousands

viral sonnet
#

yes πŸ™‚

haughty rampart
#

which i mean even in dots you don't do that often

viral sonnet
#

depends on what is being simulated

#

or if we want to be stuck in the same games over and over πŸ™‚

#

because, I think, that is what's holding game design back

haughty rampart
#

hm. maybe. although i can't quickly imagine new game's that need this. fps' for example will probably be here for a long time. need any 100k entities every frame there?

viral sonnet
#

probably not, but think of multiplayer

#

ever played risk of rain 2?

haughty rampart
#

no but i just looked at a trailer. seems like a pretty standard multiplayer game to me

viral sonnet
#

maybe at the beginning stages but it scales up dramatically

#

100s of enemies and spell effects with 4 players

#

imagine that with a 10x scale and you end up with possible 100k entities a frame

haughty rampart
#

might be a bit overbearing for an fps / tps though

viral sonnet
#

well could be a server where not everyone is in the same space at once

#

i'm pretty sure though that it could be programmed without spawning entities, sure. but the whole approach with entities is very clean and it's a shame there's a scaling problem

#

my spell system used spells as entities in the beginning but that didn't work out. code was amazing though

haughty rampart
viral sonnet
#

it does, were it not for the problem that writing data back to the pool is way too costly

haughty rampart
#

hm, haven't checked that cause i didn't need pools yet

viral sonnet
#

there's no full memcpy of data to an archetype. at least none that I know of

#

well, I say full. at least the chunks

haughty rampart
#

do nativearrays support bools yet?

viral sonnet
#

yes

haughty rampart
#

ok. was just checking cause i was reading the unity.transport package and the documentation is pretty non-updated yet. but i wasn't sure

#

i knew burst supported bools

viral sonnet
#

not sure about unity.transport, what should hold it back of doing so?

haughty rampart
#

nah. just in the manual they stated: know: you can't use bool in a native array so you have to use a byte. but like i said. seems the docs have not been updated since version 0.1.0

#

'cause nativearrays can only hold blittable types'

viral sonnet
#

yeah, that was fixed a long time ago

#

really, are their docs that far behind? lol

viral sonnet
#

maybe they still have problems in serialization?

haughty rampart
#

they don't use them for serialization there

#

they're only for the client itself

viral sonnet
#

then I really don't understand why this line is still there

#

I'm using NativeArray<bool> for quite some time

haughty rampart
#

also if you look all the way down that page at the last annotation you see another surprise

viral sonnet
#

jobs 0.0.7? πŸ˜„

haughty rampart
#

XD

#

.....so i imagine the docs have not been updated for a few days

viral sonnet
#

"days" hehe

haughty rampart
#

XD

#

there is one thing i don't like about the mathematics library for dots

#

the devs have specifically hidden float4.xy float4.zx and all these niceties from intellisense. why. if i hadn't had checked the math library myself because i wanted to know some implementation details at some point, i would have never known these were even a thing and i'd had needed them already

viral sonnet
#

yeah, interesting choice. swizzling rules

haughty rampart
#

i mean i guess they made that choice because people could infer that these were there because shaders float4 etc have them too and unity designed these after shaders, but......usually c# only has things available that are picked up by intellisense

#

and i mean you only have to know about them once anyway but.......get to that point in the first place XD

viral sonnet
#

true

#

i feel like this design sucks to have conditional writes in a job and prevent increasing the version of the chunk every time

#

no idea how to put this inline

#

quite annoyting that getting the nativearray automatically increases the version number of the chunk. that's what you get when you design for dummies

#

now I've a damn condition everywhere. 😦

haughty rampart
#

there should be an advanced variant tbh

viral sonnet
#

which is even more dummy like

#

I should get rid of this, I don't even use DidChange haha

#

sometimes I think, whoa CPUs are sooo fast and then I'm like, why is this so damn slow??

#

mostly it's down to, how much has the cpu to jump around in memory. none? enjoy your 100x speed up

#

but writing code to not jump around for game mechanics. damn ...

haughty rampart
#

strange. just tested a blank project and it works there

haughty rampart
#

@robust scaffold regarding the previous discussion about dynamic buffers / fixed buffers: did you take a look at growablebuffer? i figured maybe that's something you might be interested in

devout prairie
#

i'm going to go out on a limb here and say.. it's a buffer that can grow

haughty rampart
frosty siren
viral sonnet
#

lots of words for no other info than Q1 2022

rotund token
#

Oh good they finally posted this

viral sonnet
#

patch notes incoming! well that's something!

light mason
#

β€œβ€We’re now confident that we have reached the point where we will be able to restart releasing public patches to our packages.””

dull copper
#

it's not really giving much new info other than that they are continuing the previews soon

light mason
#

Yea

#

That what I’m happy about

dull copper
#

nobody really believes on that 2022 LTS target for 1.0 though

rotund token
#

I can tell you that's very much their goal

dull copper
#

yes, but their goal was to release DOTS 1.0 many years ago already as well πŸ™‚

#

I do hope I'm wrong but not feeling optimistic

frosty siren
rotund token
#

Note the part about old lts not working though

light mason
#

So if I’m reading this correctly, the 0.5 will have substantial changes ?

dull copper
#

workflow seems to be similar

#

wouldn't expect major changes really, other than maybe hybrid rendering working better this time

safe lintel
#

there better be substantial changes given the year of non public activity πŸ˜…

light mason
#

Was this past year more about integrating surrounding tools and packages to ECS?

rotund token
#

🀐

dull copper
#

that post mentioned nothing about getting more packages to ECS

safe lintel
#

like rewriting large chunks to accommodate improved functionality would be a blessing imo, ill take that over the current stagnation

light mason
#

πŸ₯Ί @rotund token

dull copper
#

and IMHO, they better focus on just getting the core done so people can actually start using it

rotund token
#

Hopefully look forward to rewriting all your code with ISystem!

viral sonnet
#

weeeeeeee

safe lintel
#

im ready

light mason
#

O man I haven’t touched ISystem

#

If anyone has good examples please send my way

rotund token
#

(for good reason as the current ISystemBase is not great and doesn't even run faster)

light mason
#

Illl start reading docs

safe lintel
#

doubt its gonna be any worse than going from inject and component groups or transitioning off of the old componentsystem to systembase, or ditching IJFE

rotund token
#

I'm not sure how and very curious if and how they implemented entities.foreach

rotund token
light mason
#

Wait what balled to entities.for each?

rotund token
#

In isystem*

light mason
#

Happened

viral sonnet
#

not sure if I'm gonna bother with ISystem. main thread code execution is not a problem but I'm only using struct based jobs, not sure if it's better for Entities.ForEach

rotund token
safe lintel
#

do wish they just released it now rather than talking about releasing it

rotund token
#

i assume they'll just use a dummy struct setup like a factory or something

#

there's a couple of other issues with ISystemBase currently - you can flat out just not use Unity.Physics unless you use my hack for alternate access method that doesn't require accessing the system

#

i'm most curious if and how Unity.Physics has been updated

#

I like Unity.Physics but it suffers from being a really old release and i think needs modernizing

safe lintel
#

when you mention ISystem do you mean the current ISystemBase?

rotund token
#

yeah i believe they've renamed it (could be wrong it's very early in the morning and I could still be dreaming)

#

that's all

safe lintel
#

I just assume ISystemBase was released half baked, theres really no way they could shrug off SystemBase in favor of how ISystemBase works now, with stuff like physics being incompat so im not worried about that

viral sonnet
#

creating command buffers, allocating nativecontainers, etc... should see an improvement in bursted ISystem OnUpdates, right?

safe lintel
#

unless their vision of 1.0 means no physics and I doubt that

rotund token
#

GetComponentFromEntity() etc

#

on old devices, lets say last gen consoles

#

this was actually super slow

#

we have this like, super AI system with a lot of these in a system

viral sonnet
#

oh really, never measured any slowness on my machine. you know the reason?

rotund token
#

moving all these calls to a function pointer

#

HALVED the main thread cost of our system

#

on last gen consoles

viral sonnet
#

oh wow, which ballpark were the main thread costs in ms?

rotund token
#

i optimized our system from 2.45ms to 0.7ms by merging jobs (reducing scheduling and queries) then 0.7ms to 0.35ms by moving Get calls to a burst function pointer

#

originally this AI system was like 20 separate systems

#

then it was merged to a single system and split via partial classes

#

i've managed to take it from way back like 6-8ms combined to 0.35ms on main thread

#

this is not an issue at all on modern platforms, but on old consoles [maybe mobile i don't work there though] huge benefit

#

so yeah, ISystem could have saved me a lot of optimizing efforts over the past year ^_^'

#

coming too late - unlikely we'll update this project as it's already EA and full release is expected around the time 0.5

#

but yeah, i look forward to ISystem a lot. you don't notice main thread issues in small projects
it's not till you have like 600 systems that it really starts being an issue (only 0.1ms per system over 600 systems? 6ms main thread!)

safe lintel
#

wonder if we will have sound & navigation for 0.5-1.0? wanting 1.0 out some time in 2022 seems very ambitious given such silence on those two things and also how rough anim is.

rotund token
#

pretty sure they said not long ago that the audio hasn't been worked on recently

safe lintel
#

yeah they did, but from the old keynotes audio was kinda mentioned as one of the key components to a 1.0 release

rotund token
#

no idea about navigation

#

i ported the entire recast library and pathfinding to dots nearly a year ago now

#

because i gave up waiting

devout prairie
#

god damn replied to the wrong thing then proceeded to copy/paste the wrong text

rotund token
#

i was very confused for a second

#

anyway day off, personal project time

viral sonnet
devout prairie
#

so do we think there will be substantial refactorizations required with the next update

rotund token
#

I wouldn't expect you'd need to do much

#

You can still use SystemBase and I believe most of that should be unchanged

#

(Except for under the hood optimizations)

rotund token
#

Beyond Contact - find it on your closest steam seller πŸ˜„

#

(that said, i actually recommend against playing it until we finish the first half of our roadmap)

viral sonnet
#

looks cool! hope you have success!

devout prairie
wooden canopy
#

Looks awesome tertle

#

the robot voice reminds me of Vision

rotund token
#

yeah pretty much, open world space survival future base defending story game thingy

devout prairie
#

it seems an interesting candidate for leveraging dots, was that a choice for better mobile performance etc?

viral sonnet
#

I don't know how much this game scales up, from the trailer it looks like a game that could go without DOTS. Where would you say you gained the most from DOTS?

rotund token
#

haha ok so the story about dots is kind of amusing

#

so the game has been in development for a while, much longer than i've worked there (i started 2 years ago)

#

maybe 2.5-3 years ago (before I joined) it was a single player game and they were hitting real performance issues for some reason and they wanted to add multiplayer

#

so they did a short 2 day game jam to learn dots and decided to rewrite the (server) with it

#

anyway good devs but no experience so didn't turn out great

#

some point after i started I think I calculated our archetype count hitting over 1 million

#

you spend 2 days with dots and it kind of makes sense to just add/remove components freely as the best way to use it

viral sonnet
#

yeah, the entities pitfall

rotund token
#

anyway yeah basically hired to help fix stuff up

#

the server these days, except action system which I just refuse to touch, is in a reasonably good shape

#

but the client is just a huge mess of legacy code that is trying to interact with ecs

rotund token
#

in retrospect I think it would have been a better decision to just use burst to optimize specific things (world gen etc)

#

that said, in theory we can scale our actor count 10x+ and really don't notice any slow down

#

it's just not something we do

#

we don't use netcode either btw, we have our own custom networking

devout prairie
#

i think either way it's important to learn this stuff and get familiar and you have to get your hands dirty to really know how it integrates etc right\

rotund token
#

if it's taught me anything, it's what not to do

devout prairie
#

also just moving towards a more DoD approach i think is massively beneficial and in general for individuals and maybe even games companies it's about time we climbed out of some of the trappings of OOP

rotund token
#

but yeah i still spend a lot of time writing my own libraries outside of work

#

we have ambitious plans for our next project that I'm going to push for pure dots i'm hoping get to make use of some of these libraries ^_^'

devout prairie
#

not that i'm ragging on OOP because it's a wonderful thing, but it's kinda lead us down a path of recklessness in a lot of ways

rotund token
viral sonnet
#

thanks for the insight tertle

rotund token
#

you need have spend time available to experiment

devout prairie
#

even just using singleton managers in an oop context can be an amazing thing as an alternative to the usual instances of inherited classes/objects etc

#

which is kinda pushing towards more of a dod approach, but within an oop framework i guess

wooden canopy
#

the biggest fear/problem I see with how unity communicates dots and examples, etc is that the whole focus is how do you handle 10343434324 entities, and most games don't care about that

#

ECS as an architecture is much more interesting than rotate 10000 cubes, or do a boids simulation with a ton of stuff

coarse turtle
#

i think their tiny racy showed a pretty good example for a small game using entities

rotund token
#

random advice: if you are ever trying to hire someone for a position at a company using dots, obviously it's hard to find someone with this specific experience. your best bet is to find someone who has general DOD experience (from say blizzard or other companies that use similar approaches) rather than someone with Unity experience.

#

much easier to teach someone unity than teach someone a way of thinking

devout prairie
wooden canopy
#

most talks about ecs were usually about managing complexity, Dungeon Siege 2, deus ex, all the roguelikes that use ecs since forever, overwatch

viral sonnet
wooden canopy
#

almost none of those focused on raw performance

#

while unity focuses almost exclusively on perf

rotund token
#

after using entities for so long, i actually find writing entities code faster now than monobehaviours for anything but the most basic of examples.
also well written code is significantly easier to debug, note the caveat on well written.

#

so even if it wasn't for the performance, i'm a huge fan of the architecture it encourages

viral sonnet
#

How should unity show complexity if their samples are simple? πŸ™‚ I'm not sure what you are asking. When raw performance is good you can add complexity without much worries.

#

Just don't fall into the Entities pitfalls like too many systems, jobs or reliance on add/remove component

wooden canopy
#

I think thats one of the symptoms of the problem

#

using a lot of systems, reliance on add remove, etc I don't. think are using ecs bad

#

I think not being able to handle that in dots is due to the focus on "performance by default" seen as we can handle 2100000 entities

rotund token
#

that said, ISystem should allow a lot more systems without these issues

#

because having a lot of systems can actually be very nice

devout prairie
#

is there a limit or some reason not to use a lot of systems other than performance?

viral sonnet
#

has anyone written simd code with blob data?

devout prairie
#

well i mean, is there a hit per additional system in terms of performance or something along those lines

#

that's a stupid question isn't it

viral sonnet
#

entities will evaluate if the system should run based on your main query

rotund token
#

if it doesn't run it's not too bad and avoids this cost

viral sonnet
#

i have not seen much problems with having many systems, what's bombing entities though is if you split up your code in let's say, 10 queries and 10 jobs which could be merged into 1 or 2

#

scheduling overhead, especially parallel is quite costly

#

not so much for Run

devout prairie
#

yeah i was thinking that.. say if you have 5 systems and four of them query the same bunch of entities

viral sonnet
#

worst you can do πŸ˜„

devout prairie
#

there's a temptation to think 'should i just roll all this logic into one system'

#

but then there's a sacrifice of modularity and readability etc

viral sonnet
#

utilize struct based partial jobs

devout prairie
#

so you're moving into kinda premature optimization territory

#

ah yeah

#

so what's the thinking behind that approach in general terms?

rotund token
#

if this logic is all related, does it actually make sense to be separate systems?

viral sonnet
#

i was going insane when I refactored Entities.ForEach code into methods because of all the parameters. Turns out you can just use methods and use the local public variables in struct based jobs and split them up nicely into several files with partials

#

no need to use any static methods

rotund token
#

pretty sure i've advocated for utility structs for years!

devout prairie
rotund token
#

because you don't need to do this horrible constant data pass through

#

public static void DoWork(Entity entity, ComponentFromEntity<Translation> translation, ComponentFromEntity<Target> targets, int speed, float max range, float elapsedTime)

#

(and this is a small example)

#
{
    public ComponentFromEntity<Translation> translation;
    public ComponentFromEntity<Target> targets;
    
    public void DoWork(Entity entity, int speed, float max range, float elapsedTime)
    {
    
    }
}```
devout prairie
#

yeah i get that part.. i guess i'm just not familiar enough with jobs to know how that'd work in place of the method approach

viral sonnet
#

and the methods are all bursted

#

no need to add [BurstCompile] to eveyr static method

#

also, sometimes burst likes to complain that it can't use the parameter data type in static methods which is no problem in public methods in struct jobs

#

why that is? i don't really know

rotund token
#

you don't need to add [BurstCompile] to a static method if it's called from a burst job

viral sonnet
#

ah ok, never noticed

#

i can only recommend to start using struct based jobs instead of entities.foreach. the payoff and flexibility is huge

devout prairie
#

i tend to use ref a lot to avoid copying data when in fact i'm not always sure if it is copying data, in say the context of passing stuff into a static method inside a foreach job

#

a bit of a black hole in my understanding there maybe

viral sonnet
#

ref inside methods is different to ref as parameter in Entities.ForEach. in the foreach it will add a writehandle and increment the chunk version

#

which can be quite bad sometimes if there's no write happening

devout prairie
#

ah shit yeah that makes sense, just like ref and in in the foreach itself

#

i think it probably disallows passing a foreach in as a ref into a static method anyway

viral sonnet
#

and yeah, you have to be quite mindful about utilizing refs or the pointer address in other words because local struct copies destroy performance

devout prairie
#

yeah that was my concern with that

viral sonnet
#

this is all handled much nicer and clearer in struct based jobs

#

i hate this auto magic approach

devout prairie
#

i'd seen some odd behavior in a couple of cases with static methods inside foreach so i kinda generally just try and avoid when possible, makes the foreach code a lot bigger though

devout prairie
viral sonnet
#

once you get the hang of it, believe me, you'll write struct based jobs as quickly as foreach

rotund token
viral sonnet
#

oh yeah! the scheduling also breaks down or gets unclear

devout prairie
#

ah yeah good observation also, that makes sense

viral sonnet
#

i'd only recommend entities.foreach for beginners. once you get used to entities, move on to more advanced types, namely IJobChunk and IJobEntityBatch

whole gyro
#

One of my biggest problems with foreach is that compilation errors in the editor never link to the correct line. I assume this is because all of the magic codegen stuff foreach is doing. Do struct-based jobs suffer from the same issue?

viral sonnet
#

no

#

that was also getting on my nerves. haven't used them for several months now. don't miss them πŸ˜„

whole gyro
#

Thanks, good to know. I've messed around a little with jobs but mostly using foreach right now. Definitely annoyed by how hard it is to factor out logic into helper methods with all the parameter passing. Sounds like a win-win

viral sonnet
#

also debugging broke when hitting GetComponent<T>

wooden canopy
#

tertle, how realistic is in a complex game, all the "dots checks dependencies and magically will run everything it can in parallel"

devout prairie
viral sonnet
#

sure, but there are limits, those are not obvious but will be when you want to scheduleParallel everything. parameters that need [NativeDisableParallelForRestriction]

rotund token
#

these days when I run across a situation where I need to use NativeDisableParallelForRestriction I usually think to myself, should this logic be inverted

haughty rampart
rotund token
#

it's not always possible or the best, but a lot of the time you can

#

i dislike disabling safety, we've run into a lot of random issues from these attributes randomly

#

you write some system, NativeDisableParallelForRestriction

#

2 years later, some junior dev makes a small change and bam now it's no longer safe to write to this

haughty rampart
#

exactly

rotund token
#

and you have this really obscure rare bug popping up in your project

viral sonnet
#

honestly, junior dev breaking things is not a real argument πŸ™‚

haughty rampart
#

it definitely is for the company

viral sonnet
#

do you just sit him there and let him monkey around? what about some proper onboarding?

rotund token
#

it's not about that

#

it's about there's no way to know this was wrong

#

ok remove junior dev

haughty rampart
#

what about some education before applying for a job?

rotund token
#

2 years later, some senior dev makes a small change and bam now it's no longer safe to write to this

haughty rampart
#

true

viral sonnet
#

if the attribute is there, be careful, make a comment and things should be clear

#

the attribute alone screams DANGEr

rotund token
#

you're missing the point, it might have nothing to do with this system

#

you could add a component to an archetype in a completely unrelated system

haughty rampart
#

exactly

rotund token
#

say for your AI, you have contributors. previously contributors only ever point to 1 target uniquely.
you decide 2 years later ok it'd be useful for contributes to have access to multiple targets for deciding between a choice.

viral sonnet
#

I don't know, that's a very general multi threading problem. I can't imagine writing multi threaded code without ever needing the attribute

rotund token
#

but you also have another contributor that says, what is targeting me in a completely unrelated system

#

(just an example, but not too far off a real world case)

rotund token
viral sonnet
#

i have one race condition in my code and i'm using interlocked.add to handle it. no care in the world what anyone is doing in other jobs/systems

#

while that's true there's not always a good solution to handle it

rotund token
#

let's say for example, you want your idle AI to locate a point of interest but only 1 should ever occupy each.

The default approach would be, loop AI, check if it's idle, find an empty point of interest, assign yourself to it

viral sonnet
#

i could have solved my problem without interlocked but that would add several ms to frame timing

rotund token
#

if you invert your logic, what you do is
Loop all points of interest, if unused, find an AI and assign it to yourself

#

it goes from a many to one, to a one to many

#

completely safe

#

(a common example of this approach is conveyor belts)

viral sonnet
#

my concrete case is, spellcasters can damage the same entity in one frame. what do you do?

rotund token
#

i write all damage instances as an event grouped by target then iterate each target in a separate thread to apply the damage

#

i do all damage in a single job because i find it more useful

viral sonnet
#

that sucks for performance. πŸ™‚

rotund token
#

then you can apply armor reductions, mitigations, death, etc

rotund token
viral sonnet
#

i've had the same thought as you and written around 3 approaches. all sucked. interlocked wins πŸ™‚

wooden canopy
#

where can we apply for the lets get these guys to give a talk or make a blog post detailing how they architect their game fund?

viral sonnet
#

instead of applying local data you have to write to an array, sort it in some sense, iterate over it and then apply the damage amount. what's good design about this?

#

it's clean, yes. no doubt but it's way too much overhead

rotund token
#

how do you apply damage reduction from another spell shield blocking damage

#

or a deferred damage ability that delays damage by X seconds and prevents health reducing by 1

#

or a spell that absorbs 5 hits of damage then reflects it

#

do you hard code every check in every damage source you have in the game?

viral sonnet
#

i count 3 different mechanics πŸ™‚ my spell system can actually handle all these

#

i have only 1 method which applies damage and that handles prevent dieing, absorbing, reflect, etc...

safe lintel
#

anyone know if theres a way to show gameobject conversion systems in the entity debugger?

viral sonnet
#

in that sense, they are hardcoded, but that's also their one place they should be so no need to make several systems/jobs that would handle this

rotund token
safe lintel
#

I just want to visualize which is updating after what, kind of annoying figuring it out

viral sonnet
#

and to find out if the entity has any of these effects I need a lookup into a NHM. while I don't think that's great or perfect, it performs better than any other solution I've found

rotund token
#

@viral sonnet how many damage sources vs targets are we talking per frame and what time to calculate

viral sonnet
#

250k vs 1 πŸ™‚

#

not that it'll ever be that much but that's the amount I profile with

rotund token
#

vs 1 seems odd but ok

viral sonnet
#

sure, absolute worst case

rotund token
#

actually thats the absolute best case

#

that you could optimize very well

#

you can perfectly invert it since you know all sources would come to you without checks 😰

viral sonnet
#

ok, it's funny because I'm on the other side now. I was pretty much on yours before I started arguing with Kornflaks about this πŸ™‚

#

so, how would you sort this?

rotund token
#

oh a 250k vs 1 situation is not what i'd assume you want to optimize for

#

this seems like a very unrealistic approach

#

it was just amusing to me that you said that was worst case

#

because if that was your actual game it'd be great!

viral sonnet
#

could be against more targets, I tried with a naive NMHM and a NativeStream. I think I had something else but I forgot

#

if you have a race condition on targets and you only have 1, why is it not the worst case?

#

250k fighting for the health of 1?

rotund token
#

what i'm suggesting is not that spells deal damage to targets

#

instead i'm trying to suggest the idea of targets take damage from spells

#

i'm not saying you can get this to work, just to think about the inversion

viral sonnet
#

how to model that though? that's a huge load of data?

rotund token
#

imagine if you just looped all things that could take damage, check if the fireball was within range of hitting you, take damage from that

coarse turtle
#

yea, sounds like it'd be a good idea to limit the search space

rotund token
#

again, i'm not claiming this necessarily the best solution to this problem, but it has been to a lot of alternate problems i've stumbled upon once i wrapped my head around this concept.

viral sonnet
#

my first iteration created the spells as entities but I realized that creating persistent data that needs an additonal iteration was actually worse

rotund token
#

(I must credit DreamingImLatios for this concept though)

#

this post in particular. sometimes random posts on internet are enlightening. basically why i still read so much random code and forums

viral sonnet
#

I don't know, once you go low level enough it's all about how much you read and write and you'll never get better performance with more writes

#

Not even being able to simd the code would solve this.

rotund token
#

the pursuit of simd can often end badly

#

snippet of something i was working on last weekend

viral sonnet
#

yeah, I've tried hard but I'm always running against a wall πŸ˜„ have lots of blob data but that can't be simd'ed

rotund token
#

(this is the before picture)

#

spent like 3 hours optimizing this to be all nice and simd

#

ended up running 30% slower

viral sonnet
#

ok, that's strange though

rotund token
#

😒

#

such is life

#

when i looked at the burst

#

i was so happy

viral sonnet
#

usually simd has at least 4x speedup

rotund token
#

so i decided to write a quick performance test to see the benefit i got

#

yeah that took me down to earth

viral sonnet
#

do you have a screen of the simd assembly? was it using vpXXX?

rotund token
#

for the most part yeah

viral sonnet
#

scalar should never ever outperform simd

#

could be a subtle mistake in there.

rotund token
#

its only 2 less instructions

#

i'm definitely no expert in this area, something i'm spending a lot of time learning/experimenting

#

if someone knows a way to do this faster, would greatly help!

viral sonnet
#

post your code πŸ™‚

#

best one to ping about this is @robust scaffold

rotund token
#
var cornerMaterials = stackalloc bool[8];

for (int z = 0; z < voxelsPerChunk; z++, materialIndex += fieldSize)
{
    for (int y = 0; y < voxelsPerChunk; y++, materialIndex++)
    {
        for (int x = 0; x < voxelsPerChunk; x++, materialIndex++)
        {
            // record the on/off values at the corner of each voxel
            cornerMaterials[0] = this.State[materialIndex + MaterialOffsets[0]];
            cornerMaterials[1] = this.State[materialIndex + MaterialOffsets[1]];
            cornerMaterials[2] = this.State[materialIndex + MaterialOffsets[2]];
            cornerMaterials[3] = this.State[materialIndex + MaterialOffsets[3]];
            cornerMaterials[4] = this.State[materialIndex + MaterialOffsets[4]];
            cornerMaterials[5] = this.State[materialIndex + MaterialOffsets[5]];
            cornerMaterials[6] = this.State[materialIndex + MaterialOffsets[6]];
            cornerMaterials[7] = this.State[materialIndex + MaterialOffsets[7]];

            // record the on/off values at the corner of each voxel
            int cornerValues = 0;
            cornerValues |= (cornerMaterials[0] ? 1 : 0) << 0;
            cornerValues |= (cornerMaterials[1] ? 1 : 0) << 1;
            cornerValues |= (cornerMaterials[2] ? 1 : 0) << 2;
            cornerValues |= (cornerMaterials[3] ? 1 : 0) << 3;
            cornerValues |= (cornerMaterials[4] ? 1 : 0) << 4;
            cornerValues |= (cornerMaterials[5] ? 1 : 0) << 5;
            cornerValues |= (cornerMaterials[6] ? 1 : 0) << 6;
            cornerValues |= (cornerMaterials[7] ? 1 : 0) << 7;
        }
    }
}```
#

is the crux of it

#

the only measurable improvement i've managed to make is use 2x bool4 instead of stackalloc bool[8] for some reason this gave about a 5% boost

#

MaterialOffsets is a static readonly int[8]

#

really i just wanted to find a way to shrink this section
cornerValues |= (cornerMaterials[0] ? 1 : 0) << 0;

#

things i tried that appear to generate nice code but run significantly slower

    this.State[materialIndex + MaterialOffsets[0]],
    this.State[materialIndex + MaterialOffsets[1]],
    this.State[materialIndex + MaterialOffsets[2]],
    this.State[materialIndex + MaterialOffsets[3]]);

var cornerMaterialsHigh = new bool4(
    this.State[materialIndex + MaterialOffsets[4]],
    this.State[materialIndex + MaterialOffsets[5]],
    this.State[materialIndex + MaterialOffsets[6]],
    this.State[materialIndex + MaterialOffsets[7]]);

var cornerValues = (math.bitmask(cornerMaterialsHigh) << 4) | math.bitmask(cornerMaterialsLow);
    this.State[materialIndex + MaterialOffsets[0]].AsByte() << 0,
    this.State[materialIndex + MaterialOffsets[1]].AsByte() << 1,
    this.State[materialIndex + MaterialOffsets[2]].AsByte() << 2,
    this.State[materialIndex + MaterialOffsets[3]].AsByte() << 3);

var cornerMaterialsHigh = new int4(
    this.State[materialIndex + MaterialOffsets[4]].AsByte() << 4,
    this.State[materialIndex + MaterialOffsets[5]].AsByte() << 5,
    this.State[materialIndex + MaterialOffsets[6]].AsByte() << 6,
    this.State[materialIndex + MaterialOffsets[7]].AsByte() << 7);

var cornerMaterials = cornerMaterialsHigh | cornerMaterialsLow;
var cornerValues = cornerMaterials.x | cornerMaterials.y | cornerMaterials.z | cornerMaterials.w;```
At the end of the day it's probably just the array lookups that are costly and not much I can do about it.
#

(sorry grav i'm done spamming code please speak =D)

whole gyro
# rotund token (a common example of this approach is conveyor belts)

Haha I was just trying to figure out how to ask this. The game I'm working on is all about conveyor belts so I'm curious about your approach. The main issue I've run into is that if a conveyor is full, it cannot safely accept an item unless the downstream conveyor also accepts the item. You can either find empty spots and recursively accept items upstream, or you move everything, find conflicts, and recursively reject items upstream. Is there some other idea I should try?

viral sonnet
#

are cornerValues written back to an array?

whole gyro
#

I should add that my method works fine and can run in parallel, but I'm not a fan of how I have to keep these upstream dependency chains, or hop through entity references upstream

rotund token
rotund token
#

the whole post is quite interesting btw

whole gyro
#

yeah I've read that πŸ˜„

rotund token
#

ah ok

#

well i got nothing of use for you then!

#

😒

whole gyro
#

ah no worries! Your response in that thread has been helpful to me

#

I just saw your comment above about conveyor belts and was curious if you had some new insight.

rotund token
#

(cant believe how long ago that was now)

#

but yeah, apart from that post never looked at it at all

whole gyro
#

Anyways, carry on with your simd optimizations. Afraid I'm of no help there.

viral sonnet
rotund token
#

i feel like the factorio blog must be the gold mine for conveyor belts though

#

i really should read that more

#

the lengths of optimizations from the small amount i've read was fascinating

viral sonnet
#

factorio is also doing this, summing up their pieces in transport lines

rotund token
#

i think he did something hugely weird to save space and not store the position of the belt nodes

#

and instead just the offset

#

for memory saving

viral sonnet
#

getting this to run is the easy part, setting this up is the hard part πŸ™‚

rotund token
#

i probably shouldnt quote from memory though

whole gyro
#

Was planning to look into it again as a future optimization

viral sonnet
#

rebuilding doesn't take too long performance wise but yeah, it gets quite complicated. i'm crazy and my transport belt system works on hexagons

viral sonnet
#

i think it's quite easy on a 4x grid

whole gyro
#

haha maybe we need to chat more haha

rotund token
#

why stop at 6 sides or even 3D space

#

4D factory sim game will get you some headlines πŸ˜„

#

(looks nice btw like the style)

whole gyro
#

Thanks! And yeah 4d would be cool but it makes my head hurt too much

#

Honestly, the initial motivation for hex was that I was having trouble making a 90 degree turn in the art style I was using

viral sonnet
#

looks cool! πŸ™‚

rotund token
#

just have a second world base in the future that sends back material to the past world base!

whole gyro
#

so I was like, how about 60 degree turns only

rotund token
#

no time!

full epoch
rotund token
#

so 4 hours ago

whole gyro
#

lol

#

its still good news

#

4 hours later

viral sonnet
#

@whole gyro you have a similar name to my first game. was called Gravity Punch! πŸ˜„

rotund token
#

its a giant news post with no news πŸ˜„

full epoch
#

just read about it - fantastic !!!!

viral sonnet
#

haha

whole gyro
#

So when they say 2022 LTS for DOTS 1.0, does that mean that we will be seeing the new stuff in 2022.2 alphas and betas, or that we wouldn't see anything until the LTS version is out?

full epoch
#

hmm so first quarter of 2022 for 0.5 for 2020LTS seems also 2021LTS but not sure exactly when - anyways better than nothing

#

i hoped till the end of this y tbh

viral sonnet
#

we all did πŸ˜„

full epoch
#

damn 😦

haughty rampart
#

I mean entities 0.17 works with 2022

whole gyro
#

I've heard that it doesn't work with hybrid renderer or the animation package

haughty rampart
#

Correct

full epoch
#

did u try netcode too? (for 2022)?

whole gyro
#

I'm using both, although barely using the animation package right now

#

I would love to move to 2022 if I could. I've been wanting some of the new URP/shadergraph stuff.

devout prairie
#

out of curiosity what sort of stuff are people hoping to see in the next few updates?

#

i'd quite like to see easier skinning/animation support for dots

rotund token
#

i have a pretty good idea what's coming in entities but actually no idea what package updates will have
which is both terrifying and exciting because it's kind of the most important thing these days

#

i'm keeping expectations low but hoping high though

devout prairie
#

seems like they've worked on a bunch of animation tools leveraging jobs, and some of these have looked amazing, but kinda feels like they're all pointing in different directions, it'd be nice to have some solid integration with all these technologies

rotund token
#

especially for animations, team has basically been working on this for a year and it's such an important part to get a pure solution going

viral sonnet
#

i have a pretty good idea what's coming in entities but actually no idea - spoilers please πŸ˜„

devout prairie
#

fx graph to me felt like this amazing tool using a ton of low level optimization stuff that kinda nods at ecs/dots but it's bound in gameobject world and not really integrated in any way with entities etc

rotund token
#

vfx graph does it work entirely on the gpu doesn't it? kind of it's point

full epoch
#

much smaller in size megacity demo would be nice(for desktop that works well on my i5-4c4t and rx 480 amd) πŸ™‚

devout prairie
#

so again its kinda very cool performant stuff but, kinda disconnected and it's own little ecosystem

whole gyro
#

In addition to better animation support, I would love to see something related to audio and more editor improvements. Being able to click on an entity in the scene view and see both its authoring gameobject and the converted entity in the inspector. Somehow visualize system order dependencies and job dependencies. Custom editor support for entities in the inspector and someway to hide components I don't care about (I'm looking at you Builtin Material Properties)

devout prairie
#

i think the whole graphs concept will eventually bring everything together between the gui and native data stuff etc, maybe

rotund token
#

i haven't really used it (far from the point of adding any type of effects yet) but i assume adding native access is something they'll do at some point

devout prairie
#

So also the animation rigging thing, i saw that and thought 'amazing' this is the kind of stuff we need.. but again, does it only work with gameobject characters and Animator component etc.. it's kindof it's own thing

#

So dots has nailed the performance stuff, it's incredible, but i think it needs to start integrating some of the low hanging fruit, like the obvious stuff, and having those things benefit from that architecture.. it all feels massively fragmented atm.. obviously it's still early, but it's just my thoughts on it all

#

They've said here they're running with the hybrid approach, which is fine and understandable.. but it would be cool just to have clearer integrations with all of the core stuff

rotund token
#

Apologizes for being a successful early adopter πŸ˜…

#

Bring on pure!

#

this is seriously the worst type of bug to track down

#

huge 8k x 8k terrain and only 1 face on seam mesh is missing

#

and if i get closer to a higher resolution LOD it's fine

#

tempted to just ignore it πŸ˜…

devout prairie
#

If you ignore it.. i'm sure it'll go away

frosty siren
#

Guys, i have a question about DynamicComponentTypeHandle: should it be gathered from GetDynamicTypeHandle every frame OR can i get it once from system start?

rotund token
#

every frame (i'm pretty sure anyway)

robust scaffold
#

HOLY SHIT ITS A CHRISTMAS MIRACLE. Unity acknowledged our existence!

#

Now time to read the actual article while on so much headache drugs

#

We are targeting the first quarter of 2022 for this release.

#

And who doubted me when I said the next DOTS won't be releasing for another year or so. Probably realistically december 2022. Mark my words.

dense crypt
robust scaffold
rotund token
#

you just need to pay your 48-96k/year for the enterprise license for them to acknowledge you

robust scaffold
#

Also @rotund token figured out your simd issue? I'm on mobile stuck in bed and on drugs so I cant quite think straight for coding

rotund token
#

oh nah, that was last weeks problem haven't looked at it since

robust scaffold
rotund token
#

State is a bool array
.AsByte() uses a union to implicitly convert from bool to byte without branching

#

the final result is stored in an int (but only needs a byte in theory)

agile dome
#

Also somewhat disappointed that the direction doesn't seem to be focused on pure DOTS runtime.

rotund token
#

(i should say state will likely become a byte not a bool once I add the concept of materials, but for now it's air/ground, not air, grass, dirt, etc)

robust scaffold
#

The problem with Byte is that there are very few simd commands that support int8 for fancy operations. Addition and multiplication definitely are supported but beyond that it becomes pretty barren. Same with short ints (int16). Full ints and longs though are fully supported by AVX2.

#

Unless this is on mobile using ARM. Then yes, int8 and int16 are fully supported

rotund token
#

you've got me thinking actually
it's 2x bool4 worth of data which is only 2 int length

#

if i changed it to index += 2 and do 2 batches at once

#

to pack it into 4 ints

robust scaffold
rotund token
#

const int voxelsperchunk = 64

#

is the loop

robust scaffold
rotund token
#

there are no entities involved

#

this is iterating a 64x64x64 voxel grid

robust scaffold
#

Oh, the chunk terminology is throwing me off

#

Then yea, you'll be preferably fine.

#

It might be better if you're doing fancy things like packing flags into 8 x ints (the length of one packed vector) to manually vectorize. It's fairly simple

rotund token
#

oh yeah my QEF is completely hand vectorized

#

plenty of manual stuff going on here

#

so it's not something i'm uncomfortable doing

robust scaffold
#

Although if you're doing 3d voxel grids, it might be even better to shove this through a compute shader. GPU wavefront will knock Burst out of the park in terms of performance

rotund token
#

haha you say that

#

but this is actually a conversion of a compute shader to burst

#

and i'm running nearly twice as fast (except the density function which is much slower)

#

the density function is something i will definitely keep on the gpu

robust scaffold
#

Oh no. What happened? I know theres no bitwise operations on GPU so is that where you're getting performance from?

rotund token
#

its not my gpu implementation

#

it runs fast

#

it's just this version i've done

#

runs very fast

robust scaffold
#

Ah. Also skip the in parameter of the function. It doesnt help as Burst will need to memcopy the data before operation

rotund token
#

i'm pretty sure in is passed by referenced?

#

i actually got unity burst team to fix multiple bugs with 'in'

robust scaffold
#

Ah, I just know from personal testing that usage of in resulted in unnecessary memcopy of structs when removing the in resulted in identical functionality but no memcopy. This was back in 1.6 or 1.5 burst though.

#

Haven't tested with 1.7

#

I think it was something relating to restricted operation enforced by in of the pointer to the data that stopped Burst from properly operating on the struct. Even if all actions were read only within the code, burst needed to copy the struct into a local non-in variable to properly do vectorization.

rotund token
#

Method(in int* ptr)
flat out broke burst until 1.7
obviously this is not code you actually want

#

just a random bug i found by a refactor and forgetting to remove in

#

i just changed a bunch of 'in' to 'ref'

#

and burst generated the literal exact same code

robust scaffold
#

Yea. There are issues with in and Burst. Ref and out though I think are fine. I dont use them though, pointers are fine for me personally.

#

I need to check the tea leaves as that one unity poster so nicely put it to see if unity implemented a job accessible shared component data type. Or if I need to back together one myself

robust scaffold
#

That does remind me, I do need to update my ancient image processing code with actual simd. But I really dont want to touch it because it's such a mess...

safe lintel
#

oh just realized that lts 2022 is their target 1.0 release timeframe, thats a crapton of time

robust scaffold
#

We really should've gotten together and pulled apart the source for Entities but unitys strategic ambivilance and the fact that DOTS community is microscopic probably wouldnt have lead to much

safe lintel
#

pulled apart to do what though? πŸ™‚

robust scaffold
safe lintel
#

dreamings library is definitely impressive

#

I feel like I could easily write beginner documentation πŸ™‚

rotund token
#

i feel like i'm in the minority when i say this, but i'm actually not a fan of the idea of using this library

safe lintel
#

I dont like that it kinda hijacks all the default systemgroups, some of the command buffer additions seemed totally unnecessary. Its not really a drop in library like an official dots package is, there are some things it does on first install that I dont care for at all.
I was using myrri and basically extracted it from the repo to work as a standalone thing, but unfortunately although I had it working in editor, it wouldnt play audio in a build(my fault, on its own it built fine so some sort of conflict with my project I guess), so unfortunately had to stop using it. Despite my own issues its still a ton of impressive work, and now hes tackling some sort of animation system.

rotund token
#

oh i'm not claiming it's not good, for him. but it doesn't play well with pretty much any of the other unity packages so i can't recommend anyone use it

#

there's a lot of good ideas in there but i feel like the whole library stems from a disagreement with unity's direction

safe lintel
#

yeah its definitely seems like his idea of what dots should be

deft stump
#

what's dreaming's library?

left oak
haughty rampart
#

@robust scaffold looked at growable buffers yet?

viral sonnet
#

great, my memory layout thread got derailed and is now about adding/removing when it was about AoS and SoA. should have been more explicit about it

#

but dreaming has a very solid point in merging data with this problem.

#

still seems like it's so hard to get a good balance. on the one hand, auto vectorization needs a single field comp. but then you have jobs that are not simd'able and reading all these small IComps destroys read speed

#

I'm seriously looking foward to having disabled components that are understood by queries. That's probably one of the biggest boosts and way to get a cleaner codebase in my case

#

very simple example, a spellcaster can either cast instant spells or cast over several frames. in the case of true casting, I've to reset the auto attack swing timer. currently I have to utilize a conditional write handle that I only acquire on that state, which not only ends up in a useless and costly condition to check for this but also prevents being able to simd the code path. other alternatives would be have another iteration but then you also end up with a conditional check plus the additonal iteration which is worse performance wise

#

i have a lot of these conditions that would be archetype tags. hopefully this will be a big boost

viral sonnet
viral sonnet
#

thanks! really interesting

#

AtomicsFreeList != Atomic free list

#

is there an easy way to read the source code of this package without downloading it from the package manager?

haughty rampart
viral sonnet
#

that's why I'm so confused. NativeContainers all those Interlocked.

#

what's certainly true is that atomics sometimes destroy performance with threading congestion

#

learned this the hard way with NativeList.ParallelWriter

wooden canopy
#

treating entities more as fixed bags with all their components and using enabled or disabled in them instead of adding or removing components

agile dome
#

It's probably not unreasonable in the real world, considering how often static gameobject prefabs work out, but it feels dirty to build entities that have the data for all the systems the entity might end up interacting with at some point in the game. Like the concept is that data used 7 hours into the game is present from the beginning.. assuming a game that has significant amount of entities around for that whole duration...

haughty rampart
#

i would be massively against that design

agile dome
#

So at the end of the day if the data doesn't end up being too bloated, which it probably won't in 99% of games, it's probably the most efficient way to go about it?

#

But yea, fundamentally pretty disgusting imo πŸ˜„

#

Like that 7 hour journey assumes no opportunities to do this relatively slow data mangling operation, so no menu interactions, no cutscenes, no level transitions...

viral sonnet
#

great, my memory layout thread got derailed and is now about adding/removing when it was about AoS and SoA. should have been more explicit about it

#

haha

#

unity will provide a good solution for adding/removing via pre-allocated IComps and enabling/disabling

#

the thread was not about this problem though

#

it's about jobs/features that are not simd'able and suffer through bad memory layout. the answer is merging data but I'm still in the belief that's not a good solution because it has way too many follow up problems. fix 1 problem, now have 2 more kind of situation

#

as I had more time thinking about it it's kind of unsolvable right now. you can only have either or, not both

viral sonnet
agile dome
#

Well imo it either is okay to remove and add components during your simulation or it isn't. Like "well you only need to have the framerate hitch sometimes" isn't an ideal answer.

#

Obviously it isn't quite as clear cut in reality, but when talking about theory and design goals

safe lintel
#

@agile dome I dont think this is the case at all, my interpretation is that components should not be added/removed repeatedly per frame, ie you should not have a RunComponent added/removed whenever your characters need to run.

#

i think this has been discussed before in this channel(albeit a while ago) and other ecs frameworks are better for handling those types of granularity for changes, but unity's doesnt. he mentioned component changes when say picking up/discarding an item, and that would easily happen fairly often throughout a 7hour gameplay session of any number of types of games. but constantly adding/removing components for rapid changes like shooting, running, crouching is what I see as being recommended against

agile dome
#

Yea so maybe the message is more about avoiding a game where X amount of component changes per frame is likely

#

I imagine those sorts of designs would cause issues with sync points anyway?

safe lintel
#

yeah, seems like enable disable could be what they intend for rapid changes

frosty siren
#

as i understand enable/disable component saves time of archetype changing and extra archetype creation, but i have no idea how they'll keep performance of gathering entities with this extra enable/disable component condition, because now every entity should be filtered based on component state. Or it can be done in more smart way?

viral sonnet
#

from forum posts entities will be gathered by bitmasks

#

it's fast in that it can be vectorized

#

but of course, slight overhead

#

archetypes with no disabled comps will still perform faster on iteration

robust scaffold
robust scaffold
haughty rampart
viral sonnet
#

any ideas for the fastest way to parallel write multiple data based on a key other than NMHM? (because NMHM isn't that great in parallel)

#

or some form of sorted list

robust scaffold
#

Otherwise, the other options for parallel race conscious options are a lot slower.

viral sonnet
#

afaik NativeList uses interlocked exchange and that worked out pretty terrible in parallel writing

#

on the other hand, my target health interlocked add was pretty good so some performance implications are really unintuitive to me

#

they key would be an entity, so I could use the integer entity.index

#

i might give this a try. if it turns out well we could shit on the CTO opinion about interlocked again haha

#

(making this a running gag)

wooden canopy
#

what kind of game are you making enzi?

viral sonnet
#

i've not decided yet while I'm building this (asset) πŸ™‚ it will either be an incremental game or a dungeon crawler

#

I confess, i'm having too much fun building assets than actual games

wooden canopy
#

tool making is a lot of fun

#

I try to focus everything I do in enabling content creation instead of being the one to create content

#

sometimes we can't escape it, but every new tool that we can give our artists or game designers has a way better return on investment than us making the content

haughty rampart
#

def

#

i love tool making

craggy orbit
craggy orbit
#

oh! news! i must've missed this. thanks!

safe lintel
#

@craggy orbit no, 1.0 is targeting 2022 LTS so that could be potentially 2025

#

also did anyone see the unreal matrix awakens demo? https://www.youtube.com/watch?v=izpSH6LUpm4 or played it? just watching the youtube video, damn it kinda blows megacity out of the water. full integration of all their new tech, lumen, nanite, metahumans, and more, city scale and AAA polish.

haughty rampart
#

and yet epic sucks

safe lintel
#

eh whatever you need to tell yourself

#

I was wondering what mass was aside from crowd sim stuff, interesting

haughty rampart
#

the tech is nice but the company is not

#

that's fine. but stealing, screwing consumers and ill intent against competitors is not something i will overlook

#

XD ea

#

and current game studios still do it

#

srlsy

#

fifa

coarse turtle
safe lintel
#

no idea, first google result was setting unreal physics mass setting so maybe its yet to materialize πŸ™‚

haughty rampart
#

also tf2 / csgo are FPS games which are not primarily targeted at children

#

the sole purpose of fifa is to get people to do microtransactions. there's even been a press article about it

#

that's nonsense. would've happened even if valve didn't 'promote' it

coarse turtle
#

ah interesting

#

ah okay, yea sounds like that's the usual path a product/feature would go. No point in maintaining if it's not going to be used 🀷

#

yea no worries, I haven't even touched unreal engine πŸ™ƒ (the size of the download is really what stops me from trying to download it lol)

safe lintel
#

seems like epic are better at pushing their pace of development faster if they have a definite need for it so i dunno mass might beat dots at the current rate

north bay
#

All I can say regarding epic is that they are very supportive to devs using their software

haughty rampart
#

wdym? it's still c++ is it not

#

there'll be a pure workflow eventually

#

just not for 1.0

#

omg that looks kinda like javascript

#

i'm pretty sure it will since they kinda hinted at it in the update post

#

doesn't seem like it supports ecs paradigm. it's built as a functional and oop language

umbral narwhal
#

Random question, I noticed that the "Changed" state on chunks seems to reset after the frame, so if something changes and then I use "WithChangeFilter<>" on it on the next frame it doesn't get picked up, is there some way to persist this into the next 1-2 frames or maybe just a different way entirely it's supposed to be done?

haughty rampart
#

it should persist as long as it hasn't been reset by any system afaik

umbral narwhal
#

gotcha, something might be resetting it then, will check that

viral sonnet
#

damn that matrix demo is epic ...

viral sonnet
#

The entitie 0.5 will contain enable/disable function will ?

#

No. Thats for 1.0. Most of the code is in there but ifdef'ed out, since there were still corner cases to fix when we branched off 0.5.

#

😦 😦 😦

#

2 year feature

#

no we don't want to make 2 memory layouts that would support it better

#

eh

#

I'd argue, devs who need add/remove enable/disable don't care about simd code paths

valid haven
#

I am going to skip 0.5 entirely as it seems they are planning a fairly radical departure in 1.0. Obviously for projects that are already committed to how entities works today might not have that option 😐

viral sonnet
#

i'm not sure anymore what 0.5 even has

valid haven
#

I am assuming 0.5's has everything the current version has, but is more mature and they are attempting to get it to a state where in 2021 LTS its stable for early adopters, but that going forward dots will be going in a bit of a different direction.

viral sonnet
#

then I don't know what they did 1 year and what was 1 year turns into 2 ...

#

pretty pissed honestly

mystic mountain
#

So is 1.0 getting released in a year or during the next year?

valid haven
#

this announcement was pretty much what I was hoping for to be honest.

#

not as far as the details of course, because there were few details. But the direction at least seems like something that has a hope of being deployable in the majority of games by 2022 lts.. prior to the announcement i had little hope that would be a reality.

#

dots as it exists now has a lot of gaps and I wasn't expecting all of them to be solved by the end of the year.

#

We will see what they actually announce about 0.5 and 1.0 here soon. Until then we don't have much to go off of other than they are not focused on a pure dots solution for 1.0 and are leaning heavily on an improved hybrid/conversion workflow

viral sonnet
#

and I'd bet a few bucks that it will not hold πŸ˜„

robust scaffold
viral sonnet
#

than what IS in there? πŸ˜„

#

with their announcement that enable/disable will take them another year, I'm going back to my thread about the sparse memory layout and would argue that my idea was better than I thought at first

#

they are scrambling to solve 2 problems with 1 solution

#

and as programmers we should now, don't fucking do it

#

their focus on simd code is meaningless in most cases. low level features can profit a lot from it, but game code doesn't

#

and I say that as someone who mainly writes game mechanics and has some grasp of good data layout and performance.

#

My code right now is more bursted OOP than anything else and that moulded itself to this state. The first code was pure, this is how you should do it in entities, performance was ass. Every avenue to vectorize it is bound with unsolveable problems. One can always say, you are just not good enough but meh ... not that I've heard better ideas from anyone.

#

What I'm saying is, not everything can be forced into 1 paradigm. I may be in the minority here but that doesn't mean I'm wrong.

#

and with 1 paradigm, I mean, the memory layout and not relying on add/remove or enable/disable

#

as the cto put it

#

We don't see a reason why adding / removing components frequently at runtime is a useful pattern in the first place.

#

Then 95% of their samples use it. I don't know what's going on here anymore. Are they blind?

#

If we're doing something wrong I'd like to see how it should be solved then. No one has any answers. Frustrating ...

#

And before anyone comes at me, I don't use add/remove, which is mostly the reason why my code needs conditions and therefore not vectorizable. well, apart from the usage of blob data which is also one of those implemented brain farts

#

Does anyone know how some people have access to 0.20? Who are these people and where do I apply for this?

vagrant surge
#

i had a look at the ue5 Mass stuff

#

its essntially more or less the same as unity ECS in core design. Archetype based with a job system like thingy

#

its meant to be used with hybrid stuff. There are lots of components specifically made to control an Actor

#

like read actor location into ECS location component and the reverse

#

but it can also render by moving instanced meshes directly

#

and it comes with a new crowd and AI system that is specifically made around it

#

the important part is that, unlike unity ECS, it has editor support, somewhat

#

you can put a component into an actor that connects it into the ECS, and edit ECS components off that. Much like Entitas

viral sonnet
#

unreal is so many miles ahead now, it's not even funny πŸ˜„

#

just found out, even though blob data is immutable you can't pass it in as "in". otherwise you can't make local copies of the blob data. you have to use ref there. -.-

#

error MayOnlyLiveInBlobStorageViolation: You may only access .ResultIgnoreFlags by (non-readonly) ref, as it may only live in blob storage. try ref BlobPtr<SpellResultIgnoreFlags> yourVariable = ref yourSpellBlobRoot.ResultIgnoreFlags

haughty rampart
#

more or less

#

ofc depends on the components on the entity

viral sonnet
#

i'm pretty certain frequent means one once per frame, not several times. one structural change is enough per frame to tank framerate

haughty rampart
#

even for a few hundreds the hit should actually be managable.

#

and unity doesn't consider 'once per frame' frequent. they stated that lots of times

viral sonnet
#

whatever, we are arguing about the frequency of frame rates spikes πŸ™‚ it should be 0

#

you say normally you don't which is right, but then you have a condition which prevents simd

#

there's no solution here

#

either you can't use simd or you have frame rate spikes. great options πŸ˜„

#

and if you use simd with add/remove the game scales less than without simd and conditions

#

this might get better with enable/disable but that also means waiting for end of 2022 which is the reason why I'm in a pretty bad mood since I've read this

#

this feature is in total development hell so I fear for the worst honestly

haughty rampart
#

end 2022 seems very reasonable tbh. we're almost there anyway

dull copper
#

would be but it's still far enough to not be realistic target

#

none of the predictions so far have been even remotely close

haughty rampart
#

cause we were in an experimental state

dull copper
#

I'm just skeptical

haughty rampart
#

i'm confident

viral sonnet
#

yeah, I don't think this date will hold πŸ™‚

dull copper
#

it's not just DOTS, it's how Unity operates

#

we always see things that look like they are about to land any moment now and then year+ later it's still not there

viral sonnet
#

that they need this long for this feature tells me there's something majorly wrong

dull copper
#

I don't even talk about recent years now, but like past decade

#

I'm not salty or anything, I get things take their time, just less optimistic on any estimates they give πŸ™‚

#

I'm not in position to judge them either, considering my own estimates for dev time tend to suck even more πŸ˜„

haughty rampart
#

unity's got lots of resources flowing into .net migration currently

#

of course features are slow

viral sonnet
#

i don't care much about estimations but I judge what they can get done in a given timeframe

dull copper
#

I'm actually surprised Unity gave that specific target TBH

#

usually they are more vague since they've learned from the past

viral sonnet
#

saying we need a year and then 2 years is pretty unspecific πŸ˜„

haughty rampart
dull copper
#

this was the assumption when they left us in the dark almost year ago too

#

so with same logic, it should be out about.. now? πŸ˜„

haughty rampart
#

they didn't say what they'd be doing in the 1 year when they've gone silent

dull copper
#

I'd be more optimistic on this if they didn't still plan to make 0.5 release in the middle and just went directly to 1.0 previews

haughty rampart
#

i am so excited that there IS actually a 0.5 release

#

cause waiting another full year for the NEXT release....that would be bad

viral sonnet
#

how can you be excited for something you don't know what it is? πŸ™‚ I have no idea what 0.5 entails

#

in my book, 0.17 is already stable

haughty rampart
#

so 'not knowing what is in it' is just a crap argument right now

viral sonnet
#

I rather have a crap argument than none at all. We were told enable/disable is in the next release. Now it's not. And what you don't seem to be aware of, entities being moved even further back means less early adopters. As someone that wants to make a dots asset, this target audience just got pushed back 1 year or even more, because now they are not even talking about pure ecs for 1.0 anymore but just hybrid. Less interest, less sales, less direction, more rewrites. This is not a good state no matter how you put it.

haughty rampart
#

def. but they never made clear statements about what would definitely be in the next release

viral sonnet
#

oh they did

haughty rampart
#

nah. they never specified anything definite

haughty rampart
#

'Agree. This approach works well with authoring & live link.

I expect this to land somewhere between 3weeks to 3 months.
It's unclear mostly because it just really changes a massive amount of assumptions in the internals of entities that it is hard to say exactly how long it takes to ensure all of them are handled robustly and as expected. '

maybe between 3 weeks to 3 months is still a maybe

#

that's not a fixed statement

#

'excpect' 'unclear' 'hard to say'

gilded palm
#

Hi,
Im currently using Raycastcommand to dectect obstacles(physics simulation disable). So I have to call physics.SyncTransform on every Update , and that takes so long when I have like 5000 moving objects. So I wonder if moving to ECS physics will solve my problems?
And in ECS if I have only Physics Shape and no Physics Body, will collisionWorld update when I move with Translation? (For Raycasting)
I m new to ECS though

safe lintel
#

Ecs will be faster but physics don’t sync to game objects at all and you will need to learn a whole new api and way of coding. It’s not a simple undertaking to switch if you’re new to ecs @gilded palm

gilded palm
#

@safe lintel I write in that way, render/collider is still Mono and data in ECS and sync through IJobParallelForTransform

safe lintel
#

colliders get converted, you will need to be creating all colliders in code if you want this to work without accidentally also converting render gameobjects to entities. potentially wading into a can of worms

#

try a simple project to see if this is something you find feasible: a cube gameobject is driven by a dots physics rigidbody, while transferring data about collisions and transforms to its actual gameobject.

mint iron
#

maybe between 3 weeks to 3 months
just saw the timestamp on that, may 2020 πŸ˜†

viral sonnet
#

when your worst estimation is still factor 10 off 🀣

still pewter
#

I found that whenever I spawn an entity it is visible for just a flicker at the world center before adjusting to it's assigned translation.
I was testing my projectile and noticed that it will 'collide' at world center if its target entity happens to be at world center too because of this 1 frame world center position issue.
Is there any solution to this other than just not using world center in my game?

frosty siren
still pewter
#

Setting the LTW directly worked! Thanks a bunch

still pewter
#

Is there a way to check ComponentDataFromEntity.HasComponent(Entity e) for SharedDataComponents?

still pewter
#

Sorry, my meaning is, is it possible to make the ComponentDataFromEntity component? When I do it the normal way I get and error

frosty siren
still pewter
#

When I try
var sharedDataFromEntity = GetComponentDataFromEntity<SharedDataComponent>(true);

I get an error

#

Because it can't convert ISharedDataComponent into IComponentData

frosty siren
#

Yes, because shared component is a special one, it is not stored per entity (it is stored afaik per archetype or per chunk). You can use filtering with EntityQuery or Entities.ForEach. The idea is that you get entities whic has particular shared component value, but not vice versa

hollow jolt
#

will IJobParallelFor work fine with NativeList's ? I'm thinking to build mesh data with it ( vert + triangle + uv's )

still pewter
haughty rampart
hollow jolt
#

not sure when using parallelism will mess up the count of that NativeList or not

#

i mean logically speaking when i use 8 threads and each will populate 3 vertices , that sounds like a disaster ...

haughty rampart
hollow jolt
#

i dont know what u mean by that

frosty siren
hollow jolt
#

trying to convert something like this

haughty rampart
#

if you want to generate meshes for e.g. 3 objects, then 1 job for each object, not multiple (parallel) jobs for 1 mesh

hollow jolt
#

hmmm this is going to be one big object per mesh

#

so 1 parallel job for a single mesh

haughty rampart
hollow jolt
#

sounds about right , still keen to use parallel jobs for each mesh so hopefully burst will work fast enough on the Quest when generating terrain mesh data in runtime 🀞

haughty rampart
haughty rampart
#

how much vertices your mesh has

gilded palm
#

how can I use access components as the same time ?
Entites.ForEach(...).ScheduleParallel (May write)
Entites.Foreach(same query).Run (Readonly)

north bay
#

Anyone checked the source for the new collection package out? Looks like dispose sentinel is going to be removed. I wonder how leak detection is handled then πŸ€”. But if it's actually going to be removed you could store native collections in components and maybe even nest them (?)

haughty rampart
#

hopefully not

north bay
#

Nesting them would be huge
Writing complex structures with full safety 🀩

haughty rampart
#

nesting native lists is gonna destroy performance

north bay
#

Oh I'm thinking more about allowing stuff like this

NativeList<Snapshot> freeSnapshots;

struct Snapshot
{
    public NativeList<GhostComponent> Ghosts;
    public NativeList<byte> SnapshotData;
}```
This change would also allow storing native collections in ISystems
safe lintel
#

theyve been pretty clear buffers are for list type use cases, without any hints of that changing so i kinda doubt this will change

devout prairie
#

That was fixed length arrays though

tight blade
haughty rampart
#

yes yes no

full epoch
#

Does UITK + new Input work with entities - i read on forum that if both are present in the project errors appear - is this fixed for 2020.3.24?

tight blade
#

new input does not work with entities, afaik

full epoch
#

damn

viral sonnet
#

you can't sample input in a job but you can sample outside and provide an input struct to the job

tight blade
#

man, I want the promise of ECS/DOTS so bad, and I just feel so helpless about its state, especially if UE5 is building a competing workflow

full epoch
#

sadly they(epic) do - plus some python like scripting language will be added but not sure for what it can be used

tight blade
#

so they are building some kind of ECS like thing over there?

full epoch
#

i think they do even api is similar lol from what i saw

viral sonnet
#

yeah, and it will probably end up better πŸ˜„

#

unreal programmers are top notch

tight blade
#

and that's Mass? or is that something else and Mass uses that?

viral sonnet
#

yes, afaik it started out as crowd simulation feature

tight blade
#

I can see why they would need to use something like ECS to accomplish that. And now they're spinning off that API for customer use?

viral sonnet
#

seems like it, yes. and they are quite far ahead because rendering and animation is already done

full epoch
#

i dislike c++ this is why i love unity and also i think their new scripting language will not be replacement for c++(not sure 100% though)

tight blade
#

Jesus. so not liking C++ is the reason to stay? I mean look, I'd love to be making games in Lisp and Rust, I would. But... I mean C# vs C++? To me that's like being stabbed in the eyes or having bamboo under my fingernails

full epoch
#

xd

tight blade
#

When I'm writing burstable code I'm pretty much circumventing all of C#'s abstractions anyway

#

its basically C++ that lives in C# files and uses C# libraries

viral sonnet
#

I don't dislike c++ it's just much easier to get into an engine with C#. At the end, C# gets into it's own way when it comes to performance so it's a blessing and a burden at the same time. Main reason I like Unity is because of multiplatform

#

and yeah, burst is pretty much like C++ without stupid header files

tight blade
#

Unreal has platform restrictions?

#

sorry, I'm pretty ignorant

#

I mean right now I'm restricted to "no platforms because the software will never be finished" with Unity

#

I mean Fortnite is on everything, right? and that's Unreal

full epoch
#

btw rust has pure ecs engine called bevy - but its still a baby engine

tight blade
#

yeah, I'm sure it does. I'm a thoroughly disillusioned programmer turned data scientist, and my opinion at this point is by the time we get Rust into a shape that it gets enough adoption to create a fully fleshed out game publishing engine, we'll be producing games NoCode style with AI producing jobified artifacts that run even faster

#

Rust is like the John Henry of programming languages. One, final, ultimate stand before AI gets sophisticated enough to replace human coding

#

it will be glorious. Rust in it's full glory. Peer 2 peer, webgl compiled applications that run securely on any device and don't track your data. they'll be built by teams of expert programmers in <50% of the time that large teams produce massive coorporate funded apps.

And then 1 year later, GPT-5 will be come out, and people will just have to describe their program to a chatbot and it will get pooped out, with all the data owned by google

#

The point is, what the hell am I doing with my life. For all I know at the rate we're going the world is literally going to end before Unity has a paradigm that fully enables me to create my vision

#

Epic might be the bad guys, by god I surely do believe that, but I'm trying to get my own revolution started in videogames, and I'm ready to buy weapons from Russia if that's all it takes

tight blade
#

yeah that's pretty cool and the logic of that decision
makes sense to me.

devout prairie
haughty rampart
#

Yes

frosty siren
#

When i use interface inheritance with IJob interfaces i get this error Failed to create job reflection data for type $IGatherPropertyJob: is there some workaround for that, or job interfaces is not supposed to be inherited?

For example

interface IGatherPropertyJob : IJobEntityBatch {}
safe lintel
#

@tight blade i feel your existentialist pain πŸ₯²

hollow jolt
#

what's the best way to convert NativeArray<float3> to Vector3[] ?

frosty siren
hollow jolt
#

what's that

#

this is what i got right now

#

can't use the second overload since float3 is not subtype of vector3

frosty siren
#

NativeArray.Reinterpret<T> will return wrapper native array with T type if it has same data layout AFAIK

hollow jolt
#

ooo nice

frosty siren
#

vector3 and float3 is data same

hollow jolt
#

seems like my package version is old , Reinterpret doesn't exists in my project

frosty siren
#

What version?

hollow jolt
#

Collections 0.9.0-preview.6

frosty siren
#

Hmm, native array is part of ue, maybe you miss using unity.collections?

hollow jolt
#

not sure what u mean

frosty siren
#

I mean using namespace unity.collections