Hello people of the devforum,
I recently helped develop a streaming service for Roblox, called StreamX.
After working on StreamX for around 3 months, I couldn’t help but think:
“What if you could do the same thing but without needing external servers?”.
After some quick development, I’m proud to show you Xenon.
A fast, lightweight, and fairly efficient streaming engine based around the WorldModel class and
some custom sorting mechanisms.
FAQ
WHAT XENON DOES
Takes a folder of game parts (as many as you want)
Dynamically loads them back to workspace as needed
The entire streaming system is 100% configurable using nothing but a single Lua table.
Additionally, extra scripts can hook into Xenon and change configuration at runtime (if configured).
HOW IT DOES IT
Shrinks your part positions using math.floor for more efficient part grouping
Moves and indexes all of your parts inside Server Storage
Indexing is powered by a X.Y.Z folder structure (compared to a looping based system)
(optional) Configure the Xenon script with your settings.
Play your game and see the streaming in action!
Demo Game
Please note: this game has the setting AllowExternalConfig set to true. Normally this is a security risk but since this is a demo game, it’s been left enabled so players can control Xenon at runtime.
Link:
You can grab the latest source code from here (it’s a rojo project):
Please do note Xenon is still in very early testing and shouldn’t be used for massive games. It handles small games pretty well from my testing, but it’s not yet ready for everything.
I’ve seen similar modules such as SteamX (if I remember correctly) which is a “streaming enabled” module that doesn’t utilize “external server”, I don’t see your point?
In fact give me an example of a module that uses an external server, because this is the first time I’ve heard about “external servers” being used in this case, I’m confused lol.
Saying “If I remember correctly” doesn’t mean that one shouldn’t correct you.
Either way, if you want to see how either StreamX or xenon work, see their setup tutorials on their respective posts.
Besides that, Xenon should be faster than StreamX as it doesn’t send requests to an external server to get the parts- therefore less networking usage and overall better performance.
That was an example (hence “cost of precision for example?”), I’m curious to see if the difference in speed is greatly in Xenon’s favor, because StreamX has a video and goes in to depth about it’s module and from the video it didn’t appear as if speed was an issue.
It’s worth noting that thanks to this issue opened by @Crcoli737 I discovered that Xenon was duplicating parts to the point where essentially two maps were in the workspace at the same time.
After patching this, performance has since skyrocketed.
More testing to be done, but overall I’m still just trying to find more ways to optimize.
If you find any performance problems, please open an issue or PR.
Maybe you should make it more like streaming enabled where you parent the parts to the players PlayerGui and that player parents it to workspace upon receiving parts. I dont see why players need stuff loaded that other players have loaded. Still should be performant since its still replication.
Also, do you group parts that have the same rounded position? Or combine things at all? I cant tell from the source since its kind of hard to read. I might just not be understanding what the code does correctly.
It groups parts with the same floored position yes, so technically speaking Xenon is off by a factor of 1 stud but that shouldn’t be noticable in normal gameplay.
I will gladly see if I can make that work, server-side rendering isn’t something I’m very fond of so if I can make that work then I’ll be much happier.