I'm writing a simple 2d physics system using a circle colliding with edges. When the user presses a key the circle's velocity is incremented by some amount in the direction they pressed. There is currently no friction, although that shouldn't be relevant (for example if a character is jumping there's often no friction until landing but walls should still work correctly). There is also a limit to the magnitude of the velocity vector.
When the circle collides with an edge its velocity is projected along the surface of the edge. This allows the circle to slide along the walls, however it causes the circle to accelerate along the surface instead of move at the expected constant speed. Here's a diagram to demonstrate this:
On the left is the first iteration where the red vector represents the velocity and the green vector represents the amount added to the velocity from user input. This combined vector is projected on the wall to produce the blue vector.
On the right is the second iteration where the same green vector as before is added to the current velocity (the same projected velocity from the first iteration), and this resultant vector is projected along the surface to produce the new purple velocity vector.
As you can see the purple vector is larger than the blue one meaning that the circle is moving faster on the second iteration than the first and therefore is accelerating along the wall. The character will continue to accelerate on consecutive iterations along the wall until reaching the maximum speed.
I understand why this happens, however I'm struggling to figure out how to change the logic so that it'll behave in the way games typically handle this. Typically characters accelerate more slowly and have a smaller apparent speed cap the more perpendicular they are moving relative to the wall's surface.