Difference between revisions of "Lag"

From A complete guide to Super Metroid speedrunning
Jump to: navigation, search
(Created outline of this page, based on the ALttP wiki's page on Lag)
 
(Changing first section from "Common Sources of Lag" as it was on the ALttP wiki, to "Common Lag Reduction Techniques", since that's more relevant and easier to write for in this game's context)
 
Line 1: Line 1:
 
A lag frame happens when the CPU had so much to do in the previous frame, that it didn't finish all of its calculations. Even if the work needed to complete the calculations from the previous frame is minimal, the game still allocates a full frame to finish it off. This frame is essentially a wasted frame in the context of real-time speedrunning since you spent two frames updating the game state only once.
 
A lag frame happens when the CPU had so much to do in the previous frame, that it didn't finish all of its calculations. Even if the work needed to complete the calculations from the previous frame is minimal, the game still allocates a full frame to finish it off. This frame is essentially a wasted frame in the context of real-time speedrunning since you spent two frames updating the game state only once.
  
== Common Sources of Lag ==
+
== Common Lag Reduction Techniques ==
 +
 
 +
Taking damage can cause lag reduction due to the game only rendering Samus every other frame. This is commonly seen during the opening phase of the [[Kraid]] fight.
 +
 
 +
Letting go of a button once it's no longer needed saves on the calculations needed to process the effects of that input. For instance, letting go of Dash once you're at full speed, or letting go of Forward once you're in spinjump.
  
 
== [[Practice Hacks|Practice Hack]] ==
 
== [[Practice Hacks|Practice Hack]] ==

Latest revision as of 08:32, 8 August 2024

A lag frame happens when the CPU had so much to do in the previous frame, that it didn't finish all of its calculations. Even if the work needed to complete the calculations from the previous frame is minimal, the game still allocates a full frame to finish it off. This frame is essentially a wasted frame in the context of real-time speedrunning since you spent two frames updating the game state only once.

Common Lag Reduction Techniques

Taking damage can cause lag reduction due to the game only rendering Samus every other frame. This is commonly seen during the opening phase of the Kraid fight.

Letting go of a button once it's no longer needed saves on the calculations needed to process the effects of that input. For instance, letting go of Dash once you're at full speed, or letting go of Forward once you're in spinjump.

Practice Hack

The minimap requires a significant amount of processing power to display. As a result of the practice hack removing it, the original version had noticeably less lag in many parts of the game, which was especially apparent in Lower Norfair, for Power Bomb lag in The Worst Room in the Game and Red Kihunter Shaft.

Version 2 added "Artificial Lag", which was a feature that added instructions to compensate for the lack of minimap, in order to make the practice hack have approximately the same lag as the original game.

The vanilla game disables the minimap during boss fights, so there is likely more lag than the original game in these rooms, because of the extra instructions performed per-frame by the hack.

See Also

  • Lag & Blanking from Retro Game Mechanics Explained
  • Timing - a comparison of Real Time vs Game Time
  • Processing - a specific discussion of door transition time caused by audio queues
  • Aligning Doors - one of the primary controllable differences between Real Time and Game Time