My Game Stops or Lagging Sometime

When I test my game in iPhoneXS, It stops sometimes.
If you see the video, the little square doesn’t move smoothly and stops shortly in the middle of controlling.
What I did is simplely keep pressing the joystick.
And in the game, It spawn background and blocks at first, and it spawn next background and blocks if the little square passed end of current backgraund.

It also happen when I made realy simple sprite charater moving on empty ground.

Is there any setting about moblie optimizing?
Am I spawning too much things?
Please help me.

Seem that in places you are getting high frame times

Frame time is the total amount of time spent generating one frame of the game. Since both the Game and Draw threads sync up before finishing a frame, Frame time is often close to the time being shown in one of these threads.

Are you modifying many dynamic materials? Do you have many overlapping transparent objects?

In the editor try running the shader complexity view F5, and see if you have green (good) or red and white (bad) areas.

This thread might help too

Thank you for help!
Actually those big blocks are dynamic mesh.

I though it’s okay as it’s simple box…
Is it normal to got this kind of frame drop for like 10 dynamic mesh in mobile game?

and is collision count as transparent objects?

Also I could see it’s red when I view via F5…

The red is probably overdraw so lots of unneeded overlapping. Dynamic mesh can be pretty intensive if done often.

Thank you for your help again!
I’ve reduced dynamic mesh and it’s not red anymore but I still have frame drop…


Is the stutter happening when you are Applying mesh booleans?

The big block only spawn when next stage spawned.
So in that video there is noting newly spawned.

BTW the big block is made like this video.

Geometry Script Tutorial - Destructible Wall at Runtime in Unreal Engine 5 | Bool Mesh Operation

The stutters seem to be at rather even time intervals. Are you calling a function by timer set on loop or do you have a tick event with longer intervals running?

You are right! it seems like stutter is happen with intervals. (even though I don’t move!)
I remove all blocks and it still happened.
The only tick event I have is to moving camera…


Try going into all actors & components and check if tick is enabled in the details panel (it is on by default). If you don’t need tick somewhere then turn it off.

It still happen even though I removed everything in the map.
And it feels like it stutters more often.
Do you have any clue what is effect?
image


You could try setting the project properties regarding shadows & switching to classic “Shadow maps”. It should be more performant.

I’ll have to look into the red bottom warning with GC. I’m guessing it has something to do with garbage collection. If you are rapidly creating and destroying objects it will trigger stutters and garbage collection.

If so you should introduce some sort of object pooling

txt2

“Click the dropdown arrow next to Perspective in the viewport, go to Stat → Hide All.”

I couldn’t find Stat → Hide all
Is this the one you said?
image

Click the three lines next to the perspective cube icon => click the checkbox “Show Stats” so that it is unchecked.

I unchecked it! It was checked originally.

It also happen when I build empty map and new project.
Is it like Unreal engine bug?

Could it be that your target device has too low specifications for unreal?

I don’t think so… It’s iPhoneXS and it stuttered when I tested in iPad pro 13

Did you turn off lumen? Probably not needed for a mobile game and it might be pretty taxing hardware wise.

Also try console comand stat unitGraph. It will show which part of the engine is stalling over time as a graph. So you can see where it spikes in processing.

I noticed that there is some log in device log.
Is this mean something?

May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘2a01:4c8:c002:5bff:e5ac:b16d:148e:1c7f’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘2a01:4c8:c002:5bff:ed49:d25d:1e2a:8058’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘2a00:23ee:1c50:3cfe:4dff:c2de:7a20:3626’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘2a00:23ee:1c50:3cfe:6dc1:317c:eba:362e’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘fe80::1:1:1eb7:ff4b’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘2a01:4c8:c002:5bff:186d:6853:19e4:3f16’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:629][199]LogUdpMessaging: Warning: Failed to join multicast group ‘[::ffff:230.0.0.1]:6666’ on detected local interface ‘192.0.0.2’
May 29 18:09:35 Test2[27647] : [UE] [2023.05.29-17.09.35:632][199]LogUdpMessaging: Warning: UDP messaging encountered an error. Auto repair routine started for reinitialization