So I'm making a new game using LOVE2D called PlayBall which is my variation of Pong, and I want to set up a currency in the game.
So I will set up a variable called money
and set to 0 at the very beginning. Then, you gain currency by winning games: +10 for winning a match, +25 for winning a game, +5 for collecting a powerup.
If I leave the game (or close it), the value should be saved somewhere so I can reuse it again, but I don't know how to do so.
Is there a way to save a variable when you leave a LOVE2D game?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…