Skip to content

Requests for Comments #10

@thygrrr

Description

@thygrrr

Dear Maintainer, if you have a little bit of time, I'd love to learn more about the internals. :) I'm generally familiar with ECS (maintaining one myself), but not quite familiar with Bevy.

The code looks well structured but has few comments explaining the ECS API/Architecture and its goals. Understandable, for sure, given it's so fresh. 💙

What's a "Fetch"?

This appears to be a core concept of pollus's ECS, but it's hard for me to glimpse from the code what it really represents.

  var t0 = ((IFetch<T0>)t0Fetch.Fetch).DoFetch(world, this);

It seems to be some sort of Archetype access registry?

What's bool Commands.needsSort / Command Buffer "Priority"?

What's being sorted (the command buffers or commands?) The sorting seems to operate by some kind of priority based sorting, what are these priorities?

What are System Parameters?

e.g. in SystemBuilder Create<TSystemParam> and in

public Param<T0> DoFetch(World world, ISystem system)
{
    var t0 = ((IFetch<T0>)t0Fetch.Fetch).DoFetch(world, system);
    return new Param<T0> { Param0 = t0 };
}

Why are Entities stored in a bespoke Pollus.Collections.NativeArray<Entity>?

I can understand why it's useful for certain components that need to get passed on to native functions (I - perhaps incorrectly - tend to prefer Memory<T> over Span<byte> for that), but the Entity?

How are the native arrays pinned / protected against modification, e.g. when Entities move out of a chunk?

Why are components stored in NativeArray<byte>?

Same question, almost, but more along the lines "does that mean managed components are impossible?"

Thank you very much in advance if you find the time, if not, no hard feelings if you close the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions