Freelook improvements
Moderator: Raze Developers
-
- Posts: 139
- Joined: Thu Feb 24, 2011 12:45 am
Re: Freelook improvements
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.
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.
-
- Posts: 13883
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Freelook improvements
This is true - and it's actually true of the Doom engine, too.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.
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.
-
- Posts: 311
- Joined: Tue Apr 10, 2018 8:14 am
Re: Freelook improvements
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?
-
- Posts: 1349
- Joined: Tue Nov 05, 2019 6:48 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Freelook improvements
That sounds kinda hackish to me tbh.
-
- Lead GZDoom+Raze Developer
- Posts: 49204
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Freelook improvements
Agreed, that doesn't sound right.
-
- Posts: 13883
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Freelook improvements
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.
-
- Posts: 311
- Joined: Tue Apr 10, 2018 8:14 am
Re: Freelook improvements
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?
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?
-
- Lead GZDoom+Raze Developer
- Posts: 49204
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Freelook improvements
No idea yet. I somehow doubt that the original CON would ever have allowed doing the math on the script side.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?
-
- Posts: 139
- Joined: Thu Feb 24, 2011 12:45 am
Re: Freelook improvements
Original CON code no, but mods definitely would break with such a change.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?
-
- Posts: 13883
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Freelook improvements
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.Fox666 wrote:Original CON code no, but mods definitely would break with such a change.
-
-
- Posts: 376
- Joined: Mon Jun 27, 2016 7:26 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Freelook improvements
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.
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.
-
- Posts: 311
- Joined: Tue Apr 10, 2018 8:14 am
Re: Freelook improvements
That's Polymer. It works completely differently from Polymost.
-
- Lead GZDoom+Raze Developer
- Posts: 49204
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Freelook improvements
It works differently, yes, but Polymost still uses true 3D rotations for pitching. What exactly is supposedly wrong with Polymost?
-
-
- Posts: 376
- Joined: Mon Jun 27, 2016 7:26 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
Re: Freelook improvements
Here are two screenshots taken from E1L1 in Raze (Polymost) and Eduke32 (Polymer) in (almost) the same location, and (almost) the same view orientation:




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)






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)


Last edited by Talon1024 on Sun Sep 20, 2020 3:18 pm, edited 1 time in total.
-
- Posts: 210
- Joined: Sat Jan 18, 2020 6:10 am
Re: Freelook improvements
I can definitely see it.