Xenon Streaming Engine - an alternative to StreamingEnabled

Xenon Streaming Engine

Introduction

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)
  • Moves them to Server Storage
  • 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)
  • Checks player positions routinely as configured
    • Calls GetPartBoundsInBox to check what needs to be cloned
    • Clone those parts back to workspace for rendering
HOW YOU CAN USE IT
  • Create a folder inside workspace named Xenon.
  • Move all parts you want streamed (anything a WorldModel can hold) into that folder.
  • Grab the source code from Github and place it inside ServerScriptService.
  • (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.

Questions? Feedback? Tell me!

Cheers,
iiPython

41 Likes

Would be great if we could see a demonstration and some reasons why we should prefer this module over others.

9 Likes

I mean, not having an external server already makes it better.

2 Likes

Who said anything about using external servers?

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.

2 Likes

StreamX uses external servers though.

2 Likes

I said if I remember correctly lol, nevertheless is it wrong to want to see it in action?

Also and even if Stream does in fact use an external server, how can you compare? That’s why I want to see it in action lol.

1 Like

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.

5 Likes

StreamX utilises an external web server, adding another point of failure.

2 Likes

That’s what I was asking for from the start lol.

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.

1 Like

It wasn’t, until the servers got loaded. The video was filmed on a testing server with no load.

It was common that parts would take several minutes to load in large games with 100’s of players.

1 Like

StreamX utilized external streaming servers to send and load parts from, Xenon is completely roblox-only with no such servers.

Because of this, Xenon can:

  • Stream descendants such as Sounds, Meshes, Decals, etc.
  • Effectively stream from ServerStorage without requiring an external server to be online
  • Load parts faster compared to StreamX since Xenon doesn’t have to unpack received parts
  • Change part states while streaming (StreamX parts were completely static), so unanchored parts can move (assuming a script is moving it)

That’s pretty much my comparison list, I’ll eventually have some videos and or pictures of it in action.

5 Likes

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.

2 Likes

Glad I could help. I would have made a pull request but just didn’t have the time.

1 Like

uhh it deleted too many parts when I put it in the folder

1 Like

RopeConstraints don’t work for me.

1 Like

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.

2 Likes

I would recommend you create an issue on the GitHub repository, it tends to get fixed faster that way.

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.

Please define “too many parts”. Is it deleting things outside of the Xenon folder or something else?

i don’t have github :confused:

it deleted almost everything in the Xenon Folder

1 Like