Aleph-One-Marathon / alephone

Aleph One is the open source continuation of Bungie’s Marathon 2 game engine.
https://alephone.lhowon.org/
GNU General Public License v3.0
654 stars 99 forks source link

Resolution problem when using show HUD option. #482

Closed athpanos closed 7 months ago

athpanos commented 7 months ago

I have a 49 inch ultra wide monitor and when I play without a HUD the game renders at the screen's native resolution but when I use the show HUD option the game does not cover the screen horizontally. The edges of the screen are black, about 30%. How can I fix this?

Mac version running on 10.14.6.

treellama commented 7 months ago

This is a function of the HUD itself, which limits the aspect ratio to preserve the authenticity of the game play. You can simply switch to another HUD; the XBLA hud will fill the screen at 16:9, for instance.

athpanos commented 7 months ago

I am using the enhanced HUD.

treellama commented 7 months ago

That one will cap out somewhere around 16:9. Basic HUD might work for you, but there are other issues with ultra wide resolutions. It might be best to stick to regular wide

bangstk commented 6 months ago

@treellama I suspect there will be a lot more people getting confused by this once M2 comes out on Steam, since it is not apparent or intuitive why the HUD is the reason the game isn't going full widescreen (since unlike M1 there is no graphic border restricting the view)

My simple proposal for avoiding this confusion would be re-naming the string used for the built-in HUD as seen in the settings menu

Instead of "Classic (Built-in)" if it said "Classic (Built-in} (Restricts widescreen)" then users would immediately be able to see in the settings menu which setting (HUD) is the one that is actually preventing widescreen.

athpanos commented 6 months ago

I made some modifications to the enhanced HUD to fix this problem, if anyone is interested. I changed this code in the Plugin.lua file.

local min_aspect_ratio = 1.6 local max_aspect_ratio = 2.4 local h = math.min(Screen.height, Screen.width / min_aspect_ratio) local w = math.min(Screen.width, h*max_aspect_ratio) Screen.world_rect.width = w Screen.world_rect.x = (Screen.width - w)/2 Screen.world_rect.height = h Screen.world_rect.y = (Screen.height - h)/2

to

-- local min_aspect_ratio = 1.6 --local max_aspect_ratio = 2.4 --local h = math.min(Screen.height, Screen.width / min_aspect_ratio) --local w = math.min(Screen.width, h*max_aspect_ratio) Screen.world_rect.width = Screen.width Screen.world_rect.x = 0--(Screen.width - w)/2 Screen.world_rect.height = Screen.height Screen.world_rect.y = 0--(Screen.height - h)/2

and it works as it should. Now I have to figure out how to bring the HUD a little to the center of the screen.

rzhxiii commented 6 months ago

What about the widescreen classic HUDs on Simplici7y? Would it be hard to contact the author and package those with Aleph One?

https://simplici7y.com/items/widescreen-marathon-1-classic-hud/

https://simplici7y.com/items/widescreen-marathon-2infinity-default-hud/

bangstk commented 6 months ago

I think the only thing that needs to be done to get Enhanced HUD to be wider is to increase max_aspect_ratio. @athpanos Do you have a 32:9 monitor by any chance? The stock value of 2.4 should cover 21:9 ultrawides already.

The only reason for a third party HUD to restrict the ratio I think is to prevent weapon sprites like the rocket launcher from having a gap between it and the edge of the screen. But I think restricting the whole view is not the best solution there. I am currently experimenting with source code changes to hopefully avoid that problem in an elegant way for any aspect ratio.

@rzhxiii I happen to be the author of those. I understand that the reason for Classic (Built-in) HUD restricting the aspect ratio is to present the same '3d game' aspect ratio the original game shipped with. I don't think that's necessarily a problem or a bad thing that needs to be fixed, I think it just needs to be communicated better to the user with a more descriptive title to avoid the confusion.

If bundling my wide classic HUDs is ever going to be a consideration, I would like to make a couple of updates first (for instance, the M1 hud script I based mine on is actually a pretty old one and I should re-base it on the current Default HUD bundled with the M1 release) and for M2 I want to re-do it to be based on 960 width rather than 852 so that Double Scale at 1080p (majority of players) will look perfectly crisp, as well as ultrawide options.

athpanos commented 6 months ago

Yes, it is 32:9.

bangstk commented 6 months ago

@athpanos Just for you, here's a tweaked version of Enhanced HUD that will letterbox only the HUD at aspect ratios beyond 21:9 rather than letterboxing the full game.

WaterlooWaterpark_0058

Super Ultrawide Tweaked Enhanced HUD.zip

athpanos commented 6 months ago

Thank you very much!