If you update your code on GitHub then I’ll take a look,
but I might not get chance until tomorrow.
Are you definitely clearing the screen?
At the moment I notice you’re putting
arduboy.display() in every single state function.
Usually it makes more sense to just have them once in the
// put your main code here, to run repeatedly:
//title screen start
Also I just noticed my code should have been using
arduboy.everyXFrames rather than
(That’s what I get for rushing code so late at night.)
Bonus tip, game state works better as an
enum class GameState
And the state is changed like:
gameState = GameState::TitleScreen;
The primary advantage of this is that your code becomes more self-descriptive,
but the other key advantage is that you can’t accidentally do this:
// Hard to find bug if using `int`
// But an easy to spot compilation error with enum class
gameState = 5;
One last thing, calling
setup is redundant,
arduboy.begin() already calls both of those.