Help on my new game

Hello Developer Forum! I am making a new game and I have been making it for about a year now and the lag problem has been bugging me very much. Due to the amount of lag in my game I feel like mobile players will struggle playing the game, due to lag, and that it will just overall be hard to play because of it. If you know how to reduce lag I would greatly appreciate it if you would reply to this post with a solution/tip.

Thanks for reading!

5 Likes
  1. Use less parts
  2. Use unions
    3.Only build parts that are visible to the player.

I hope this helped.:grin:

5 Likes

If a player can’t see some of the parts in a build and the build isn’t important, delete them to cause less lag. Use some unions as well like @Crazedbrick1 said. Too much parts create a lot of lag so don’t use them a whole lot.

1 Like

Same thing with what @Crazedbrick1 and @DOUBLEcactus11 said, but another way of reducing lag is to make the unions into a mesh by importing it into a mesh making software and then import it back into roblox as a mesh, but also try not use heap of parts. I hope this helped you to reduce the lag :grin:

3 Likes

I totally forgot about meshes! Those are very useful as well.

1 Like

This article about content streaming may help you. Enabling workspace.StreamingEnabled as stated in the article should reduce client memory usage which is what I am assuming is your problem.

1 Like

To reduce lag, try enabling StreamingEnabled. It should be in a property in the Workspace. What this does is it reduces the amount of parts/objects that the local player can see.

1 Like

There are a few things that can cause lag:

  1. From a building perspective, a huge amount of parts can create a massive amount of lag. As @Crazedbrick1 mentioned, using unions can help reduce the number of parts that are being used in-game.
  2. Infinite loops (for instance, while loops that never end) can often cause problems, especially when a server first starts. Make sure to understand what each function & loop does before publishing your game!

These are the most common things that may cause lag, in my opinion.

Hope this helps!

1 Like

Unions actually increase lag, or don’t change it at all…

2 Likes

…No, unions won’t help. In fact, it might make it worse. Unions will also take longer to load in than individual parts. Loading times will be worse with more unions.

I recommend you use meshes instead. Try learning blender, or turning your unions into meshes.

Here are some useful posts to help out your situation.

Forum Post 1
Forum Post 2
Forum Post 3

I am most definitely not an expert at this field, but I know for sure that unions probably aren’t the best solution. Go read the posts above. In fact, I’m going to go read them right now because it’ll probably be useful in the future.

Good luck.

1 Like

Just to note, SolidModels (unions) store within them every part and union used to build them, meaning they can cause more ‘lag’, you can (as some people have pointed out elsewhere) convert unions to meshes and use them (which gives the benefits of CSG while keeping them fast)

3 Likes

Thanks! 3000000000000000000000000

1 Like

Thanks! I do use Blender for my GFX and sometimes to make some models!

1 Like