How much can roblox as an engine handle?

Hello everyone, I’m not sure what this category this falls under, so I hope this is correct. If not, I’m sorry.

So my friend and his group of developers have this game of theirs which we’re certain is just a copy-paste mess thrown about with little to no regard of where it’s going or what it does. He introduced the problem to me as projectiles lagging the game. So I walked him through the process of debugging the code until we found a function that ties with a projectile. I noticed that the projectile grows with wait() and recommended it’s changed to RunService’s heartbeat function since it looks smoother. I asked him to find how many of the scripts use wait() in place of heartbeat and that’s when we found the game has 1000 scripts in it. So we found the issue, now how do we solve it?

After he tested it he found the projectiles were smoother, but we still noted how slow the game ran even with one person in the game. I suggested getting a plugin that shows how many lines of code are written, and we were met with this atrocity. Even without duplicates/blanks the game had ~160,000 lines, and it got me wondering; how much can Roblox handle?

He and I knew the programmers probably didn’t want to undo 5 minutes of the daunting task of copy-pasting, so I just would like to know if anyone has a general idea of how much the engine can take before it’s unplayable.

4 Likes

Move this to #help-and-feedback:game-design-support, this isn’t the right category

2 Likes

My bad, I’m pretty new to the forums

1 Like

When you press F9 in game and look at the memory, I think ideally you want to be around 1 GB maximum, with most games coming in around 350 - 500 MB minimum.

Anything beyond that I find can become unplayable, but it can get even worse.

At around 1.5 GB the game freezes on loading. At around 2 GB you can’t really publish anything anymore in studio.

So pretty much your answer is try not to go near/over 1 GB; aim at around 500 MB. This is independent for both the client and server.

Someone feel free to correct me if I’m wrong/misguided.

4 Likes

Thanks! I’ll be sure to let them know.

I don’t personally agree with @LordOfLuxury’s response just purely because to look at engines just on the side of memory is pretty much missing entire chunks of the concept behind performance and handling.

In short, it can only handle as much as the server and client machines can handle.

Essay version:

To be quite frank, you cannot put a definition to how much can the engine handle because its usually down to individual computer specifications.

Not to mention as well, that their is performance and then their is actually hitting the limit. If you hit the limit - Roblox engine will not work at all. If you have really bad performance, its still working its just not doing anything in a feasible time.

For the conditions where technically the engine can’t handle it anymore would require one of two things:

  1. The server which is hosting reaches its threshold.
  2. The client which is connected reaches its threshold.

Each game is granted a relatively fair chunk of processing power to handle a game server, you have to remember that servers aren’t like your computers as they are literally just extremely powerful processing units which do as you figured the processing.

An easy way to show the server not being able to handle the engine is smashing it with an infinite non-wait loop. Example:

while true do
end

Eventually until the function is terminated or until generally the game reaches its limit of resources it will constantly loop and do no other processes. This is however easily rectified with:

while true do
   wait()
end

wait() fixes the problem simply because the thread yielded with wait basically have a chance to resume every other frame - this is still bad anyway because in most circumstances we’re just polling as we are just waiting for something to happen. It has its circumstances, you can read more here. Without it the server just gets stuck and your game basically freezes as its only really handling that.

Servers can also freeze up when your doing some super extreme mathematics for some reason, but depending on the amount of processing power you have from the server depends really on how long it takes. Its likely they have some system which constantly allocates and reallocates the processing power to different operations - but I wouldn’t know.

On a client, when your doing client side operations it comes down to you basically hitting the limit of a part inside the persons device. These can be things like:

  • CPU
  • GPU
  • RAM
  • Memory

The CPU will be the main problem in regards to time based operations and feasibility. It wouldn’t be feasible if a frame took 10 minutes to render whereas 30 frames every second is generally acceptable. Frames can get slowed based (usually) on the amount of pre-render operations you have to do and then the amount of processing power you have. The GPU generally is just the same ideology of the CPU really.

Now RAM and Memory is the complete other spectrum?
What if I don’t have the memory to handle it? Although extremely unlikely as you have virtual memory etc this can happen.
image
Which is mighty unfortunate but it can happen if you don’t have the specifications.

But yes, the engine can handle as much as its physical components can handle and how much allocated resources it has to handle it. Either that or its just not feasible timing and so its still handling it, just too slowly that its unreasonable.

The one message you should take however is:
You should probably make your game perform well on the worst specifications purely because you get more players and the people with better specifications get to use max graphics.

This is from my own knowledge, I can’t particularly say this is 100% factual.

8 Likes

Thank you for giving the long and complicated response so I didn’t have to lol.

Yes of course, memory is not even remotely the only variable. I just think for a simplistic way of measuring where your game is at it can be fine. When you’re really serious about it then yes, you have to factor in all of these as well.

I guess that makes more sense than the game client specifically limiting what can be done. I always thought the engine had its limits.

The engine does have limits, but I guess one takeaway is that, in practice, you’re far more likely to overload client and server performance using the engine than you are to reach some sort of actual “hard limit” of the engine itself.

1 Like