Simple Example of How to Avoid Load State Abusing
In this we want to make sure the player went through all levels to beat the game in order to earn the achievement. If the player uses a save state to go directly to the last stage and finish it, the achievement won't pop up.
0x06e9: level ID. From 0 to 8 and 8 means "finished the game".
- In the "game finished level".
- The level was increased 8 times.
- Reset the counter if the level decreases.
As this game has 8 levels, the value in the level ID address must be increased 8 times to beat the game. This way a player can't just start the game, load a state to go directly to the last level and then beat the game. He/she needs to go through all levels.
ResetIf is here just to avoid the case where the player keep loading states going back and forth between levels making the hit counter to be 8. If he/she loads a state going to a lower level, the hit counter goes to zero.