Announcement

Collapse
No announcement yet.

Performance drops after a few minutes of gameplay

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Performance drops after a few minutes of gameplay

    Hey,

    In my game I have 60 fps when I start running. That lasts for about 5 minutes, and then my performance starts to drop more and more over a couple of minutes until I get around 30-40fps, where it stays roughly. If I lock the phone for a minute or two, and then resume, it steadily rises again to 60 over a few seconds.

    I assume this is to do with my phone getting hot, but my project is very small and simple (see below), running on a Samsung S6.

    I need my game to run at 60 and I've done what I can to hit that target and stick there. None of my materials are complex, I have no AI, very few assets in the level and none of my blueprints tick.
    I don't know what else I can do, as soon as the game has been running for a couple of minutes it just starts to slow down, no matter what I disable.

    Is there anything else I can do to stop this from happening?

    Click image for larger version

Name:	Game.png
Views:	1
Size:	208.6 KB
ID:	1168028

    Cheers,
    Chris


    ------------

    Chris Cook - Level Designer for Fable Legends.
    Lionhead Studios
    Last edited by Piranhi; 12-07-2015, 04:30 AM.
    Piranhi

    #2
    Are you sure it is because of phone getting hot? Do you destroy every unused actor? If those orange boxes are physics actors, you should kill them when they get off screen, also try putting them back into inactive state.

    My tablet and phone also run hot, and tbh i would not play any game on my phone for longer than 20minit. Tablets are better suited for games.

    Comment


      #3
      Since you are on an Android phone, you should get an app that monitors your phone temps, and see if there is a correlation between performance and temperature.
      Marketplace Assets

      Advanced Mobile Input: Marketplace Page | Support Thread ――― Easy Input Remapping: Marketplace Page | Support Thread
      Multiplayer Blueprint Chat System: Marketplace Page | Support Thread ――― Closing Credits System: Marketplace Page | Support Thread
      Minesweeper Template: Marketplace Page | Support Thread ――― Maze Creator: Marketplace Page | Support Thread

      Comment


        #4
        I'm quite sure it's because of the temperature. I know phones perform worse when they get hot, something that CCP talked about with Gunjack. I'd say it's unfair to say that tablets are better suited to games, for example, I've played some mobiles games for quite a few hours, especially games like 'Game Dev Story' and Hitman GO.

        I installed a temperature monitor and this also helps confirm my suspicions. I took three readings. Before I started the game, when the game started getting slow (roughly 5-7 minutes in) and then after locking my phone for a couple of minutes to let it cool.

        27 Degrees - 60fps
        34 Degrees - ~50fps
        28 Degrees - 60fps

        Cheers,
        Chris

        ------------

        Chris Cook - Level Designer for Fable Legends.
        Lionhead Studios
        Piranhi

        Comment


          #5
          Then there is not much you can do to improve this. Unreal is very demanding on mobiles, and i think it will continue to be demanding. You can either move to another engine, or develop your mobile game for next get devices.

          For eg. I develop some games for mobiles, our first game that was made to see whole release process for ios and android, it ran very well on iphone 6plus, nvidia shield tablet had totally no problems with it, but Samsung s5 was very hot after just 5min or so. Because we do not make game overnight, we do not see this as huge problem, our first real game (released in year or so) will be only for top devces at that time (because of unreal), but next game in about 3 years will run great on average device. This performance problem is temporary (for 2-3 years max). Also this is reason why Epic does not push hard to optimize for outdated mobile devices, it would take time to optimize, and when they are done all those slow mobiles would be almost phased out. So get some decent device for testing (i suggest nvidia device with tegra) and keep doing your game. At worst you will have valid excuse to develop game for some more time.
          Last edited by Nawrot; 12-07-2015, 06:47 AM.

          Comment


            #6
            'Use a different engine or develop for next gen devices' isn't great advice here, but thanks anyway.

            Does anyone know what are the main causes of generating phone heat when running a game, is it CPU or GPU operations, or are both equal? I'm creating very few objects and trying to stick to an object pool for anything that needs spawning at runtime.

            Cheers,
            Piranhi

            Comment


              #7
              First, use the Unreal Session Frontend and profile your game to find out where most time is being spent per frame.

              Second, it looks like you're using dynamic shadows and mobile HDR. Those look pretty but are very demanding on mobile GPUs. Even if a modern phone like the S6 can run it at 60fps, it will need maximum clock speed to do it and will burn through the battery and get hot.

              My advice for making lightweight mobile games is to:

              1) Disable mobile HDR. No more bloom, tone mapping or vignetting (you can do vignetting by drawing a material with "multiply" blend on top of the screen either using the Canvas or UMG).

              2) Get rid of dynamic lighting, set all lights to static. For maximum performance, get rid of lighting entirely by using unlit materials. You can use hardcored vertex colors to keep things from looking flat, by either using the vertex painting tool or by baking them in a 3D modelling package like Maya.

              3) If you're still using default lit materials, remember to check "fully rough" and uncheck "use lightmap directionality" on them all (or use the new 4.10 quality overrides to force it on for all materials).

              Comment


                #8
                Thanks for the advice

                I don't use any of the post processing features you mention, but when I set it to use LDR instead of HDR, my colours go really ugly. I'm not entirely sure what's causing it, but I would rather go LDR. I'll have a little investigate and see what I can do.

                And you are correct, I am using dynamic lighting. I was hoping due to the sheer limited amount of meshes it has to render (probably around 20-40 on screen at any time) it wouldn't be too bad.
                I was hoping to add an endless runner mode in, so I would love to keep dynamic lighting in, if possible. It also keeps file sizes down by about 10x the original size. I'll test it though and see what the results are with baked lighting. If it really does help though then I can forfeit shadows

                All my materials are very basic. They are lit, as using unlit removes the shadows, but they're fully rough and use only diffuse and emissive.

                I'll get back to you with any results.

                Cheers,
                Piranhi

                Comment


                  #9
                  I changed the lighting from dynamic to static and although it did get to the same temperature eventually, it did take twice as long to reach that temperature. However, it didn't slow down at all.

                  When running stat game, it was around half the ms of when using dynamic lights.

                  The only down side is that my levels went from 150kb to 3mb, and that was a small level. I know I could reduce that further though with some tinkering, but the shadows already seemed quite pixelated.

                  I'll have another play with some more settings, but it's good to see I can maintain a solid 60fps with a few tweaks.

                  Thanks Manoelneto.

                  Cheers,
                  Piranhi

                  Comment


                    #10
                    If you want very simple game, and make it working on lowest possible hardware, remove all lighting, use simple unlit materials. Your game artstyle is suited for such setup. I didn't even look closer at picture of your game i assumed you already are using unlit materials with no lights. You can fake some shading with dot product and light vector.

                    Size of level increased so much because of lightmaps.

                    Comment


                      #11
                      What do you guys think about using Instanced Meshes? If you have a runner game for example, I see alot tutorials, where people spawn the next platforms and destroy the actors behind them. What if you see like the next 10 platforms, you would have like 10 draw calls just for the platform add around 50 other for your items, characters, pick-ups etc. Would I get a huge boost (we are talking about mobile), when I generate the whole road with Instanced Meshes before the game starts? The map would probably eat more RAM and the loading screen before the level would be longer? Would this save some fps for having a longer loading screen?
                      https://twitter.com/Ninjin42

                      Comment


                        #12
                        Last time i checked instanced meshes were not really instanced on mobile platforms. They implemented them to just work, did not give any performance boost on mobiles. However since then it may be done hardware way like on desktop platform.
                        Last edited by Nawrot; 12-28-2015, 10:17 AM.

                        Comment

                        Working...
                        X