How can I create a recursive query over a column that has gaps?
To avoid gaps use additional CTE:

WITH re_enumerated_games AS 
( SELECT ROW_NUMBER() OVER (ORDER BY id) id,
         id real_game_id,
         home_player,
         away_player,
         home_score,
         away_score 
   FROM games ),