Freelook improvements

Moderator: Raze Developers

Re: Freelook improvements

Postby Fox666 » Mon Feb 10, 2020 2:37 am

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
Fox666
 
Joined: 24 Feb 2011

Re: Freelook improvements

Postby Rachael » Mon Feb 10, 2020 7:05 am

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby Phredreeke » Mon Feb 10, 2020 7:15 am

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
Phredreeke
 
Joined: 10 Apr 2018
Discord: phredreeke#6500

Re: Freelook improvements

Postby sinisterseed » Mon Feb 10, 2020 7:57 am

That sounds kinda hackish to me tbh.
User avatar
sinisterseed
GZDoom RO Translator & Raze Tester
 
Joined: 05 Nov 2019
Twitch ID: sixhundredsixteen
Github ID: sinisterseed
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby Graf Zahl » Mon Feb 10, 2020 8:03 am

Agreed, that doesn't sound right.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Freelook improvements

Postby Rachael » Mon Feb 10, 2020 8:08 am

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
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby Phredreeke » Mon Feb 10, 2020 8:14 am

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
Phredreeke
 
Joined: 10 Apr 2018
Discord: phredreeke#6500

Re: Freelook improvements

Postby Graf Zahl » Mon Feb 10, 2020 8:22 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Freelook improvements

Postby Fox666 » Mon Feb 10, 2020 10:59 am

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
Fox666
 
Joined: 24 Feb 2011

Re: Freelook improvements

Postby Rachael » Mon Feb 10, 2020 11:10 am

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.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby Talon1024 » Sat Sep 19, 2020 2:58 pm

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.
Talon1024
 
 
 
Joined: 28 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby Phredreeke » Sat Sep 19, 2020 4:03 pm

That's Polymer. It works completely differently from Polymost.
User avatar
Phredreeke
 
Joined: 10 Apr 2018
Discord: phredreeke#6500

Re: Freelook improvements

Postby Graf Zahl » Sat Sep 19, 2020 4:09 pm

It works differently, yes, but Polymost still uses true 3D rotations for pitching. What exactly is supposedly wrong with Polymost?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Freelook improvements

Postby Talon1024 » Sun Sep 20, 2020 2:58 pm

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.
Talon1024
 
 
 
Joined: 28 Jun 2016
Github ID: Talon1024
Operating System: Debian-like Linux (Debian, Ubuntu, Kali, Mint, etc) 64-bit
Graphics Processor: nVidia with Vulkan support

Re: Freelook improvements

Postby markanini » Sun Sep 20, 2020 3:09 pm

I can definitely see it.
markanini
 
Joined: 18 Jan 2020

PreviousNext

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests