Code that uses libGDX and saves me about an hour or so when setting up games. Just a skeleton with things like input handling and a game screen (state) manager. Also note that switching between screens pauses the previous one, if you want to restart the screen dispose of the old one and create a new one.