Not specifically for game but I learnt because of it When I was younger, I played Harvest Moon for Girls and Kingdom Hearts in Japanese since there wasn't an English version yet. Then I started learning Japanese.
I studied Japaneses in school but nothing technical. But it help me discover material so naturally I ended wanting to learn more. I do learn to be able to play games but also ti help me understand other media (anime, manga, dramas, etc.) I recommend Anki for kanji and vocabulary, not so much for grammar.
I started learning Japanese when I first got into otome games, and I'm still stuck on the hiragana chart to this day. But thanks to AI translation and Luna Translator, I can now play Japanese games without any problem.