there are two anchors allowing wide forward view in whatever direction the player chooses to go. However even as the player starts heading back (which happens constantly in SMW), the camera will keep the target point until Mario hits a predefined threshold, and only then will it lock to the other anchor. This is extremely helpful with SMW’s frequent left/right motion that does not warrant a direction change.The article has a GIF that illustrates two rules of SMW camera behavior, which I will paraphrase:
- When the player moves into the outer thirds of the screen, set the rear threshold to the opposite third, and set the front threshold to 16 pixels from the center of the screen on the same side as the new rear threshold. That is, when the player moves into the right third of the screen (x>171), set the rear threshold to the left third (x=85) and the front 16 pixels to the left of center (x=112), and when the player moves into the left third of the screen (x<85), set the rear threshold to the right third (x=171) and the front threshold to 16 pixels to the right of center (x=144).
- Each frame, move the camera toward a position that puts the center of the player between the front and rear thresholds.
- Forward facing: Move the camera to an offset from the player, and move this offset slowly based on the facing direction until the player is at the trailing third. If the player turns around once the offset is at its limit, stay in forward facing with the new facing direction. If the player turns around while the offset is still moving, go to still with thresholds at the player's current position and 32 pixels in front of that in the new facing direction.
- Still: Don't move the camera. If leaving the thresholds, go to forward facing.
The rule for vertical scrolling in SMW, YI, FQ, and Shinobi is platform snapping. The camera seeks the player's vertical position with one exception: While in the middle of a jump (not standing or flying), the camera does not move up.
What else do these games do right camera-wise, and what could they have done better?
[Split on June 3, 2023, when I realized that all this was sort of off-topic for a discussion about an already released NES game.]