Hello, I’m Yue Chuang.
Some of the recent development courses and extensions on designing Pygame are in this article.
Most of the movies we watch are 24 frames, with the occasional big budget movie reaching 48 or 60 frames. So why does a movie flow at 24 frames, while a computer game starts at 60?
Here’s the concept of frames. We often see giFs, which are multiple images linked together to give the impression of movement.
A picture in this GIF is a frame. There are 24 pictures per second in a movie, and the number of frames is 24 frames per second, which in English is 24FPS. In movies and games, the higher the frame count, the smoother the picture.
But there’s one big difference between movies and games: movies are made by cameras, while games are rendered by engines.
Fuzzy frame and clear frame
This is an image I took from the Joker movie, and you can see that the image of the joker is blurry. This fuzzy graph is called a fuzzy frame.
Fuzzy frames have the advantage of being able to record all information over a period of time. Let’s say the kid in red, running a distance in 1 second, and the camera is 1 frame per second, then we can see all the movement information of the kid in that 1 second in this frame.
All of the camera shots in the movie are fuzzy frames, which record all of the information that moves in a short period of time. So although the movie only has 24 frames per second, these 24 frames contain all the motion states and motion information within a second, so we naturally feel smooth.
In games, on the other hand, everything rendered by the engine is in clear frames, and unless you have motion blur on, any screenshot must be clear frames at any time.
Clear frames are great for screenshots as wallpapers, but one of their biggest problems is that the transition information between frames is lost. In the game, the character moves from point A to point B in one frame. There is only A picture of point A and A picture of point B, but there is no picture of the process from point A to B. As a result, the frame rate of the game must be much higher than that of the movie in order to look smooth.
Second, frame generation time
Fluency is affected not only by clear and fuzzy frames, but also by frame generation time.
In a movie, a second is 24 frames, which is fixed, and each frame is 0.042 apart. This interval is the frame generation time, the frame generation time is constant, so the frame is smooth from frame to frame.
In computer games, frame generation time is not constant. Frame generation times are different in different game scenarios. For example, if you generate a frame in 0.025 seconds in a snowy environment, you might generate a frame in 0.05 seconds in a forest. As the snow moves into the forest, the frame count fluctuates, causing the picture to look sloppy.
Third, interactive
The movie is just for watching, so we just need to keep the sound and picture synchronized, so we won’t feel violated.
But games are meant to be played, so not only do you need to synchronize your audio and graphics, but you also need to synchronize all of your input with the screen in real time, otherwise our brains will pick it up and it will go against our everyday perception, which can be very uncomfortable.
Generally speaking, the normal response time for the average person to a game screen is around 100ms. If we move the mouse and the mouse moves the screen to the display within 100ms, you won’t notice the input delay.
One of the things that our game engine works on is that it takes 3-5 frames to get back to the screen. If it’s 60 frames, the latency is around 70-110ms, which you won’t notice, and if it’s 24 frames, it’s 150-240ms. If it’s 30 frames, then the lag is between 100 and 180ms, which means that your actions are delayed when they are fed back to the screen, and that’s not what you would expect, and it’s very uncomfortable.So the bottom line here is that the lower your frame count, the higher your latency, and obviously 60 frames is the upper limit around 100ms, which means that if you’re using a PC, you need to be above 60 frames to get your mouse back to the screen within 100ms.
Above is the computer game frame rate need very high reason, everybody has what want to add can leave a message!