This channel is insanely valuable, the amount of coverage on different important topics here outranks any other channel I've seen, I have no idea why it's not popular
Probably because it covers more advanced subjects, meaning that only advanced scripters would want to watch this. New scripters are abundant but won't care to watch this.
Wow , I really was looking to try and understand parallel scripting a few days ago , can't believe you actually released a video on it today. I'm so glad you did , keep up the unique and amazing videos!
Amazing video, thank you. Can you please make some more tutorials about this topic with more details and examples? - for example how to implement this actors properly with module scripts as i almost never use localscripts - or a few examples on how can one troubleshoot issues and implement multithreading in existing code
Great tutorial! Really loved how you used the micro profiler to demonstrate how the work gets executed. Would be cool if you cover the cross thread communication, but I can do that on my own to hahhaa.
the ONLY criticism I have for this video is please....use either a mic compressor, or noise reduction using Adobe's free tool or something in your editing suite.... you could also use NVidia broadcast as a microphone input, or something similar to that to fix the background audio 🤗
Would absolutely love it if you could show us some use cases for this as I really don’t see much difference between using this and using something like coroutines.
I hope to incorporate it into my newer scripts if you use coroutines they will not be on separate threads they will run one after the other the same way task.defer and task.spawn works this is the first time we have been able to do true multi thread in Roblox
This is used for multi-threading, which will lead to optimization, threads on serialized luau run on one and only core and when threads run on parallel it will create a new core to run in from my perspective
It's good for if you have a mass amount of NPCs that need updating, or in some other cases I've seen pop up recently, as a sort of hacked together CPU raytraced global illumination system. The key here is to break down operations in read only and write only chunks, and move the read only chunks to threads, synchronize them, and then perform all of your writes.
@@monoqqr It cannot run on a 'new' core, as the amount of cores is how many cores your CPU has. That's usually a pretty small amount, e.g. 4, 6, or 8. The game will try to balance your actors between your cores, so if you have 2 cores and 6 actors, presumably it'd run 3 actors on one core and the rest on the other core. This is slightly oversimplified, though.
So, I understand that this has no usage benefit when you consider spreading a large calculation across multiple actors/threads seeing as the parallel threads usually can't influence one another in anyway. Would you happen to know if this would allow threads to continue executing even when a large calculation has halted server-side runtime? I'm trying to get my day loop to continue operating as expected while the server stutters to procedurally process islands, and if using an actor would enable the thread to continue running while the sequence is holding back the main thread, I'd definitely look into implementing this. As it stands I don't really understand the use cases.
There are benefits for instance you can look at my infinite terrain plugin to see how each chunk of terrain generates in a separate actor, your actor has to complete before the end of the frame or it will block the synchronized part you can use a task.wait() to make it wait till the next frame and continue its work, lets say you have a calculation 1 * 1 + 2 * 2 what you can do is make actor1 to 1 * 1 then synchronize and actor2 do 2 * 2 then synchronize then after both have synchronize do 1 + 4 to get the result 5
Right... I understand this already but I have no idea what I could use it for. My game has two scripts and a bunch of module scripts and parallel scripting doesn't allow me to use remote events and functions on top of all... Uses I can think of are, for example, multiple NPCs or something similar
Could you explain and teach us how to use the TextChatService, there isn't really much info about it. I know its not fully realised, but i just want to know what it fully is and how it fully works, and what i can do.
Hey there suphi! Great video as always, although i have a question Put it simply, i have a module that have a start function inside of it, and it will start IF the module has never been started yet, (an internal variable checks it but you get it). My problem is, i throw a warning when you try to start an already started module, and since i also have an internal auto-start (incase the module gets interacted with but it has never been started), the problem comes down to this : When i have two scripts that require a module, 1 script starts the module and the other just does normal stuff, the warning would sometimes appear and sometimes not, since script 1 starts the module and script 2 has an internal autostart, it sometimes throws an error that the module has been started! Any way to fix this? Thanks!
for me i cant even find where the main thread is, for some reason the instead of it appearing as "Main" like in the video, mine is "Main/Render" and therefore when i look in this "Main/Render" thread it doesn't show up any scripts being executed. I've tried different ways to move the scripts into replicate storage, starter player,... but it doesnt seems to work. Please help
Awesome video! I had no idea this was even a thing until now, but I have a great video idea; a plane you can fly in, or maybe a car that drives to a position that you want? I don’t know but those are some cool ones that I think you should try
I am trying to use parallel scripting for some ocean planes (plane mesh with bones) but i get an error "Property Bone.Transform is not safe to write in parallel" .. this is a bummer
Like 98% of properties of anything can't be changed while desynchronized you need to check the documentation to find out what is safe to set while desynchronized for instance you can't set the parts name position size anchored cancollide etc.. all these properties can only be changed while synchronised
I dont understand the use for this really, example i have gertsner wave ocean lets say i would want to calculate all the bone data then synchronize and displace those bones, but how would i even transfer the data without yielding?
so like.. say for, a chunk (voxel blocks) loading system, do i really have to make 64 actors with 64 individual scripts that do the same thing, to run the same function in parallel?.. also great informative video, i was having so much trouble understanding this parallel luau thing because the way people explain it was so alien.. except for this video, so amazing job :D
You could if you wanted to or you could clone more when there are no actors not occupied or you could wait until some of the actors are no longer occupied before doing more work
This channel is insanely valuable, the amount of coverage on different important topics here outranks any other channel I've seen, I have no idea why it's not popular
Probably because it covers more advanced subjects, meaning that only advanced scripters would want to watch this. New scripters are abundant but won't care to watch this.
Wow , I really was looking to try and understand parallel scripting a few days ago , can't believe you actually released a video on it today.
I'm so glad you did , keep up the unique and amazing videos!
That last part explains a TON, I've been having weird bugs and this explains it.
great tutorial, learned a lot about the micro profiler
Amazing video, thank you. Can you please make some more tutorials about this topic with more details and examples?
- for example how to implement this actors properly with module scripts as i almost never use localscripts
- or a few examples on how can one troubleshoot issues and implement multithreading in existing code
Great tutorial! Really loved how you used the micro profiler to demonstrate how the work gets executed. Would be cool if you cover the cross thread communication, but I can do that on my own to hahhaa.
Love your keyboard sounds 🥰🥰
Me too I have Outemu brown switches on the Magicforce keyboard and I'm very happy with them
the ONLY criticism I have for this video is please....use either a mic compressor, or noise reduction using Adobe's free tool or something in your editing suite.... you could also use NVidia broadcast as a microphone input, or something similar to that to fix the background audio 🤗
My newer videos have a new mic that's a lot better
Amazing video really helped me with multi threading and usage of actors
Would absolutely love it if you could show us some use cases for this as I really don’t see much difference between using this and using something like coroutines.
I hope to incorporate it into my newer scripts if you use coroutines they will not be on separate threads they will run one after the other the same way task.defer and task.spawn works this is the first time we have been able to do true multi thread in Roblox
This is used for multi-threading, which will lead to optimization, threads on serialized luau run on one and only core and when threads run on parallel it will create a new core to run in from my perspective
It's good for if you have a mass amount of NPCs that need updating, or in some other cases I've seen pop up recently, as a sort of hacked together CPU raytraced global illumination system. The key here is to break down operations in read only and write only chunks, and move the read only chunks to threads, synchronize them, and then perform all of your writes.
@@monoqqr It cannot run on a 'new' core, as the amount of cores is how many cores your CPU has. That's usually a pretty small amount, e.g. 4, 6, or 8. The game will try to balance your actors between your cores, so if you have 2 cores and 6 actors, presumably it'd run 3 actors on one core and the rest on the other core. This is slightly oversimplified, though.
Thanks!
Your very welcome and thank you for the support :)
Amazing, I don't understand MicroProfiler Debug much until your video. I already donated to you :D Thanks mate
I'm happy my video helped you learn something and thanks for the donation
You are doing Gods work my friend.
video idea : caves in noise generation
4d noise map
Roblox noise map inverted
I have no idea what this video is trying to teach but i liked the explanation, nice vid!
This video is the first steps to understanding parallel scripting :P ill have more demonstrations in future videos
Incredible video
So, I understand that this has no usage benefit when you consider spreading a large calculation across multiple actors/threads seeing as the parallel threads usually can't influence one another in anyway. Would you happen to know if this would allow threads to continue executing even when a large calculation has halted server-side runtime? I'm trying to get my day loop to continue operating as expected while the server stutters to procedurally process islands, and if using an actor would enable the thread to continue running while the sequence is holding back the main thread, I'd definitely look into implementing this. As it stands I don't really understand the use cases.
There are benefits for instance you can look at my infinite terrain plugin to see how each chunk of terrain generates in a separate actor, your actor has to complete before the end of the frame or it will block the synchronized part you can use a task.wait() to make it wait till the next frame and continue its work, lets say you have a calculation 1 * 1 + 2 * 2 what you can do is make actor1 to 1 * 1 then synchronize and actor2 do 2 * 2 then synchronize then after both have synchronize do 1 + 4 to get the result 5
Right... I understand this already but I have no idea what I could use it for. My game has two scripts and a bunch of module scripts and parallel scripting doesn't allow me to use remote events and functions on top of all... Uses I can think of are, for example, multiple NPCs or something similar
bro i,m having the same problem
Thanks, very interesting
Could you explain and teach us how to use the TextChatService, there isn't really much info about it. I know its not fully realised, but i just want to know what it fully is and how it fully works, and what i can do.
Hey there suphi! Great video as always, although i have a question
Put it simply, i have a module that have a start function inside of it, and it will start IF the module has never been started yet, (an internal variable checks it but you get it). My problem is, i throw a warning when you try to start an already started module, and since i also have an internal auto-start (incase the module gets interacted with but it has never been started), the problem comes down to this :
When i have two scripts that require a module, 1 script starts the module and the other just does normal stuff, the warning would sometimes appear and sometimes not, since script 1 starts the module and script 2 has an internal autostart, it sometimes throws an error that the module has been started! Any way to fix this? Thanks!
Make the start function private and simply call the function before you return the module no need for a variable to keep track
for me i cant even find where the main thread is, for some reason the instead of it appearing as "Main" like in the video, mine is "Main/Render" and therefore when i look in this "Main/Render" thread it doesn't show up any scripts being executed. I've tried different ways to move the scripts into replicate storage, starter player,... but it doesnt seems to work. Please help
14:00 Something strange happens for me, for both scripts the connections inside gets executed, but they all fall under localscript1.
Awesome video! I had no idea this was even a thing until now, but I have a great video idea; a plane you can fly in, or maybe a car that drives to a position that you want? I don’t know but those are some cool ones that I think you should try
guys Is there I one who doesn't see script working?
I am trying to use parallel scripting for some ocean planes (plane mesh with bones) but i get an error "Property Bone.Transform is not safe to write in parallel" .. this is a bummer
Make sure to read the thread safety part of this article create.roblox.com/docs/scripting/scripts/parallel-scripting
ctrl+p opens quick search
could you cover up ways to use this as well as the difference of running thread-safe code to running code that is not safe to read
I hope to incorporate multiple threads in many of my future videos when it's feasible
Parallel Luau looks unpredictable
Thanks, I'd be really grateful if you did an introduction to coroutines
I personally never use coroutines but maybe if I got some extra time I can make a video about it
You briefly mentioned that CPU determines worker threads. Is there a max number?
Don't think so
🙌
Should I use it instead of single thread on every scripts?
Most likely no
whats the point of syncronizing scripts? I feel like there's a performance benefit here but I need it explained
Not all properties can be set while desynchronized so you must synchronize to for instance set a parts name
@@5uphi can you give me an example
Like 98% of properties of anything can't be changed while desynchronized you need to check the documentation to find out what is safe to set while desynchronized for instance you can't set the parts name position size anchored cancollide etc.. all these properties can only be changed while synchronised
@@5uphi what the... why do i feel like i've been scripting games all wrong ;-;
7:10 "Lua" option doesn't appear anymore :(
same, did u find a solution?
could this scripting method be useful for wave function generation, such as wave function terrain generation, and map generation?
It's useful if you want to do a heavy task multiple times
I dont understand the use for this really, example i have gertsner wave ocean lets say i would want to calculate all the bone data then synchronize and displace those bones, but how would i even transfer the data without yielding?
you can use a bindableevent to send data
Thank you!!!!!!1
Your very welcome
so like.. say for, a chunk (voxel blocks) loading system, do i really have to make 64 actors with 64 individual scripts that do the same thing, to run the same function in parallel?.. also great informative video, i was having so much trouble understanding this parallel luau thing because the way people explain it was so alien.. except for this video, so amazing job :D
You can make one actor then clone that actor
@@5uphi Then keep firing the bindable events on each actor? and when all 64 are occupied, start firing on occupied ones?
@@5uphi ?
You could if you wanted to or you could clone more when there are no actors not occupied or you could wait until some of the actors are no longer occupied before doing more work
Can you make a grenade?
😍😍😍😍😍😍😘😘😘
U sound like turtle derp
iv never heard turtle derp before
@@5uphi he is an old minecraft youtuber i used to watch. He privated all of his videos a couple months ago