Application with a new feature: ptmikheev

Join the team. This area is for people who want to participate in OpenMW's development in one way or another.
ptmikheev
Posts: 27
Joined: 01 Jun 2020, 21:05
Gitlab profile: https://gitlab.com/ptmikheev

Application with a new feature: ptmikheev

Post by ptmikheev » 01 Jun 2020, 21:54

Hi!

I've implemented a new feature: more realistic diagonal movement. See an example below.
Can be enabled in [Input] section of settings.cfg: alternative diagonal strafe = true

Link to code: https://gitlab.com/ptmikheev/openmw/-/c ... f0218e114d

Example (gif):
Spoiler: Show
Now my questions are:
1) Does the feature look useful? :)
2) Is my implementation good enough to be merged into the main repo? I only started to look into openmw code and I am not completely sure about thread safety here.

silentthief
Posts: 435
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Application with a new feature: ptmikheev

Post by silentthief » 01 Jun 2020, 23:17

While the top one looks more like vanilla morrowind, the bottom looks aesthetically better (more realistic). I like it, but I'm not a dev.

ST
"You like to dance close to the fire, don't you?."

Chris
Posts: 1583
Joined: 04 Sep 2011, 08:33

Re: Application with a new feature: ptmikheev

Post by Chris » 01 Jun 2020, 23:26

I wonder if it would work better to turn just the lower body instead of the whole body. If you're attacking or using targeted magic, the target should still be forward relative to the screen, which would look odd if the character's upper body is facing diagonally. It'd also look odd that the character turns to face diagonally when moving diagonal, but then looks forward again to do side-steps when moving sideways.

ptmikheev
Posts: 27
Joined: 01 Jun 2020, 21:05
Gitlab profile: https://gitlab.com/ptmikheev

Re: Application with a new feature: ptmikheev

Post by ptmikheev » 02 Jun 2020, 01:03

Chris wrote:
01 Jun 2020, 23:26
I wonder if it would work better to turn just the lower body instead of the whole body.
At the moment I don't have enough knowledge of openmw internals to turn lower and upper body separately. I think it is possible, but it requires interfering with the animation and definitely would be a much more complicated change.
Chris wrote:
01 Jun 2020, 23:26
If you're attacking or using targeted magic, the target should still be forward relative to the screen, which would look odd if the character's upper body is facing diagonally. It'd also look odd that the character turns to face diagonally when moving diagonal, but then looks forward again to do side-steps when moving sideways.
In my current implementation in 3rd person view arrows and magic are pointed in the direction of the movement, the same as upper body. I agree that the behaviour is controversial, but have no easy way to make it better. In first player view (i.e. when aim cross is visible) the new behaviour is disabled and all weapon work as usual. Probably the problem can be partially solved if we also disable the new behaviour when weapon is in hand.

In theory the ideal solution would be to prepare a big set of animations for different kinds of movements and all transitions between them, but the amount of work is too big. On the other hand my proposal has disadvantages, but is quite simple.

CMAugust
Posts: 253
Joined: 10 Jan 2016, 00:13

Re: Application with a new feature: ptmikheev

Post by CMAugust » 02 Jun 2020, 02:20

Looks very close to how Skyrim does it. I look forward to any further improvements you make with this, if you continue. :)

Chris
Posts: 1583
Joined: 04 Sep 2011, 08:33

Re: Application with a new feature: ptmikheev

Post by Chris » 02 Jun 2020, 02:22

ptmikheev wrote:
02 Jun 2020, 01:03
At the moment I don't have enough knowledge of openmw internals to turn lower and upper body separately. I think it is possible, but it requires interfering with the animation and definitely would be a much more complicated change.
Unfortunately, it might be the only way this feature could work (at least, without support for custom diagonal walking/running animations).
ptmikheev wrote:
02 Jun 2020, 01:03
Probably the problem can be partially solved if we also disable the new behaviour when weapon is in hand.
That could also be a problem if we ever implement quick-casting behavior, like the MCP option, where a spell doesn't have to be readied to use.

Third person games that let the player move in directions independent of the camera direction have slightly more complicated behavior regarding attack and activation. Typically, there's a form of lock-on to enemies since off-center facing directions are hard to gauge for the player, while activation may still follow the camera view (or work on anything in the general vicinity of the character, rather than a pin-point activator check). It would only get more complicated if we allow for more analog movement that's not locked to the 8 cardinal directions (which might already be possible with a controller? not sure).

ptmikheev
Posts: 27
Joined: 01 Jun 2020, 21:05
Gitlab profile: https://gitlab.com/ptmikheev

Re: Application with a new feature: ptmikheev

Post by ptmikheev » 03 Jun 2020, 00:59

Chris wrote:
02 Jun 2020, 02:22
ptmikheev wrote:
02 Jun 2020, 01:03
At the moment I don't have enough knowledge of openmw internals to turn lower and upper body separately. I think it is possible, but it requires interfering with the animation and definitely would be a much more complicated change.
Unfortunately, it might be the only way this feature could work (at least, without support for custom diagonal walking/running animations).
ptmikheev wrote:
02 Jun 2020, 01:03
Probably the problem can be partially solved if we also disable the new behaviour when weapon is in hand.
That could also be a problem if we ever implement quick-casting behavior, like the MCP option, where a spell doesn't have to be readied to use.

