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

[Engine] Make screen-width, screen-height, and screen-type to define the in-game resolution #269

Open
1 of 2 tasks
Wohlstand opened this issue Sep 8, 2018 · 11 comments
Open
1 of 2 tasks
Assignees
Labels
Defect / Imperfection Deffects are caused by incompletance or untested and experimental thing... Graphics Graphical subsystem: render, texture processing, images file management. Priority - normal

Comments

@Wohlstand
Copy link
Member

Wohlstand commented Sep 8, 2018

The engine.ini has screen-width, screen-height and screen-type options are unused yet internally. Make the sure there are will change in-game screen resolution when launching the game engine with choosing the config pack.

  • screen-width/height to be able define the in-game resolution
  • screen-type to switch the resolution mode between fixed or dynamical. In a case of dynamical, the renderable picture will never be scaled, but the in-game resolution will be equal to the in-window resolution.
@Wohlstand Wohlstand added Defect / Imperfection Deffects are caused by incompletance or untested and experimental thing... Graphics Graphical subsystem: render, texture processing, images file management. Priority - normal labels Sep 8, 2018
@Wohlstand Wohlstand self-assigned this Sep 8, 2018
@Windblade-GR01
Copy link

engine.ini's Screen-type = dynamic / resizable, doesn't work either.

@Wohlstand Wohlstand changed the title [Engine] Make screen-width and screen-height define the in-game resolution [Engine] Make screen-width, screen-height, and screen-type to define the in-game resolution Sep 8, 2018
@Wohlstand
Copy link
Member Author

Yeah, the sense of screen-type is choosing the type of in-game scene: let it be fixed-size like it does now, or will be scalable in a dependence on a window size. The second case will don't scale textures and drawing objects, but will allow to change of camera size that will see same square (in pixels^2) as the physical square of the window. (For High-DPI mode, I'll scale the stuff to avoid the crap that PGE Engine had some times ago on macOS).

@Windblade-GR01
Copy link

You would also need to modify the editor to make the minimum (And default) section size the same as screen-height and screen-width.

Not sure how this would work under Screen-type = dynamic / resizable.

@Windblade-GR01
Copy link

Windblade-GR01 commented Sep 8, 2018

Not sure how this would work under Screen-type = dynamic / resizable.
The windows could scale up to 3840 x 2160 (4K resolution) in some user monitors.
For now the only option looks to have the ability to limit the maximum dynamic resolution.
Even 2d sandbox games have this problem.

This forum link have images of starbound (A game like terraria) with absurd levels of zoom
https://community.playstarbound.com/threads/guide-how-to-zoom-out-more-than-game-settings-allow.43009/

It uses a dynamic resolution like you plan with Moondust but you can adjust zoom and you can see at 1x zoom on ultra high resolutions it breaks.

They fixed it by allowing the user selecting zoom levels. But Moondust have the problem that the sectors are finite and at low zoom the camera would going out of boundaries.

If you limit the maximum resolution to the section size and/or a max-height and max-width options you could prevent the problem showed you adobe (The links).

The minimum resolution would be screen-height and screen-width and the sector size couldn't be smaller than the minimum resolution.

If the window resolution is bigger than the minimum resolution but smaller than the maximum resolution and the sector size is bigger than the window resolution.

It would be useful (But not necessary) to allow the user to select a zoom level like starbound, but with the limits described adobe.

It would be easier for now to just implement screen-width and screen-height, for now and implement Screen-type latter.

PD: More images of how it looks.
https://imgur.com/a/44QS5 In the second screenshot you could see how it breaks
http://i.imgur.com/mNWTF15.jpg

Edit: A 4k 1x screenshot of starbound
Starbound in 4k with 1x zoom probably unplayable.

@Windblade-GR01
Copy link

Windblade-GR01 commented Sep 9, 2018

TL;DR: To make Screen-type = dynamic / resizable playable at high resolutions the Moondust team needs to limit the scaling to not exceed a maximum resolution setting (This varies per game) and to stay in the room margins.

Example

Maximum resolution = 960 x 540
Section size = 480 x 270 
Resolution = 480 x 270 scaled to 960 x 540

Example 2

Maximum resolution = 960 x 540
Section size = 4200 x 8500
Resolution = 960 x 540

This has to be DPI independent.
It would be easier for now to just implement screen-width and screen-height for the time being.

@Wohlstand
Copy link
Member Author

You can don't worry to the room size limit as I have made the black zone and alignment to center that will allow to have rooms smaller than screen size, already 😉
The only a limit is minimal screen size to don't squash the thing into too small thing.

Wohlstand added a commit that referenced this issue Nov 9, 2018
Experimental, but working ability to set any screen resolution in
the `engine.ini` file of config pack that will run game in it.
#269
@Wohlstand
Copy link
Member Author

On a quick hand, I have added the support for screen-width and screen-height values, and they are now working. It's the test I have ran with 1920x1080 in-game resolution (my screen size is two monitors of 1280x1024, therefore image is squashed):
2018-11-10 02-24-00

And the 256x224 doubled into 2 to make the resolution be like one of SNES's:
2018-11-10 02-27-46
2018-11-10 02-27-53
2018-11-10 02-28-42

The dynamical resolutions didn't implemented yet, the statical only.

@Wohlstand
Copy link
Member Author

But, be careful! Without of changing of world map setup, the view will suck on a non-standard resolution. So, it's suggested to take world map area in a full screen view and align HUD at top (most of those setup also can be done through engine.ini).

@Shadowblitz16
Copy link

wait does this unload/reset enemies outside of the screen boundaries?
also would lunalua be able to support this?

@Wohlstand
Copy link
Member Author

wait does this unload/reset enemies outside of the screen boundaries?

NPCs are activating once they are appearing on the visible area. Once this visible area was increased, there are more NPCs will appear on the screen and will be activated, or the opposite: when you decreased the size of screen, less NPCs will be activated.

@Wohlstand
Copy link
Member Author

Wohlstand commented May 18, 2019

also would lunalua be able to support this?

In Discord that was discussed and LunaLua can't yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect / Imperfection Deffects are caused by incompletance or untested and experimental thing... Graphics Graphical subsystem: render, texture processing, images file management. Priority - normal
Projects
None yet
Development

No branches or pull requests

3 participants