Increase camera height for wider aspect ratios #480
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The game doesn't support wide screens well because it has static horizontal field of view (FOV) and static maximum camera height. This means that for every resolution, the camera shows the same horizontal amount of terrain, but the vertical field of view becomes narrower for wider resolutions. So on wide screens, we get a center crop of what is visible on 4:3 resolutions (screenshots below).
To get vertical FOV similar to what's visible on 4:3 screens, we need to move the camera further from terrain or change the FOV of the camera. Ability to manipulate FOV of the camera only available in the DEBUG and INTERNAL builds, so changing camera height is more straightforward and this is how GenTool already supports wide resolutions based on #78.
Changes
setResolutionfunction to recalculate camera height multiplier on every resolution change.Screenshots
1600 x 1200 - 4:3 field of view
1600 x 900 - 16:9 field of view (the same camera height as in 4:3)
1600 x 900 - 16:9 field of view (adjusted camera height)
Fixes #78
Depends on #460 to make wide resolutions selectable