To find the number of role-playing games Hai has, we can start with the total number of video games he has, which is 24. He has 6 sports-related games, so the number of role-playing games is:
\[ \text{Number of role-playing games} = \text{Total games} - \text{Sports games} = 24 - 6 = 18 \]
Next, we need to find the ratio of the number of role-playing games to the total number of games:
\[ \text{Ratio} = \frac{\text{Number of role-playing games}}{\text{Total number of games}} = \frac{18}{24} \]
Now, we can simplify the fraction:
\[ \frac{18}{24} = \frac{3}{4} \]
Thus, the ratio that represents the number of role-playing games to the total number of games is three-fourths.