Freelook improvements

Moderator: Raze Developers

User avatar
Fox666
Posts: 139
Joined: Thu Feb 24, 2011 12:45 am

Re: Freelook improvements

Post by Fox666 »

You can't do it without changing gameplay logic.

Projectiles fired upwards only have vertical velocity added, meaning the horizontal velocity is always the same. As a result, if you fire upwards, the projectiles would have infinite velocity.

You can already see this with enemies. If you fly above the final boss in Stadium, his rockets will kill himself due to an overflow in the vertical velocity.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Freelook improvements

Post by Rachael »

Fox666 wrote:You can't do it without changing gameplay logic.

Projectiles fired upwards only have vertical velocity added, meaning the horizontal velocity is always the same. As a result, if you fire upwards, the projectiles would have infinite velocity.

You can already see this with enemies. If you fly above the final boss in Stadium, his rockets will kill himself due to an overflow in the vertical velocity.
This is true - and it's actually true of the Doom engine, too.

And as you pointed out, ZDoom changed that with the gameplay logic. ZDoom actually uses proper trig math for a projectiles' pitch-angles, instead of just putting it on a tangent and forgetting about it.
User avatar
Phredreeke
Posts: 293
Joined: Tue Apr 10, 2018 8:14 am

Re: Freelook improvements

Post by Phredreeke »

Could a quick fix he made where for game logic purposes the game assumes the angle to be the maximum normally allowed for angles above that?
User avatar
sinisterseed
Posts: 1349
Joined: Tue Nov 05, 2019 6:48 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Freelook improvements

Post by sinisterseed »

That sounds kinda hackish to me tbh.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Freelook improvements

Post by Graf Zahl »

Agreed, that doesn't sound right.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Freelook improvements

Post by Rachael »

I don't know why, other than demo backwards compatibility, why anyone would want to retain the tangental math for projectiles. That is just a quick and dirty fix, almost like freelook was a feature tacked onto the engine at the last minute.
User avatar
Phredreeke
Posts: 293
Joined: Tue Apr 10, 2018 8:14 am

Re: Freelook improvements

Post by Phredreeke »

Yeah, thinking about it, it would be weird aiming straight up and firing and the bullet marks don’t appear where you aim, rather far below it.

Could changing the projectile code in Duke3D/RR/IF to allow for freelook be done without rewriting the CON code and breaking compatibility with existing mods?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Freelook improvements

Post by Graf Zahl »

Phredreeke wrote: Could changing the projectile code in Duke3D/RR/IF to allow for freelook be done without rewriting the CON code and breaking compatibility with existing mods?
No idea yet. I somehow doubt that the original CON would ever have allowed doing the math on the script side.
User avatar
Fox666
Posts: 139
Joined: Thu Feb 24, 2011 12:45 am

Re: Freelook improvements

Post by Fox666 »

Phredreeke wrote:Yeah, thinking about it, it would be weird aiming straight up and firing and the bullet marks don’t appear where you aim, rather far below it.

Could changing the projectile code in Duke3D/RR/IF to allow for freelook be done without rewriting the CON code and breaking compatibility with existing mods?
Original CON code no, but mods definitely would break with such a change.
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Freelook improvements

Post by Rachael »

Fox666 wrote:Original CON code no, but mods definitely would break with such a change.
If there's a way, I'd prefer to do it this way: If post-source-release CON code is found, then it'd use the existing (tangent) math, otherwise, it'd use proper sine/cosine math for the angles. Not sure how Graf feels about it.
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Freelook improvements

Post by Talon1024 »

Well, if there's nothing that can be done about the up/down freelook limitations without breaking stuff, so be it. But there's something else about the freelook that's been bothering me.

Notice how looking up and down feels more natural in this video?


If you try to look up or down in Polymost, it feels more like you're using the software renderer than a true 3D renderer.
User avatar
Phredreeke
Posts: 293
Joined: Tue Apr 10, 2018 8:14 am

Re: Freelook improvements

Post by Phredreeke »

That's Polymer. It works completely differently from Polymost.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Freelook improvements

Post by Graf Zahl »

It works differently, yes, but Polymost still uses true 3D rotations for pitching. What exactly is supposedly wrong with Polymost?
Talon1024
 
 
Posts: 374
Joined: Mon Jun 27, 2016 7:26 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Freelook improvements

Post by Talon1024 »

Here are two screenshots taken from E1L1 in Raze (Polymost) and Eduke32 (Polymer) in (almost) the same location, and (almost) the same view orientation:
ImageImage
ImageImage
Polymer's perspective projection looks better, whilst Polymost looks like it has slight Y-shearing in comparison. It looks like Polymost renders a trapezoid-shaped view onto a rectangle, whereas Polymer does proper 3D perspective projection.

EDIT: Also, here's the start of E1L1, looking straight down, in Raze (Polymost) and Eduke32 (Polymer)
ImageImage
Last edited by Talon1024 on Sun Sep 20, 2020 3:18 pm, edited 1 time in total.
markanini
Posts: 208
Joined: Sat Jan 18, 2020 6:10 am

Re: Freelook improvements

Post by markanini »

I can definitely see it.
Post Reply

Return to “Closed Feature Suggestions [Raze]”