SeperateASync Feature Suggestion

I feel like a way to seperate unions in a script would be useful, alongside with client union calculations. I want to make a destruction game and I feel like some tool to undo stuff would be cool. Also I want to make cutscenes where stuff gets broken so I need client union calculations for that. I feel like the SeperateASync would be something I want more though as it would be more beneficial toward everybody rather than client union calculations as that won’t be used as much.

4 Likes

Part A Part B

Clone em both

Union them

The part a part b you cloned are your “undos”

3 Likes

It would just fill the storage with those and it wouldn’t be ideal.

Guess what! You will never have a game that has empty storage, 0 memory usage :open_mouth:

I know, but I’m saying it’s not the best choice to do that. A newer feature would be the most practical solution. If I just have hundreds of parts in ReplicatedStorage and ServerStorage it will just be very annoying to identify them along with the risk of performance issues.


Is this not what ur looking for?

Wish Roblox would give more information about how their solid modelling system works. My guess is that these operations are destructive and no actual information of the original parts are kept at runtime, so it might just be impossible. Would be nice to know if that’s true, though.

Union operations internally save the instances that were used to create the union as part of their data, iirc it’s called ChildData by the engine or something like that and it’s basically an embedded rbxm file within the union data. It may be different since I last looked at how union data worked, you can definitely find some good references for how it works if you search for an implementation of the rbxm format.

My guess is that unions generated at runtime likely don’t populate this information because it would allow them to drastically reduce the memory complexity for nested unions (It would allow for O(1) instead of O(n) memory scaling)

Unions would already store this data internally if you could separate them, so it would still consume memory for the instances either way, it’s unlikely that the memory cost actually matters to you in practice in this context. If you are trying to separate unions you generated at runtime, you should definitely just store copies of the parts you used to generate the unions, that seems like an appropriate solution to me.

Storing data that’s related to an instance or part is generally really common, you can look at something like sleitnick’s Trove module for this if you aren’t familiar with these sorts of libraries. There are also some other alternatives for cleanup libraries like Maid, and Redblox Utils’ Bin if you want to see some different implementations. In the case of Trove, you would likely want to create a trove for your union & separation data and then call :AttachToInstance so that the trove will be automatically cleaned up when the union is destroyed.

No, thats subtracting which takes a chunk out of the part. What I’m looking for is a way to undo the union.