The perfect question to introduce Viewport
, which has been added today.
Viewports are made especially to deal with this very problem. Have a look at this news and the wiki page to see how those work.
However, those are only available in the nightly build.
What you are actually doing at the moment, is implementing the "ScreenViewport
" yourself, which always keeps the size of the screen, which leads to no stretching, but it will show more or less of your world.
What you are probably looking for, is FitViewport
or maybe StretchViewport
. Those offer you a virtual screen size and will scale this to fit your screen.