I want my game to be played on multiple mobile devices.
Problem is, the game can be pretty heavy sometimes.
I want to test the game performance in ‘loading time’ in the background, and with the results I get, reduce the objects, Players, lower Render Scale etc… Just for old and weaker devices. Better than nothing.
Another problem is - While loading has a fully black screen, it will be harder to truly measure the game performance because nothing is being rendered to the screen, which is most of the hard work.
Im not sure if this is worth the effort. I would probably just chose reasonable default settings and let the player take it from there. If you want to go the extra mile you could try to check the version of the used operating system. Im not sure how apple handles this, but android phones are usually limited by their hardware to some upper limit of the android version. So checking the android version, you can get a good idea of the maximal available performance. Especially for older versions, thus older phones. Obviously you will still have a wide variety of available performance classes for each version, but at least you can differentiate varying degrees of “old” with this by putting in minimal effort. I would only use this first check to reason about decent standard settings and then let the user do the rest tho. Dont make permanent adjustments the player has no influence on based on something you do. Even if you do a benchmark. They may be in energy saving mode for all you know, or have something take up ressources in the background.
The first order of business is to optimize the game as much as possible. If it‘s heavy only in some areas, tweak those specifically.
Make sure you have at least determined whether the game is either CPU or GPU bound on lower devices (this may differ from high end devices!). There is little to no benefit reducing renderscale if the game is CPU bound for instance.
Measuring device performance and basing game settings on that is problematic at best. Most games simply look at the device architecture like model number or check which CPU and graphics chips are installed and base decisions upon that. Because taking actual measurements could be wayyyy off if in that exact moment the OS decides to perform maintenance routine, the user receives emails in that moment and is also currently streaming music and the next track just starts to be downloaded and decompressed. The result could be a single digit framerate measurement even on a capable device and users end up complaining about the crappy graphics …
SystemInfo can be used to get a rough idea of what the user’s device is capable of: graphicsMemorySize, processorCount, batteryLevel etc. You can compare the user’s system information against some of the most commonly used phone device’s specs out there as a guideline to determine what settings to use.