I consider yann project as more close to the behaviour explain in Joannesalfa pics ! ... these kind of effect in really useful in multiplayers on same screen game !.
CodeMasterMike magic formula works, considering P1 and P2, 2 sprites for player1 and player2 :
(Layout with unbounding scrolling set to "Yes")
On every ticks ->
set layout scale to clamp(1 - distance(p1.x, p1.y, p2.x, p2.y) / (layoutHeight + layoutWidth), <font color=red>0.1</font>, <font color=red>1</font>)
scroll to ( (p1.X+p2.X)/2, ((p1.Y+p2.Y)/2 )
<Yes i put the scroll between P1 and P2 here>
BUT ! ... P1 and P2 size not take in account ...
<font color=red>0.1</font> (10% size min zoom layout can be very small in some cases)
<font color=red>1</font> (100% size max zoom is not a powerful zoom !, just the standard one)
=> So always test and adapt for YOUR game and case ! ;-p