Skip to content

Conversation

@rory-cd
Copy link

@rory-cd rory-cd commented Jan 24, 2026

Description

Problem

When walking into walls or trying to climb up ladders blocked from the top, the camera jitters erratically. This is due to the camera perfectly tracking the player, with no easing applied. So when the player sprite is moved away from the wall, the camera is too. While walking into walls isn't something the player is likely to do for long, the effect is disorienting and looks unpolished.

Fix

Easing has been added to camera movement, using a smooth value to apply linear interpolation. This reduces most of the jittery effect.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

On WSL and MSYS2:
Compiled with skm g++ program.cpp -o game
Ran with ./game

Played a few minutes of 1 player and 2 player with no issues.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

Added easing to the camera movement, fixing the jittery effect
when walking into walls or trying to climb up a blocked ladder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant