I decided to look at my junior year biome project, which had a very curious issue. The game would run smoothly on the desktop computers in both viewport and gameplay, but on my laptop, it would only run smoothly in the viewport of the editor, but would lag a lot during gameplay. For the Desktop, the viewport would run at 120 FPS and the laptop viewport would run around 60 FPS. To make sure it wasn't my laptop, I ran a couple of projects that were much more hardware intense, and they were running perfectly fine, meaning the issue was the biome project.
I wanted to resolve the issue and have the game run smoothly on both desktop and laptop.
LAPTOP GAMEPLAY
The first thing I did was enter the project so I could get the stat units and fps. I opened up the project on the laptop first and got the stats for gameplay only then did the same for the desktop, which I wrote down on a google sheet along with notes that would be important to keep in mind before going focusing on optimization.
DESKTOP GAMEPLAY
The results of deleting the folders significantly dropped the total storage of the project from 16.5 GB to around 2.75 GB.
As mentioned in the notes, the game has two level maps, one for a menu and another for the game itself. Since the menu level is a duplicate of the gameplay, the first thing I knew I had to do was to clean up that up first then move onto whatever effects the main level.
I looked through the optimizing views to see what could possibly contribute to the FPS drop. While there are only 2 spots of concern, they are minor and out of the camera's view so the player won't overlap with them, When taking closer look, only a handful of enviornment assets need to have their LOD's adjusted, and the shaders are perfectly fine.
LIGHT COMPLEXITY
LOD'S
COLLISIONS
SHADER COMPLEXITY
After doing a little more digging, I came to the conclusion that the biggest issues were high texture sizes, overly complex collisions on simple and small assets, and no LOD's on the the higher poly environment assets.
To fix the menu level, I focused on removing any and all assets that won't be visible in the camera as the camera that displays the main menu is only facing the diner in the canyon. This would mean deleting roughly 2/3rd's of the assets.
BEFORE
AFTER
Unfortunately I wasn't able to rebuild the lighting, possibly because the project was made in an older version of Unreal Engine. My solution to fix that was the set the lights, excluding the directional light to moveable and readjust the intensity. The same thing was done to affected assets.
Thankfully this did help speed up the game slightly, but only by a little since this really only affected the main menu. Now to move onto the second part which is to focus on any and all assets the affect the game as a whole.
When deciding what textures to focus on, I paid most of my attention on the assets that had either the most prominence or showed the most amount of details. The textures that were far more higher than they should be were the scattered foliage, trees, and only a handful of environment assets.
Reducing the texture quality had the greatest impact, increasing FPS by roughly 20 FPS
Moving on to the assets, I tackled the collisions first since there were so many assets that had complex collisions that either weren't necessary, or the assets were two high poly. After changing the colisons, I would then edit the LOD's with a number assets being given custom simple collisions due to their unique shapes.
The final Results show an incredibly drastic amount of improvements with the FPS for gameplay on the laptop reaching between 60 and 50 FPS and gameplay for the desktop reaching between 120 and 119 FPS!