Difference between revisions of "Frame"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(Creating basic page for the Frame unit. This should be expanded on with more relevant mechanics and addresses.)
 
(Clarifying that the timer isn't blank on the Total Results screen at the end of the game, just when making a save)
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


==Mechanics==
==Mechanics==
* The in-game timer (<code>main.dll+B217FC</code>) is incremented by 1 every frame when the game runs at 60 FPS, and 2 when the game runs at 30 FPS.
** The maximum displayed IGT is 999hr. 59min. 59sec., which is equivalent to an internal value of 215,999,940 (60 FPS frames) or over 41 solid days of play.
** Since the timer is stored as an unsigned 32 bit integer, it will overflow (wrap-around) back to 0 after around 2 years 3 months of solid play.
** If the timer is less than 60 when a save is made, the save file will have a blank space where the play-time is normally shown, rather than showing 0 sec..
** If Yami is defeated and the game is beaten at less than 60 frames, the Total Results screen will show 0hr. 0min 0sec..
* Many constants and values in-game are also represented in terms of a rate of change per-frame. For example:
* Many constants and values in-game are also represented in terms of a rate of change per-frame. For example:
** [[Health]] lost to being on fire, or health gained via the Wood Mat.
** [[Health]] lost to being on fire, or health gained via the Wood Mat.
** [[Ink]] consumed while drawing on the canvas, or ink recovered over time during normal gameplay.
** [[Ink]] consumed while drawing on the canvas, or ink recovered over time during normal gameplay.
* Whether the game is running at 30 FPS (general gameplay) or 60 FPS (some menus) is determined by the 1 byte Framerate Divisor value located at <code>main.dll+B6AC45</code>.
* Whether the game is running at 30 FPS (general gameplay) or 60 FPS (some menus) is determined by the 1 byte Framerate Divisor value located at <code>main.dll+B6AC45</code>.
** It is set to 1 in menus, and 2 in general gameplay.
** Using tools to change it to 1 during gameplay causes the game to run at 60 FPS, but causes physics and various game mechanics to behave strangely.

Latest revision as of 17:42, 17 March 2024

Note: This page describes a unit used in Okami. To learn more about the values representing quantities of these units, see Reverse Engineering.

Explanation

A Frame is the minimum progression of time in-game. Inputs are polled, the game state is updated, and the image displayed on-screen once per frame. During normal gameplay, Okami generally runs at a fixed frame rate of 30 frames per second (FPS). In some menus, such as the pause and fan menus, the game instead runs at 60 FPS.

Mechanics

  • The in-game timer (main.dll+B217FC) is incremented by 1 every frame when the game runs at 60 FPS, and 2 when the game runs at 30 FPS.
    • The maximum displayed IGT is 999hr. 59min. 59sec., which is equivalent to an internal value of 215,999,940 (60 FPS frames) or over 41 solid days of play.
    • Since the timer is stored as an unsigned 32 bit integer, it will overflow (wrap-around) back to 0 after around 2 years 3 months of solid play.
    • If the timer is less than 60 when a save is made, the save file will have a blank space where the play-time is normally shown, rather than showing 0 sec..
    • If Yami is defeated and the game is beaten at less than 60 frames, the Total Results screen will show 0hr. 0min 0sec..
  • Many constants and values in-game are also represented in terms of a rate of change per-frame. For example:
    • Health lost to being on fire, or health gained via the Wood Mat.
    • Ink consumed while drawing on the canvas, or ink recovered over time during normal gameplay.
  • Whether the game is running at 30 FPS (general gameplay) or 60 FPS (some menus) is determined by the 1 byte Framerate Divisor value located at main.dll+B6AC45.
    • It is set to 1 in menus, and 2 in general gameplay.
    • Using tools to change it to 1 during gameplay causes the game to run at 60 FPS, but causes physics and various game mechanics to behave strangely.