Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Lag in game but not in studio, particle effects?

Asked by
trecept 367 Moderation Voter
5 years ago

I'm getting really bad lag whenever I join my game private and public, but whenever I go to testing mode in studio there's no lag at all and it's totally smooth. I even started a server with 2 players in studio and no lag. It's only when I join in game, I could barely open performance stats since I was having such huge lag spikes.

I'm not sure but my best guess is I made a few (5) items with some special effects (just a few trails, sparkles and particle effects) and they are even in the server storage, but I don't see how this should make any difference, I didn't spam the effects or anything on the items.

Before I get the obvious answers, It's not my computer (obviously since it works perfect in studio, no lag at all even starting a server with TWO players) and it's not my internet since whenever I join the game everything goes laggy on my whole pc and then once I close it, everything's smooth and fast.

Do particle effects and sparkles and trails somehow create this lag?

1 answer

Log in to vote
3
Answered by
Zafirua 1348 Badge of Merit Moderation Voter
5 years ago
Edited 5 years ago

Lag was, is, and always will be the enemy of a Developer.

However, there are many steps and precautions an aspiring developer can take to reduce the amount of lag generated in the Game.

Firstly to answer your question, everything that is in a game will lag. And Particles and Special Effects, Textures are no exception either.

Since you have said that the only assets you have is the Special Effects, I will be cutting out all the other factors of lags and only focus on Particle Effects.

  • Have you checked if the Special Effects you are creating is being used locally and not in a server?

If you are creating a special effect that takes a reasonable amount of memory and connection and putting it in a server as opposed to local, then chances are that that is the biggest reason as to why it is happening.

When you put it in a Server the entire game will be forced to lag depending on the amount of rate and other major components of a Particles. When you put everything in the Server, it contributes to a lot of lag.

A good solutions could be by adding the effect to the Local Player as opposed to putting it in the whole Server.

  • Another reason as to why it would contribute significantly is because of the Distance the Camera is to the Particles.

This is a pretty obvious one I believe. But it still is the major significant issue. If you have a High-Detailed Particle, chances are that when your Camera is close to the particles, it will lag. Because Roblox tries to keep loading until it is successfully loaded, it will generate enormous lag.

If this is your problem then consider changing the Camera property when the Particle Effect takes place. Compromise a little details for Frames.

  • "I do not want to compromise my details but I still want to make it look good."

I then would suggest watching the video, Roblox Particle FPS Boost Script and the model he created Particle Cutter. Basically, the functions of the Particle Cutter is to decrease the details of the particle when the Camera is in a certain distance within the Particle. The details are still lowered however they are not drastically dropped and ugly details.

There are always many reasons and they are not limited to the reasons I listed above. My premier solution would be to still look around and confirm that it is the Particles that is generating lag and not anything else.

Tell me if it is anything else and I will update my answer. Till then, have fun debugging.

0
Where you say checking if it's on the server, does this apply to having these effects in serverstorage? And thanks so much for the detailed answer trecept 367 — 5y
0
correction* I have the particle effects in the tool already in serverstorage, should I instead just make a script to create them when they are taken out? trecept 367 — 5y
0
Yes. It would be better if you clone it to the Local Player. It drops down quite a lot. Zafirua 1348 — 5y
0
No. I don't think you know this but in studio the game is based on your computer, however in game it's based on roblox servers. This means that if your computer is very extremely good it'll run the game very extremely good. Stryfal 0 — 3y
Ad

Answer this question