Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parent children in batchable order when possible #298

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

boatbomber
Copy link
Contributor

Closes #293.

Modifies Fusion.Children's parenting behavior to parent things in a way that works for Roblox's naive greedy drawcall batching whenever reasonably possible. Contains comments for additional context where needed.

@dphfox
Copy link
Owner

dphfox commented Jan 2, 2024

This seems mostly fine, but it'd be nice if it were more general and didn't implicitly make assumptions about what classes batch together.

Ideally it'd either be a general rule (i.e. "try and parent objects of the same class type together") or something that's declarative (i.e. "if you encounter classes from this list, put them together"). That'd free up the implementation from having to communicate those details, and makes it more flexible should this problem come up again in the future for new or completely different class types.

I'm going to defer on this for a bit though. I'd like to see if Roblox addresses the underlying issue first, because if we don't end up having to do this, it's less complexity in our codebase. That in turn means we make less promises to users that they expect us to keep, and there are fewer failure modes.

(In the meantime, feel free to distribute this standalone if you'd like! You don't actually have to mod Fusion to do this; you can distribute it as a separate module that just returns your own Children special key)

@dphfox dphfox added the not ready - blocked Waiting on other work to be done label Jan 2, 2024
@dphfox dphfox removed the not ready - blocked Waiting on other work to be done label Apr 15, 2024
@dphfox
Copy link
Owner

dphfox commented Apr 15, 2024

Unblocking this. It seems like Roblox haven't moved to resolve these issues, so I'd be interested in pursuing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fusion.Children should parent things in batching order
2 participants