Why the low FPS on mobile?

Hi.

Im trying to understand what is causing super low fps.
Is it engine related or bad optimization?

For example. Below you will see 2 games. One made with cryengine. Which is featuring dynamic shadows… loads of opacity on vegetation and a pretty high poly count compared to my game.
Then take into considering, my game has no shadows. The lighting is set not to cast shadows. No ambient occlusion.

My game runs at 20fps. The other game runs at 60fps.
When doing a profile to see where the bottleneck lies, because according to the stats its in the game thread and not the render thread.
But im only running a simple UMG with the bars you can see.

49b424a5d18d0c33650cbf261c03afb035c6554a.jpeg

Make sure are matching youe texture profile to the device btw.

Thast just it. Textures are max 256x256 And that is just 1. The rest are 128x128 and below. I have no shadows. I have 1 light that does not cast shadows. I have fully rough materials. ShaderComplexity displays everything green. As in there is no shader complexity. I have no normal maps.
Nothing.

Its as run down as it can get. Apart from removing 1 light and setting it to LDR.

Compared to the other game which has Normal maps, specularity, Dynamic shadows, Vegetation, particle effects etc.
Something is amiss.

I have optimized games in the past using UE4. And they run fine. The only thing different is that this game constantly deletes and spawns new cars and actors.
Which i fail to think would cause such a massive slowdown.

If i completely remove UMG i already get a frame increase of 10fps.

Still tracking down this problem. It seems that the GameThread is the biggest culprit.
UMG is eating up a lot of power, and for some odd reason it has a few hundred children in the profiler.
I dont know if this means those are seperate widgets created or would it count widgets plus the things inside widgets.

Gonna keep digging until something makes sense.
I did find a spike which seems to be my spawning of the track

Constant creating and destroying objects can for sure result in performance issues. What most games do when they need to frequently load in and out many of the same objects is load up a large pool of them when the level loads and store them off screen somewhere, then just position them when required and once done with them move them back off screen.

How complex is your UI? Are you doing any logic there, is it just 3 buttons that wait to be clicked? Also, what device are you running this on?

@Xenogenik Thats a good strategy, i will rather do that then spawn and destroy.
@NickDarnell The UI does have some logic. It fires a tick event to position a widget over the actor that created it. I also have a Blueprint interface on my pawn sending damage percentage to the interface and on the widget i have a function listening for that call, then setting the Bar at the bottom. I also have a other events. Every tick you might say the distance is setting the Text top left to distance moved. And the coins are updated when you collect coin top left.

Its a bit hard for me atm to decipher what exactly is happening when using the profiler.



8f05b2121e.png

When i do drill down on the spikes it is clear the spikes are created by the spawning of the new road segments.

442dd2a5fb.png

When i look at areas without spikes it appears Slate draw time take up a lot. What i am unclear about is what exactly is this OnPaint. That goes on forever. There are 53 of them.
Seems like an awful lot. But that is because i am assuming this number is how many widgets are present in the game.

Oh yes my bad. I forgot to mention this is tested on an Ipad2.
On Iphone 5 its running fine. But im hoping to get it run better on Ipad2’s.

Now don’t judge me because i am a new comer, but I have a idea so listen closely ok “instead of creating and destroying the objects and destroying them only, respawn one floor(actor) below the player(actor) so there is always the ones getting destroyed being pushed in head like a endless runner game, then make sure you don’t forget to have one floor actor always following the player actor’s length value and be sitting underneathe the player actor, except not following the height and width values of the player, so the game feels like your average endless runner game, don’t forget if and only if the game is a endless driving or running game, to include obstacles and powerups and bonuses and casualties that if picked up deduct points from the player” :slight_smile:

Agreed. There are other cars and stuff. But those spikes only occur once a while. Im more concerned about overall performance.
The main reason i went with destroying and creating is because it made life easy in terms of spawning new cars, trees, coins and bridges.

I can change the logic a little so instead of using BeginPlay - spawn cars, spawn this and that i can create a custom event to say Moved-> then do all that

Im hoping to get some clarification on the OnPaint im seeing in the profiler.

The painting is recursive, the deeper your widget hierarchy, the more OnPaint’s you’ll see. Looks like you’ve got a lot of widgets in there that are having to be Ticked and Painted. What version are you on? Also, I don’t see any widgets positioned over any actors in the scene. Are you updating a ton of invisible widgets ever frame? What happens if you don’t add any UI except for the distance counter UI?

Hi.

Yes on that frame you don’t see the widgets. They are created when you crash into a car it creates a widget then sets a tick event to position it over the car you destroyed.
So effectively for every car that spawns it creates the widget.

I noticed **10 -15 FPS increase **after disabling that widget. So i will try to only create it once, and then position it accordingly when it crashes the remove it from viewport and add it to viewport as opposed to creating new widgets over and over.

I am assuming that is why i have so many of the OnPaint. That those are actual widgets individually created.
I have also picked up an intermittent drop of 20fps which is directly related to destroying and spawning actors. So that i will change as well to instead just move everything.

I’m hoping moving 40 actors would be less intensive than destroying 40 and spawning 40.
And i will remove any and all lightmaps. I see i have 3 but i don’t require them as im faking all the shadows with planes and materials.

Thanks for the feedback. This profiler and what the elements inside signify still confuse me a little.

Good to see I was of great help.

You were thank you Falconsoft

You say your game has no shadows, but I see shadows. :slight_smile: I understand you can bake the shadows for environment, but how do you get a shadow underneath your truck?

guess a prePlaced plane mesh with translucent material…

Dude, this thread is three years old.

I think , it is still relevant. I have the same problem. For example I am trying to create a game for Android TV. The Tv has a Infinity A53 Quad-Core processor and some games run amazing such Beach Buggy Racing or BombSquad, with many polygons and high end visual effects. Then I try to deploy a simple scene almost empty and “stat FPS” report 10-14 FPS, how is that? I understand mobile games needs a lot of tweaking but I think it could be more straight forward some how or something out of the box.

Unfortunately UE4’s renderer is pretty heavy out-of-the box as it’s primarily geared towards high end devices. Personally, I’m not sure I’d look to UE4 for mobile games, but it has been improving recently on account of Fortnite’s success on Android.

There’s a few places you can start looking to try and optimise (ultimately performance profiling on PC is your friend);