/** * Sets the game width and height of the OpenGL surface The width will altered depending on screen * resolution * * @param width * @param height * @return final game width */ public float setGameSize(float width, float height) { Graphics.determine(this); float aspect = width / height; gameWidth = width; gameHeight = height; if (Graphics.getAspectRatio() < aspect) { Debug.print("Thinner than expected"); } else if (Graphics.getAspectRatio() > aspect) { Debug.print("Wider than expected"); } gameWidth = Graphics.getAspectRatio() * gameHeight; return gameWidth; }