Parallel Luau Developer Preview

I’m impressed, a multi-threaded render engine, written in Lua inside ROBLOX?
I’m astonished, that’s amazing.

This is a step in the right direction, although I’m greatly struggling trying to see if it’d be of any use for my game which uses a core loop to update tons of objects per frame (creates new coroutines for each object so each object can be updated independently). The player can move certain objects around on the map, and it also updates static objects on the map per frame as well. The issue currently is that script activity tends to go way up due to everything being ran “on the queue”, and some delays as well, rather than splitting up that work accordingly. It’s an absolute nightmare trying to optimize a game like this.

Do you see there being a light in the future for something like this?

3 Likes

I’m thinking of Kolmogorov Complexity

Does this mean that games can use more cores?

Wait!!! This came out in December and my what’s new banner just lit up! Jaw drop! So is it close to being a true feature or are there still gobs of testing to be done? I will need a ton of help understanding how to take advantage of multithreading.

If done correctly, could we get away from StreamingEnabled in places with like a million parts? Sorry, this is a long thread. It will take a while to read every comment.

StreamingEnabled is meant to stream in/out parts for the client to see and limit the amount of RAM needed at a given time.
Parallel Lua lets you be able to make multiple calculations on the CPU at the same time (instead of doing 1+1 then 1+2, it does 1+1 and 1+2 at the same time). If you have thousands of moving parts controlled by scripts at the same time, using Parallel Lua can greatly increase your performance.

2 Likes

Got the terrain colors!
image

4 Likes

Just began experimenting with parallel lua, it’s super cool! I’ve noticed there are some functions/methods missing that I’d love to be whitelisted for use within parallel lua functions.
One specifically is ScreenPointToRay - it would make something like raycasting (such as in your example) much easier.

It’s possible to do it by manually calculating the 2d point to 3d position, however that is quite difficult. Since it is possible to do manually, I see no issue with whitelisting it for parallel lua.

Please direct all feedback to Parallel Lua Beta - this thread will be closed and the old preview builds are going to be deleted in favor of the official beta.