Pikmin (game)
Pikmin 2
Pikmin 3
Pikmin 4
Hey! Pikmin
Pikmin Bloom
Pikmin Adventure

Frame: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
(→‎Framerate: Pikmin 3, neither on Wii U or Switch run at 60 frames a second. Sourced from Digital Foundry: https://www.eurogamer.net/videos/pikmin-3-performance-video)
(→‎Framerate: Pikmin 2's timestep isn't dynamic)
 
(12 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{game icons|p=y|p2=y|p3=y}}
{{game icons|p=y|p2=y|p3=y|p4=y|hp=y|pb=y|pa=y}}
{{image|Get a gif that shows ten or so frames, and plays them slowly enough for the reader to distinguish each frame.}}
[[File:Frames demonstration.gif|thumb|An animation eight frames long that plays at two frames a second.]]
A '''frame''' is the primary unit of time in a [[Pikmin series|''Pikmin'' game]]'s logic routine. Every frame, the game's world is updated, and the screen is redrawn to reflect the current state of the game. Frames "tick" at a regular interval, in order to provide a seamless stream of images that form the game's video. Processing cannot happen between two frames, meaning that an object's state can only be updated once per frame. Hence, the interval between two frames needs to be low enough to provide a smooth transition between an object's states over time (such as the position in the world map of a moving object), but high enough that the console can keep up with the speed.
'''Frames''' are a series of consecutive images that, when played in rapid succession, give the illusion of movement.


In [[tool-assisted superplay]]s, some tricks or [[glitch]]es need to be "frame-perfect", meaning there is a one-frame window in which an outcome can happen. This makes them quite hard or impossible to perform consistently in real time.
Most screens refresh at a regular interval, usually 60 times per second, and the period when they are ready to receive a frame from the console is known as '''vertical blanking interval''' (VBI). For a game to display its current state, it must perform the following steps for each VBI
* Get the player's input.
* With the CPU, update the world state. The simulation is discrete (e.g. the position of a moving object is changed once per update), with a ''timestep'' that is an estimate of the time it takes to finish the frame.
* With the GPU, render the updated world state to a frame. (Because the CPU and GPU are working simultaneously, there is one frame of latency.)
 
If the console has to process a large amount of instructions, it may fail to do render the frame before the VBI: this forces the console to resend the previous frame (assuming vertical sync is enabled), causing lag. More complex games may aim to render a new frame every ''n'' VBIs, at the expense of fluidity and responsiveness, but maintaining consistency.
 
If the timestep of the simulation is static, then a frame can be considered as the primary unit of time. In [[tool-assisted superplay]]s, some tricks or [[glitch]]es are "frame-perfect", meaning that there is a one-frame window in which an outcome can happen. This makes them difficult or impossible to perform consistently in real time.


==Framerate==
==Framerate==
The ''Pikmin'' games contain complex areas and several objects, more notably, the [[Pikmin family|Pikmin]] themselves, with [[100 Pikmin limit|100]] of them being able to stay on-screen at once. In order for the console to process the world's logic and render all of its elements at a steady speed, it cannot render at a large framerate. ''[[Pikmin (game)|Pikmin 1]]'', ''[[Pikmin 2|2]]'', and ''[[Pikmin 3|3]]'' run at 30 frames per second. The exception to this is the European [[region|version]] of ''Pikmin'', which runs at 25. Other than that, the [[Menu#Title screen|title screens]] of the first two games, and the [[Menu#Options|options menu]], [[Menu#High scores|high scores menu]], [[Menu#Bonuses|bonuses screen]], and [[Menu#Area selection|area selection screen]] in ''Pikmin 2'' all run at twice the framerate of the normal game.
The mainline ''Pikmin'' games contain complex areas and several objects, most notably, the [[Pikmin family|Pikmin]] themselves, with [[Pikmin limit|100]] of them being able to stay on-screen at once. Because of this, {{p1}}, {{p2}}, {{p3}} and {{p4}} target 30 frames per second, half of an ordinary screen's refresh rate (60 Hz).
 
The exception to this is the European [[region|version]] of ''Pikmin'' and ''Pikmin 2'':, if the game runs at the PAL 50 Hz frequency, the framerate is lowered to 25 frames per second. ''Pikmin'''s physics timestep doesn't change, which causes the gameplay's speed to be slowed down by approximately 16.7% as a result, while on ''Pikmin 2'' it is adjusted so that the gameplay speed remains the same. The GameCube version of the first game only supports PAL 50 Hz, while its [[New Play Control! Pikmin|New Play Control version]] and both versions of ''Pikmin 2'' also support PAL 60 Hz.
 
Other than that, the [[main menu]]s of the first two games, and the [[options menu]], [[high scores menu]], [[bonuses menu]], and [[area selection menu]] in ''Pikmin 2'' all run at twice the framerate of the normal game.
 
Most modern games use the time it took to complete a frame as the timestep for the next frame, in order to keep the gameplay speed stable. ''Pikmin 2'' and ''Pikmin 3'' don't dynamically adjust the timestep, which means that lag will also slow down the game. An example of this is the landing sequences of the latter on the [[Wii U]].


Should the console have to process a large amount of instructions, it may fail to do all of them in a single frame, needing to extend the duration of the frame until everything is concluded. If this happens over a large amount of time, it can be noticed by the player. An example would be the landing sequence in ''Pikmin 3'', which oftentimes slows down the [[cutscene]] visibly, but not in a way that negatively impacts gameplay.
{{todo|Why does Pikmin 1 at 50 Hz run slower, if it is capable of dynamically changing its timestep? (Source that it can: changing the vblank rate on Dolphin doesn't change the game speed.)}}


==See also==
==See also==

Latest revision as of 07:44, September 27, 2024

Demonstration of how frames work using an animation
An animation eight frames long that plays at two frames a second.

Frames are a series of consecutive images that, when played in rapid succession, give the illusion of movement.

Most screens refresh at a regular interval, usually 60 times per second, and the period when they are ready to receive a frame from the console is known as vertical blanking interval (VBI). For a game to display its current state, it must perform the following steps for each VBI

  • Get the player's input.
  • With the CPU, update the world state. The simulation is discrete (e.g. the position of a moving object is changed once per update), with a timestep that is an estimate of the time it takes to finish the frame.
  • With the GPU, render the updated world state to a frame. (Because the CPU and GPU are working simultaneously, there is one frame of latency.)

If the console has to process a large amount of instructions, it may fail to do render the frame before the VBI: this forces the console to resend the previous frame (assuming vertical sync is enabled), causing lag. More complex games may aim to render a new frame every n VBIs, at the expense of fluidity and responsiveness, but maintaining consistency.

If the timestep of the simulation is static, then a frame can be considered as the primary unit of time. In tool-assisted superplays, some tricks or glitches are "frame-perfect", meaning that there is a one-frame window in which an outcome can happen. This makes them difficult or impossible to perform consistently in real time.

Framerate[edit]

The mainline Pikmin games contain complex areas and several objects, most notably, the Pikmin themselves, with 100 of them being able to stay on-screen at once. Because of this, Pikmin, Pikmin 2, Pikmin 3 and Pikmin 4 target 30 frames per second, half of an ordinary screen's refresh rate (60 Hz).

The exception to this is the European version of Pikmin and Pikmin 2:, if the game runs at the PAL 50 Hz frequency, the framerate is lowered to 25 frames per second. Pikmin's physics timestep doesn't change, which causes the gameplay's speed to be slowed down by approximately 16.7% as a result, while on Pikmin 2 it is adjusted so that the gameplay speed remains the same. The GameCube version of the first game only supports PAL 50 Hz, while its New Play Control version and both versions of Pikmin 2 also support PAL 60 Hz.

Other than that, the main menus of the first two games, and the options menu, high scores menu, bonuses menu, and area selection menu in Pikmin 2 all run at twice the framerate of the normal game.

Most modern games use the time it took to complete a frame as the timestep for the next frame, in order to keep the gameplay speed stable. Pikmin 2 and Pikmin 3 don't dynamically adjust the timestep, which means that lag will also slow down the game. An example of this is the landing sequences of the latter on the Wii U.


To do: Why does Pikmin 1 at 50 Hz run slower, if it is capable of dynamically changing its timestep? (Source that it can: changing the vblank rate on Dolphin doesn't change the game speed.)
Care to do so?

See also[edit]

External links[edit]