Was reading this article: Using Screen and Game Classes and I was wondering why a lot of tutorials I come across use “extends Game” instead of “implements ApplicationListener”?
Currently, my main class for the game I’m trying to make implements ApplicationListener.
I was hoping to understand “extends Game” more so that I could decide which is better.
If you want multiple states (i.e. menu, gameplay, options, etc) then you can utilize LibGDX’s “Game” and “Screen” helper classes. They are very minimal, and it’s easy enough to write your own state management if you’d rather do something specific (i.e. fancy transitions between states). Game is just an extension of ApplicationListener.
Look at how simple the Game and Screen classes are to get an idea of what they do.