In Moon by Duncan Jones, there are several scenes where Sam Rockwell
appears as both clones of Sam Bell.
And in particular, there's a ping-pong scene:
How were these scenes shot? Was it a body double, multiple takes, or computer graphics? I doubt it was the latter, since the film's budget wouldn't even allow for CGI to be used for lunar Spice harvesters rovers.