QUICK DEV TIP #20 UE4 - OPTIMISING: DUMPTICKS

Optimising is something to keep an eye on throughout the development of your game and not just towards the end. However, even with diligent pipelines, things can slip through and that’s where today’s quick dev tip can help out.

Did you know that you can use a console command to generate a list of all the objects that are ticking in your level?

If you would prefer to watch the video version, check it out here

I came across this when we were trying to optimise one of our own games. It’s super simple all you need to do is whilst playing the game enter the console command and enter dumpticks

QDT20_Blog01.JPG
 

You won’t see anything after you do it but if you close your play session and go to your Output Log, which can be found by going Window -> Developer Tools -> Output log. You can scroll down to see a list of all the things that were ticking in your current level at that time.

QDT20_Blog02.JPG
 

The important things we are looking for here are the type of component (somethings are inherently more greedy than other things), the actor name and then if the object tick is Enabled.

QDT20_Blog03.JPG
 

I personally find all this information a bit hard to read and breakdown from the output log so I like to split it out into something more easy to work with. First off I find the log in my project files, which should be under your project name then Saved folder and then Logs

QDT20_Blog04.JPG
 

I highlight and copy the information I need. e.g. from when I did the dumpticks command. You can quickly select the bits below by highlighting the first line then holding Shift and Page Down.

QDT20_Blog05.JPG
 

I can then paste it into Open Office Calc, which is basically a free program similar to Excel. When you paste, it will bring up the below option box. You want to make sure Tab and Comma are selected.

QDT20_Blog06.JPG
 

Doing this will split the information out into separate columns. I much prefer looking at data here because you can sort, delete etc. I would look through the data for any actors I wasn’t expecting to be in this list or actors that are repeated a large number of times. Then I would go back to the editor and investigate the asset in question.

QDT20_Blog07.JPG
 

I want to quickly show you how small things can add up. Take my actor below as an example, it has tick on with very little functionality attached to it. (A better way would be a timer function, if we really needed this functionality).

QDT20_Blog08.JPG
 

It might not seem like much however if you imagine that you are making an open-world game, for example, this actor may end up being scattered across the world and that small cost could easily add up.

QDT20_Blog09.JPG
 

If we take a look at the framerate with the console command StatUnit, we can easily see the effect. By turning off tick on something that we didn’t really need to tick on in the first place, we have saved around 11 FPS and around 4m/s off our game thread, that’s a good win.

QDT20_Blog10c.jpg

This is a super useful technique for helping with optimising and I suggest that you do it periodically throughout the development of your game to catch anything that slips in!

If you want more quick tips & tricks FOLLOW ME ON TWITTER @cbGameDev

Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/