ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
691 stars 59 forks source link

[Feature] True freelook (90 degrees up/down view) #416

Open poperigby opened 3 years ago

poperigby commented 3 years ago

Would this be possible? Right now you can only look up and down about 45 degrees.

mjr4077au commented 3 years ago

~58 degrees for Duke and SW. It can be done with the new renderer but the weapon and hitscan code isn't up to it. There's a lot of work required to achieve this.

coelckers commented 3 years ago

Yeah, it's mostly due to poor coding on the game side. in GZDoom it never came up because ZDoom had solved the game logic problems years before. And in Doom it was far more isolated because the required core changes were in two functions only. Here the relevant code is a lot more scattered and in many cases so extremely convoluted that changing it can become a monumental task.

Talon1024 commented 3 years ago

IIRC someone said it would be impossible to do this with Duke3D because it would require changes to the CON code.

sinisterseed commented 3 years ago

It would sure be worth a shot at it, but even so, that's not happening anytime soon. The new render needs to be in a solid state first, the cool stuff will only come later, especially something as complex as this.

And that being said, it would be weird to have full up/down view in only some of the games. Wouldn't be surprised if Duke won't be capable of it if it turns out to require CON changes indeed, as that pretty much seals its fate.

madame-rachelle commented 3 years ago

Not necessarily. The CON code can be patched up - but this won't help mods that are using the same (albeit modified) CON code.

mjr4077au commented 3 years ago

I don't see why any CON changes will be needed. There's already horizon to pitch code in the engine, we just keep using that to adjust incoming CON values to pitch. We're already doing this now to a degree.

madame-rachelle commented 3 years ago

I think they were talking more about the projectiles themselves, not the projection which is purely handled by the engine anyhow.

madame-rachelle commented 3 years ago

So I figured out something that might be a bit of a solution to the CON problem but I have no idea how easy this really would be to implement, this might be a crapshoot but I know if this problem existed in the GZDoom engine itself this would be feasible.

The idea is this: We put in a custom directive for a CON file that signifies it for modern Raze use only. This way, we can distinguish it from classic CON files. When this directive is active, it is assumed that the author of the CON file has already corrected the tangent projectile issue and converted their pitch to proper trigonometry. Only when this directive exists, does full 90 degree pitching become allowed.

Then - within Raze itself there could be a patched CON file that has this fix, either that or a delta of some sort that allows this patch to be applied live. Mods could be checked for requiring said patch too - making it possible to patch older versions of more popular mods. Newer versions of the mods could ship with two CON files which, if exists a CON file that has a special naming scheme to indicate that it is for Raze, it will refuse to load the other version. This would allow for mod authors to create mods that are compatible both with Raze and with other engines.

Again, I don't know how feasible it is, but it's an idea that could be considered.

sinisterseed commented 3 years ago

I think they were talking more about the projectiles themselves, not the projection which is purely handled by the engine anyhow.

Yea pretty much. Was referring to the actual gameplay impact, of course purely looking up/down fully would be possible even now, but that will be just a gimmick if the projectiles break or the game craps itself in other ways.

Or it will be just a visual effect.