Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure proper camera projection/scale and resolution/AR handling #1

Open
inodentry opened this issue Jul 7, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@inodentry
Copy link
Contributor

In order to have the game look good at any resolution or aspect ratio (incl ultrawide), we need to come up with a strategy that balances looks and gameplay.

It is important to:

  • ensure integer scale (number of screen pixels to logical pixel), so pixel art looks good
  • ensure the player does not see things they are not supposed to see
  • ensure things they are supposed to see do not get cut off
  • show roughly the same content to all users
  • be able to design levels without too much worry about what's going to be visible on screen

Therefore, here is the current best proposal for how to implement this:

  • Pick the scaling factor so that there are roughly 180 vertical pixels on the screen, at the current resolution
  • Have a min/max X/Y for the camera, so we can limit the viewable area
  • Support some additional panning so that the user can move the camera a little
  • Have a limit to the horizontal AR
  • Have a vignette effect to fade to black around the edges. Avoid hard black bars for ultrawide users.
@inodentry inodentry added the enhancement New feature or request label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant