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

Uniform pixel size in full screen mode #720

Closed
BlisterB opened this issue Jan 10, 2016 · 3 comments · Fixed by #2757
Closed

Uniform pixel size in full screen mode #720

BlisterB opened this issue Jan 10, 2016 · 3 comments · Fixed by #2757

Comments

@BlisterB
Copy link
Member

Hi everyone !

This issue can be observable in all plateforms (including the android port) : when a game is in full screen, the aspect ratio is not respected.
It causes several problems :

  • The render is not clean : characters' eyes don't have the same size etc.
  • More problematic : scrolling seems to be laggy (at 60 fps) due to this ratio not respected. Lot of people thinks this is not a really 60 fps because of that.
  • It affect everything in movement : pnj, water tiles etc.

It would be a big improvement if we could find a solution :).

@BlisterB BlisterB changed the title Respect screen ratio in full screen Respect screen ratio in full screen mode Jan 10, 2016
@fdelapena
Copy link
Contributor

This feature exists in 2k3 1.10+, all pixels have the same size on full screen, scaling to the max pixel size available.
E.g. on a 1920x1080 screen would fit a 1280x960 (4x pixel size) game screen size, but not a 1920x1200 (5x pixel size) because the height is larger than the available.
It could be checked by w = 320 * n and h = 240 * n, and both must fit to the available screen size (beware of existing menu bars in some devices).

@Ghabry
Copy link
Member

Ghabry commented Jan 10, 2016

I have code for this on my hard disk. In the branch for the portable touch UI.

When you just tell SDL "I want 320x240" then it rescales for you but you can't render in the black Areas outside of this 320x240... (which is required for a touch ui)
So my fix is to just create a texture with the size of the window and then render the EasyRPG 320x240 on it via a rescale... That way you can render on the black area and do other nice things like pixel aspect ratio ;).

@BlisterB BlisterB changed the title Respect screen ratio in full screen mode Uniform pixel size in full screen mode Jan 10, 2016
@Ghabry Ghabry modified the milestone: 0.5.0 Feb 19, 2016
@Ghabry Ghabry removed this from the 0.6.1 milestone May 5, 2019
@mateofio mateofio added the Video label Apr 4, 2020
@mateofio
Copy link
Contributor

mateofio commented Apr 4, 2020

So for touch UI to work you have to render to the entire screen? You can't create a viewport?

SDL_UpdateTexture takes a rect. So could we not make the texture the smallest multiple of screen size that fits 320x240, and then copy our bitmap to the texture at it's center. And then render the texture like normal?

Ghabry added a commit to Ghabry/easyrpg-player that referenced this issue Mar 29, 2022
@Ghabry Ghabry added this to the 0.7.1 milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants