I have a frames per second counter on my game so I can measure performance as I’m sure most of you do too. Now lately I’ve been getting myself a bit obsessed with it, it’s starting to bug me when it drops under 30fps even though it doesn’t stay low for more than a few seconds.
I’m thinking of disabling this fps counter and go with the general feel of the game as it seems to be driving me a bit nuts trying to understand when it fluctuates and what effect it will have for the end user.
What’s your thoughts on the whole fps thing, how hung up over it should a developer be?
You should be very hung-up on it. Find out how similarly intensive games run on your hardware, and if you’re dropping below a reasonable level for the fidelity of your game, optimize. Framerate is the end resultbut yyou’ll want to see what is actually hanging up the performance with a profiler or internal tests.
If it is a game for mobile your target should be dependent on the minimum hardware you’re supporting or a bit above, and for that you want a MINIMUM of 30fps full time for non action or casual games, and 45-60 for quickly moving ones. Nothing will annoy your gaming customers more than an unoptimized, slow, slideshow-esque mess during intensive sequences.
For a desktop game or one with multiple options, the same applies but for lower settings, and obviously higher ones will vary by spec. You want to make it run as well as possible without sacrificing much in the way of visuals etc. Make sure everything is tested prerelease on multiple target devices. Players hate two things most in games: showstopper bugs, or bad performance. You can have the best game ever but either one of those will render it useless.
Only be hung up on it if it drops below 30fps on your baseline machine. So if your min spec target machine is a generic notebook then it can’t drop lower than 30 on that.
Be sure to experiment with settings so it can find a way to be smooth on the min spec machine, while looking good on the high spec machine.
From experience I find its OK to just swap shaders, disable a few fx etc to get it up to 30 on that AFTER development. Don’t go developing something optimising every turn unless you’ve been doing games for years.
I’ll second Hippocoder’s remark about primarily optimizing, if not a veteran developer or very in-depth knowledgeable, towards the end of production barring obvious problems causing unnatural performance drops. So long as you’re in the ballpark, you can generally disable non-gameplay-essential visuals and hit your target pretty easily.
There are around 4-5 or so heavy hitters that should be optimised for CPU.
Pooling (instantiate/destroy). Avoid the destroy part and minimize the instantiate part via pooling
Physics movement that’s written incorrectly - ie using Transform.Translate/Rotate rather than using forces. Not noticeable in game with a handful of rigidbodies/colliders, huge problem if you have 100’s+
Using Finds/GetComponent/etc within update functions
File loads
Doing too much within Update functions. Limit functionality within Update to Input/Movement/Rotation/Animation. The rest should be put in your preferred method of co-routines. I personally prefer Invoke/InvokeRepeating
That should keep you CPU demands at a sufficiently optimised level.
I am of the opinion that as long as your game plays well, it doesn’t matter what the FPS is. ie - if it doesn’t feel like it is lagging to anyone, it does not matter.
Unfortunately, that isn’t really a useful method of optimization. Different devices run at different speeds, and people have different needs for framerate to have it feel “smooth”, where 55-60 is typically thought of for the vast majority of people as a minimum. You don’t want to be running on the ragged edge of playability, but rather have your game be as performant as possible (within reason) for its given visuals/etc. and have it run with objective numbers achieved, not “it looks good to me” as your guideline. This is especially important for minimum framerates, such as when a ton of effects are going off during an intensive scene in your game, where people will notice a large drop more acutely. I’d say you can have some wiggle room on the minimums, but it should still be pretty high, with the average being as close to 50-60+ as possible on your targetted device(s).
The only true measure of “it’s good enough” is by testing on minimal devices. Before the conversion to digital (recently, I might add), all movies at the cinema ran at a constant 24fps. It’s all about how you present it, and how it feels.
Almost all movies STILL run at 24 FPS and there’s a very specific reason that works. For one, your reaction time isn’t dependent on framerate in movies.
Then if your game is not a twitch game, it does not matter - correct? A turn based RPG. A point and click adventure. A strategy game. Hidden objects. etc.
If what you are saying is in essence “reaction time is what matters”, then there are many things besides frame rate that can affect it, and the argument should not be “you should run at 60 fps”, but “Controls should respond promptly” (etc).
Normal film applies a motion blur between frames, and is a consistent 24 frames with even spacing between each one. A computer/mobile device has different frametimes, no motion blur, and is being interactively controlled where people are more critical of motion. Apples and oranges :).
Except reaction time is a HUGE limiting factor. Bringing down the potential time where you can react from 1/60 of a second down to 1/30 or 1/24 is a huge deal.
I don’t mean to be snarky or anything, but just to prompt some thinking here: go ask on a hardware forum how people like an extra 100ms input lag on their monitors. Or how they would love running games at 20fps. You’re in for a culture shock with the people games are being sold to if you actually think what you’re saying.
This is true, as well, for any game involving non-turn-based input it is a big deal.
I’d be pretty hung up on it, as when I play games, the least bit of lag and I don’t care for it. I notice lag quite a bit, and I’m pretty sure that’s how a lot of gamers feel. I’d worry if your FPS was low, I agree with Hippocoder, if it drops below 30 FPS, you better be checking it.
Compare the downwards movement of 30 fps to 60fps. At 33 I’m getting on a bit, the eyes aren’t quite what they used to be, but I can still see a clear difference.
There’s also the input/response time side of things which people have touched on.
And no, you don’t have to press a button 24x a seconds and that entire argument is fundamentally flawed because it has nothing to do with perceiving an image and reacting to the situation, something that is very much important in games that operating in any state other than turn based.
Actually, it’s 41.6ms, and if you miss one frame due to the low framerate, double that and you’re close to what I was mentioning as a ballpark ;). You don’t need to hit a button 24x in a second for it to matter, in fact that doesn’t have anything to do with the discussion. 30fps is easily told apart from 60fps, and on 120hz monitors 120fps is easily told apart from 60fps. However, most people find 50-60fps acceptable. Your knowledge is very out of date about motion… here’s a commonly-linked FAQ that may help clear things up for you: http://www.100fps.com/how_many_frames_can_humans_see.htm
Just to note, airforce pilots with specialized equipment are and have been able to tell apart a 1/200th of a second blip, position and shape, on a screen. However, for the average person, see my above paragraph about what practically matters for gaming.