I doubt there's "an algorithm" for what you want to do. At least nothing more specific than, "Get the data you want into a structure and display it." In the first place, it'll depend on how the data is stored: by game, by player, some other way?
To visualize the timelines of the players focused on a particular game, my first thought is something like a candlestick graph that extends above and below a line representing the current game, where you can see how many games before and after this one a player was in. But whether that's a good choice would depend on how often players change. If players often play a single game and leave again, that'd be a pretty useless graph.
Available for small or large Perl jobs and *nix system administration; see my home node.