Hello,
I’ve recently been working on a water simulation module called RoPhys and have reached a point where I can’t progress that much without using Parallel Luau.
I have no idea how to use parallel luau and need some help.
Also, I have a few questions,
Should I divide the simulation grid into one chunk for each actor or should I just simulate in an order?
Are there any other things I can use to make parallel luau easier?
To quote them from the article talking about parallel luau
For example, if you want to enable raycasting validation in parallel, it’s reasonable to use 64 Actors and more instead of just 4, even if you’re targeting 4-core systems. This is valuable for scalability of the system and allows it to distribute the work based on the capability of the underlying hardware. However, you also shouldn’t use too many Actors, which are hard to maintain.
This implies you should make a lot. But if you have an incredibly large number of cells then you should split it into multiple chunks per actor. The exact values are kind of give and take though so you’ll just need to experiment.
Depends on what you mean by easier. You could probably wrap a lot of this functionality into calls you find more intuitive. But ultimately it’s pretty close to as simple as it gets in terms of parallel scripting. Maybe mildly annoying because of the actors, but you basically just dispatch functions to run in parallel. So just follow good desynced practices and try to need to synchronize data between them as little as is required.