How do you "actually" Reduce lag on already laggy places?

Lag most of the times is careless use of remotes. Example:

When you press the “F” key, the character punches.

The bad approach: firing to the server when the F key is pressed and the server does the punch.
This approach results in latency which to most players appears as lag.

In order to combat this bad approach, you can make it so that when the F key is pressed, animation and sounds are played in the client (to tell the player his input was taken immediately and seem like no lag) and fire to the server for the Hitbox damage.

That way, this careless event usage is solved.

However, this is just one scenario of seemingly Lag. Lag can still occur for more basic reasons such as loads of parts, etc.
some players combat this by making their map load in chunks over a distance, that way not the whole map is currently loaded, only what you need at that time.

Hope this helped.

11 Likes

What Flostrus said is very helpful, when looking at the castle area, there are 5M+ triangles.

16 Likes

First thing is to diagnose it. If the servers slow to a grind and crash you’re running out of RAM. If it’s sudden, report it to Roblox as a bug. For even more details press F9 in game, then go to the memory usage tab.

5 Likes

Meshes load very much detailed structures, so yeah it’s one of the most elements that lag in ROBLOX.
avoid that element and keep building another cases of structures

3 Likes

Actually they load geometry (structure) of meshes, but they’re pretty “standard” I don’t think meshes contribute too much of the in game lag although it will delay the loading of the game, meaning some devices and old computers will not be able to enter.

7 Likes

Use meshes.

4 Likes

Streaming Enabled?

1 Like

A talk from RDC 2018 about improving performance:

17 Likes

I also find that unions often help with lag, try to union stuff such as doors. (Sometimes it’s better to use unions over models too depending on what it is you’re making, such as a wall)

1 Like

Hey! One really helpful thing I discovered is if there are parts that don’t need collision, disable CanCollide. If you have stuff that the player won’t be able to reach, by disabling collision to it, the engine won’t bother generating the collision surfaces for it, and would only focus on rendering it. Sacrifice unneeded detail whenever possible. Like others say, use meshes rather than complex unions. a simple export, triangle polish up in blender, and reimport should really improve stuff. Lastly, things like particles, loads or images, etc are very heavy on the client, so be wise when using them.

11 Likes

sorry to talk late Marcus i was busy xD i wanted to say that your comment was awesome and correct. they load polygons. sometimes they give a bit of lag but yeah. i preffer deleting excessive scripts, or so many structures. the structures can lag because if you see any games with excessive territory it lags, for me yeah only depending of your computer quality.

2 Likes

I used to believe this, but that is actually false. In fact, it’s worse. Unions actually are worse for your game in most cases than not using them. Parts are already extremely optimized, so if you don’t need the union for design reasons, do not use it.

4 Likes

Well I learnt something today, thanks for telling me. I always thought they helped as they reduce the surface area but I suppose not.

1 Like

Yeah, me too. It turns out they actually create way more triangles than just using normal parts. :slight_smile:

4 Likes

A little late to the party, but I just wanted to show this in the thread:

Above is a fairly standard union, once you export it to Blender, you can see the horror of CSGV1.

This doesn’t even include the interior geometry that can’t be seen. Furthermore, unions, unlike parts, are treated as meshes and need to be pulled from ROBLOX servers which slows down load times.

Hence, anchored parts are the best, and then optimized meshes in place of unions if it is practical to do so. (Don’t go meshing galore for a three part union.)

If you do need to use multiple of the same union, make sure that you are using duplicates of a single unions and not remaking it each time, as each union will have to be loaded from a different asset reference.


That said, as others have pointed out, inefficient scripts will almost always lead to laggy places faster than builds.

13 Likes

This is actually quite incorrect. The roblox engine must triangulate EVERYTHING!
Even if the object looks like it is just made by quads, it is still triangualted faces. You can actually experiment with this and load in a part in roblox export it to blender and you’ll see what I mean. Every game engine must triangulate all objects. Reason: Idk why :expressionless:

What makes unions bad then? Well, it takes memory for the studio to save the data on what should happen when the union gets separated. Meaning the negative parts are parts that never gets ‘deleted’ or removed. They just get ‘transparent’.

1 Like

There are no transparent faces. Render mesh, physics mesh, and data on the operations that were performed are stored separately. A complex hierarchy of operations does not have an immediate impact on rendering – the number of faces in the resulting CSG mesh does.

3 Likes

Perhaps I was misinformed. Thank you for correction :slight_smile:

1 Like

To reduce the amount of lag in your place I just recommend using lesser parts and unions,you should also make sure your brick terrain is using a minimum of parts as well since that’s a large load of extra bricks and parts into the place causing it to take longer with loading and increasing the amount of lag.

to add on to this; turn CanCollide off for parts you should never be able to touch. this turns off the hitbox for this part saving more space.

edit: just noticed i replied to a post from three years ago lol

4 Likes