Sunday 8 January 2017

Current Statistics

Idle

Here's the current frame time when the program is idle and not receiving any commands:


As you can see, due to the simplicity of the sphere object, the frame rate is barely effected.
We can work out how many frames per second the user is getting using this method:
1/0.0008 (Frame time in seconds) = 1250 fps (Frames per second)
1/0.0009 = 1111 fps
There is only a large amount of fps difference due to the fact the the unit measures would cause inaccuracies because of Unity's rounding to the nearest 0.1ms.

Selecting

The frame time whilst selecting units:


1/0.0011 = 909 fps
This slight increase in frame time is due to the rendering of the selection highlights. Not much can be done about this, plus the rendering would be done on the fast GPU, meaning that we need not worry too much unless there is a considerable amount of selected units on the screen at once; this is a simple fix, however, as LOD and texture quality at a distance can be adjusted to improve fps without a visual degradation.

Moving

Frame time whilst moving (20x20 grid):


1/0.0013 = 769fps
Frame time increases as expected with more units, however even this small decrease in performance could be optimised by having multiple units use the same path.

Frame time whilst moving (50x50 grid):


1/0.0040 = 250fps
Now we can start to see a significantly large drop in fps, and if more units are added (which will almost certainly happen in an RTS) then the game will not be able to cope with the amount of requests, causing it to skip frames and stutter.

Frame time whilst moving (100x100 grid):


1/0.0300 = 33fps
This is an unacceptable frame drop, and this is without complicated visuals or large amounts of units. 
To improve frame times, processes could be split across frames or the actual process could be optimised.