« first day (3633 days earlier)      last day (1372 days later) » 

7:50 AM
Alright quick poll: Favourite game engine for 3D? I'm super torn between Unreal Engine and Unity. I'm not a super big fan of either engine's approach to entities (inheritance in UE and pseudo-ECS in Unity) but I've just come to terms that developing a new "engine" from scratch for my game is infeasible :( so now I need help deciding haha. Open for other suggestions too ofc
 
 
5 hours later…
12:51 PM
I'm pretty biased toward Unity. Been using it for years and I love its flexibility. There are alternatives to the "pseudo-ECS" if you prefer a strict ECS. Or if you prefer a different style, we can chat about potential workarounds.
 
 
1 hour later…
1:53 PM
@Charanor They're both good, and both have drawbacks.
Unity is faster to slam together a prototype
 
 
10 hours later…
yo
 
so i'm using unity and nativearray [now i changed to nativelist, instantiating only once at OnEnable with high capacity, using clear and add instead of dispose [dispose only at ondestroy when game closes] with no success] plus jobs [raycast and boxcast] and unity like creates 12000 GC Alloc calls in profiler

what could i be doing wrong?
i do a lot of raycasts/boxcasts, like 9000 tests in background, each time i call the function manually, for testing, but it's really fast. the only problem is the gc alloc causes a little stutter. but i thought using the nativelist would solve the problem as the doc says the array is unchanged when i call clear and add [only if the capacity is smaller than the new lenght, but i used the constructor with a really high capacity value]

"If the list has reached its current capacity, it copies the original, internal array to a new, larger array, and then deallocates the original."
:D
 
what are you putting in the array?
 
first i do this:
[NonSerialized]NativeList<RaycastCommand>commands1;
void onenable(){
commands1=new NativeList<RaycastCommand>(9216,Allocator.Persistent);
}
 
so RaycastCommands
these all have to be allocated
 
11:43 PM
then in the function, I do this:
Vector3 direction1=Vector3.down;
commands1.Clear();results.Clear();for(_i=0;_i<Nodes.Length;_i++){
Vector3 origin1=Nodes[_i].PositionAtGrid;
origin1.y+=(NodeHalfSize.y-.05f);
commands1.Add(new RaycastCommand(origin1,direction1,NodeSize.y));results.Add(new RaycastHit());
}
@Almo oohh
 
don't ping me if I'm right here
the noise is annoying :)
 
sorry, i thougt the button was for linking the next message
so
i'm planning to
 
not a big deal
 
put it all in a coroutine and call yield return every now and then inside the for loop
do you think it'd help
 
help what
you're still going to get a ton of allocations
 
11:46 PM
like, the problem is that the allocations all happen at the same time, causing a spike
 
ok then, a coroutine might help that
try it, see what your profilier says
 
i was thinking i could add the yield return to mimic the gc collect that unity uses now, spacing the calls
 
already, by using profiler as you have, you're way ahead of most people with a problem like this. :)
 
we usually have to work hard to convince people to use one :D
 
11:49 PM
i suffered so much before learning about the profiler xD
like, i didn't even know i could use visual studio AND unity's profiler.
"attach to unity", something like that
are you a script dev, artist, animator?
i finally had courage to enter a chat again, i'm really shy and sometimes i miss other programmers to like ask for help, or help, or just talk
 

« first day (3633 days earlier)      last day (1372 days later) »