I'm trying to make a jumper type game for android and I am having some trouble getting the screen to function correctly. I have a camera and a viewport but I dont think I'm using either of them properly.
camera = new OrthographicCamera();
viewport = new FitViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), camera);
camera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
It's my understaing that Gdx.graphics.getWidth() gets the width of the screen resolution no matter what device it is on?
camera.update();
game.batch.setProjectionMatrix(camera.combined);
game.batch.begin();
This is in the draw method. When I draw my background at 0, 0 the picture starts doesnt cover all the screen and you can still see the background color.