So,
Is Parallel Luau necessary?
No, Parallel Lua is not required to make an efficient system, nor its it a easy solution to solve inefficient or process heavy calulations, you are still responsible for cleaning up and compressing your code, which how most people solve the issue of heavy lag to their game.
It can help, but that entirely depends on the system you are making, such as terrain generation, or hundreds of NPC’s at a time, if 2 of them are already causing issues to your game, you have some serious optimizing to do.
As with all things, it really depends on the task as already stated, because while you can multithread to get rid of lag related issues, your primary focus should be to be optimizing your code to work with hundreds of NPC’s before you consider multi-threading your system. This ensure you have the best system possible for whatever you need.
(Fairly oversimplified, but it still is relevant to what im talking about)
Take Minecraft as an example, its a heavily optimized game, attempting to load all its textures, creating 3D Perlin Noise using a seed, and Create Chunks for said Perlin Noise. Something to that scale would be horrible for your computer to swallow, so they had to optimize their game, they made it so the insides of blocks are excluded so the game doesnt have to process that information, created a efficient lighting system, and converts the map into a giant mesh. All of these techniques and challenges eventually has a solution, which is how we have the game today. Is the system perfect? No, but its better to not borrow NASA’s computer to run 4 chunks of the game.
Its the same way of how you can use OOP to organize your code, but just because you can use OOP to do that, it isnt a solution to janky, and bloated code. Its still your responsibility to clean that code up.
Thats still a bad thing as you are having more scripts, thus more threads running at the same time, thus more memory usage. You centralize your code to ensure the NPC’s have the same functionality and are doing the same thing, it allows you to make easy changes that apply to all of them unlike what multiple scripts would allow you to do.
Multiple scripts have your Pro’s too, but you would need to heavily optimize them too, if you have to see of of them to their fullestr potential.
Thats if you leave it open to attacks.
Typical systems run a calculation on the Client to confirm whatever they are doing, then they check in with the Server which validates the Clients claims, this is known as a sanity check, and is a effective way to increase your codes security if done correctly.
So in short, its your responsibility to ensure your code is the best that it can be while running efficiently and smoothly, while you can multi-thread, it isnt a solution to unoptimized code, and still is your resposibility as the programmer to ensure that its running the best that it can with or without it.