Third person games that let the player move in directions independent of the camera direction have slightly more complicated behavior regarding attack and activation. Typically, there's a form of lock-on to enemies since off-center facing directions are hard to gauge for the player, while activation may still follow the camera view (or work on anything in the general vicinity of the character, rather than a pin-point activator check).
Do I understand your opinion right that in current form the feature can not be accepted even as optional and disabled by default?

I think that even if separate turning of lower and upper body would be implemented, some players (well, at least me) may still prefer the currently proposed variant of non-combat movement. Full body rotation looks more realistic if you just run from A to B (70% of gameplay in my case) and want to go around an obstacle.

Could you please explain how decisions are usually made in the community? I.e. who and how decides if something should be approved or rejected? I am OK if this specific change will be finally declined, but for bigger changes it makes sense to understand the process before starting to code :) .
Chris wrote:
02 Jun 2020, 02:22
It would only get more complicated if we allow for more analog movement that's not locked to the 8 cardinal directions (which might already be possible with a controller? not sure).
I saw in code that it is supported. And my change has support of such "analog" movement as well, but I don't have a controller to check it practically.
CMAugust wrote:
02 Jun 2020, 02:20
Looks very close to how Skyrim does it. I look forward to any further improvements you make with this, if you continue. :)
Thanks! Skyrim has separate movement modes for combat and non-combat situations. If I remember correctly in combat mode there is a special diagonal movement animation and in non-combat mode it works almost the same as I did here.

Chris
Posts: 1583
Joined: 04 Sep 2011, 08:33

Re: Application with a new feature: ptmikheev

Post by Chris » 03 Jun 2020, 01:55

ptmikheev wrote:
03 Jun 2020, 00:59
Do I understand your opinion right that in current form the feature can not be accepted even as optional and disabled by default?
It's not my call whether it's accepted or not. I'm just giving my opinion that I think it's the wrong approach to turn the whole body and change target angle, since the feature would need to be redone to work right (either a full-on third-person movement system, or better consistency between first- and third-person views). At the very least, I think the target/activation angle needs to remaining facing the same way as the camera, so it's a consistent direction and behavior between first- and third-person, then manipulating the upper body bones and/or adding support for diagonal walking animations could be a future improvement that doesn't require a significant change in behavior.
ptmikheev wrote:
03 Jun 2020, 00:59
Could you please explain how decisions are usually made in the community? I.e. who and how decides if something should be approved or rejected? I am OK if this specific change will be finally declined, but for bigger changes it makes sense to understand the process before starting to code :) .
Whoever has authority to merge PRs/MRs ultimately approves or rejects something (I think psi29a is the main person in charge of that right now). But leading up to that, there can be all manner of discussions or proof-of-concepts to make or break a case for said feature. Generally, the less invasive a feature is, or the less it has to be rewritten to be done "correctly", and the more willing you are to stick around to be able to fix issues as they come up (incl. months or years down the line), the more likely it is to be accepted.

User avatar
akortunov
Posts: 760
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Application with a new feature: ptmikheev

Post by akortunov » 03 Jun 2020, 06:34

Chris wrote:
03 Jun 2020, 01:55
or adding support for diagonal walking animations could be a future improvement that doesn't require a significant change in behavior.
I'd prefer to have diagonal movement animations too rather than messing with camera just for player.

ptmikheev
Posts: 27
Joined: 01 Jun 2020, 21:05
Gitlab profile: https://gitlab.com/ptmikheev

Re: Application with a new feature: ptmikheev

Post by ptmikheev » 03 Jun 2020, 21:07

Chris wrote:
03 Jun 2020, 01:55
At the very least, I think the target/activation angle needs to remaining facing the same way as the camera, so it's a consistent direction and behavior between first- and third-person, then manipulating the upper body bones and/or adding support for diagonal walking animations could be a future improvement that doesn't require a significant change in behavior.
Yes, sounds reasonable.

I've checked how does it work in skyrim.

- Activation direction is always the same as the direction of the camera.
- In 3rd person view camera is positioned lower than in MW and a bit to the right of the character to make the activation direction better visible.
- Character always looks the same direction as the camera.

In combat mode:
- There are special animations for all the 8 directions. Right and left movements are not symmetric because left shoulder (hand with a shield) is always a bit in front.

In non-combat mode:
- For 5 frontal directions (forward, diagonal forward, and also right and left) a single forward animation is used. The whole body except the head is rotated to the direction of the movement.
- For 3 backward directions a single backward animation is used (it differs from the forward animation). Body is also rotated.
- If player stops, it automatically activates observation mode.

In all the cases upper body is synchronized with lower body, but head points to the direction of view.

What do you think if I try to implement something similar in openmw? In settings there will be a switch "vanilla movement / skyrim-like movement".

Post Reply