dhewm / dhewm3

dhewm 3 main repository
https://dhewm3.org/
GNU General Public License v3.0
1.78k stars 346 forks source link

HUD Aspect Correction #324

Open Sol1vaN opened 3 years ago

Sol1vaN commented 3 years ago

Hi there,

I've found a problem with the HUD that always streched.

on CstDoom3 this problem are corrected very well.

Is possible to replicate the same on dhewm3?

Comparative screenshots: https://media.moddb.com/images/members/4/3399/3398919/profile/cstdoom3_v2_0_hud_corr_sp_off.jpg https://media.moddb.com/images/members/4/3399/3398919/profile/cstdoom3_v2_0_hud_corr_sp_on.jpg

DanielGibson commented 3 years ago

I'll have to look at cstdoom3 (and probably their source code) and figure out how they're doing this and maybe adept that change to dhewm3.

Right now I don't have the time (right now I don't even have the time to finally finish that 1.5.1 release), but I hope I'll get around to it eventually :)

Sol1vaN commented 3 years ago

Really thanks, I hope some day you have some time. I know that this is a lot of work to do.

Thanks men, and I'll be tuned with your news.

The-King-of-Toasters commented 3 years ago

I took a look the cstdoom3's source code. It has a cvar that handles this, named cst_hudAdjustAspect, which is called in idPlayerView::RenderPlayerView (in both base and d3xp). I've extracted the relevant code to a gist. This isn't quite right, as this only controls the drawing of the Lag meter. If you grep around for cst_hudAdjustAspect you can see that there's an anchoring system for UI elements.

DanielGibson commented 3 years ago

This requires adjusted .gui files that use cstAnchor. So far I have avoided shipping custom data files (and they'd only be for the base game and RoE anyway, doesn't help for mods) and I think I'd like to keep it like that for now.

DanielGibson commented 2 months ago

As more people have asked for widescreen HUDs recently: If someone else wants to port the cstdoom3 code to make them work, I'd probably merge that code, if it's clean and doesn't break anything else etc.

I'm still not keen on shipping any game data with dhewm3, but if anyone creates mod .pk4 files with widescreen HUDs (that use cstAnchor and whatever and work with dhewm3) for the base game and d3xp (and maybe even the mods supported by dhewm3), I'd certainly link their project so dhewm3 users can find it. Of course, this requires the cstdoom3 code to be ported and merged first.

lmills87 commented 2 months ago

So glad to see this! I hope that someone with the skills can do this; I was literally just searching for a mod that might be compatible with dhewm to fix the HUD, came across cst, and then this thread.

Sol1vaN commented 2 months ago

oh please, this was posted in 2020, cmon, merge the code to dhewm3. i hope the owner of cstdoom3 don't be angry for using his code. cheers.

DanielGibson commented 2 months ago

I'm currently busy with that >60fps code. Would appreciate if someone else could look into this feature

lmills87 commented 2 months ago

I'm currently busy with that >60fps code. Would appreciate if someone else could look into this feature

Delete this if needed but I just wanted to say I’m psyched for > 60 fps in dhewm! Any kind of eta on this?

DanielGibson commented 2 months ago

I just wanted to say I’m psyched for > 60 fps in dhewm! Any kind of eta on this?

I'm glad you're looking forward to that feature, but keep in mind and it can still happen that it won't work out. Many bugs are fixed, but currently it looks like the Physics code doesn't really like the higher update rate, or at least behaves differently then. Can't guarantee that this can be fixed, or that I can fix it, I don't have much experience with physics code. And of course it's totally possible that more ugly bugs turn up.

If you (or anyone else) want to help, testing the work-in-progress builds I occasionally post at #585 is extremely helpful. "Just" playing the base game and d3xp at a higher refreshrate and looking out for bugs (and reporting them of course). I can't play the whole game (and addon) over and over again myself, because then I wouldn't have time for actually coding the features ;)

I've just posted an updated Windows build at https://github.com/dhewm/dhewm3/pull/585#issuecomment-2208039197

lmills87 commented 2 months ago

I will certainly keep this in mind, although, personally, I’m afraid I’m not so familiar with D3 to be able to confidently say what’s behaving correctly and what’s not.

I did want to mention, and this might be unhelpful, but the Project Cartographer dev team recently uncapped the fps for Halo 2 Vista; it was something that many never expected to happen. They have a discord server and might be willing to help if you have questions - assuming of course that this is even remotely similar to the work they did.

DanielGibson commented 2 months ago

Halo2 and Doom3 have very different code bases, so I doubt they could help much, apart from general suggestions..

I’m afraid I’m not so familiar with D3 to be able to confidently say what’s behaving correctly and what’s not.

Well, sometimes things are obviously broken, like a crash or error message or a monster that seems stuck or is unable to walk up stairs, or something being ridiculously fast or similar. (And if you're unsure about a behavior you can set the framerate to 60, load the last savegame and try again to see if it behaves differently then)