Using Union to reduce part count!

Don’t use unions to reduce part count! I’ve been building for around a year now and I’ve learnt a few things. When I started I used to union parts together thinking it would magically reduce the lag within the game, but it really doesn’t… There are many ways to reduce the lag within a game especially for high brick count, a good way is to counter this is by using teleports and having the other side of the tele far away from the general build, this reduces the render roblox has to do for running the game.

This is also my first post so hello :slight_smile:

15 Likes

This category is used to ask for help. But thanks for the advice nonetheless.

2 Likes

Tbh there’s plenty of these posts around DevForum already. Make sure to use the search bar to see if your topic has been brought up yet.

1 Like

The post title seemed like a question, for your future posts here, you should title your posts that showcase what not to do, as the solution, “Don’t use unions to reduce part count”.

I definitely agree with you with not using unions, the Roblox Titanic dev team is taking huge advantage of mesh parts, and modeling in Blender to create a super efficient ship.
https://devforum.roblox.com/t/titanic-2-0-ship-progress-as-of-april-3rd/112921

1 Like

Using Unions to reduce parts with a question mark would imply it being a question, but I can see your confusion, me and a fellow dev made a city for Skilled Force the city on its on has over 100k parts the boarder has 10k and theres other parts you can go to using tp

Boarder isn’t connected to the city I suggested to Crushed that we publish the game with the boarder in a separate game and it teleports you to the main city game however we’re using a tp

And sorry for posting it here I justed join I didn’t even know how I got in I can’t remember applying

Well, welcome to the DevForum, Velby :slight_smile:

2 Likes

Oh uh, didn’t know this… been using this technique since unions came out. I’m guessing its ok if I try to make a gun that is like 50 parts into a 2 part union gun. Welcome to the forums btw!

1 Like

Although having buildings spread out across your place will reduce lag, it also causes some other undesired behaviour. As you head further and further away from the null point or origin (0, 0, 0) lots more rounding point errors occur and this can cause some weird effects with controls and rendering, other players can seem like they’re sinking into the ground.

This may not affect you hugely, but it’s always a good idea to build close to the origin. Instead of teleporting players, you could make something to spawn different areas in, this way the unused buildings won’t have to be rendered whatsoever.

CloneTrooper1019 demonstrates an extreme example of this here if you’d like to check it out: https://www.roblox.com/games/901033001/The-zone

Welcome to the DevForum!

1 Like

Hey! I know about the render-trick but I am sometimes afraid I am putting the builds too far away than necessary.
How many studs should the builds be apart from each others?

1 Like

got any more techniques? I would be delighted to know, let’s admit that we need all the optimization we can get.

1 Like

For clarification @MarcusDeving and @VelbyDogg, moving things far from the origin is not recommended to help reduce lag as that has negative side effects (as General_Scripter says very well).

There are many other options you can use that do not harm UX. The best being to optimize your builds, removing redundancies and taking advantage of instancing with parts or meshes (preferably not Unions since they’re messy and have redundancies themselves).

You can’t just fill your place with over 100k objects and expect it to run on all platforms without some kind of loading system and serious optimizations.

Message me if you need more help with building best practices.

I strongly advise you to never use union to reduce parts, unions are tricky they tend to take a game longer to generate too.

1 Like

I don’t really have a set amount of studs you should separate the builds however do it until you feel its far enough, don’t separate them too much tho.

Honestly we have no scripting in it yet just parts and it runs fine

I still would not recommend using distance to solve your optimization problems. That’s hardly a band-aid solution to the much larger issue of an unoptimized game.

If you need help, DM me. I’m more than happy to guide you through best practices in optimization. :slight_smile:

Proof that it works tho.

Whoops… But on another note would unions be good for a physics based game like my Sinking Ship game to reduce Simulation lag.

1 Like

They shouldn’t be used to attempt to reduce lag period they’ll cause more lag than anything best way is to reduce part count or not using free models as some can be bugged

As far as I’m aware, the unions themselves take longer to load, but improve overall performance, that is until the player comes into contact with them, unions with CanCollide on cause more lag, the reason for this can be seen if you go into studio settings, and under physics, turn on ShowDecompositionGeometry and then change the CollisionFidelity, you can see the actual area the player can collide with; gives a little insight to when you unions 4 parts in a square and you can magically hit something invisible in the corner.

At least, this is what I’ve gathered using them, and asking people about them so far.