Jump to content
The Dark Mod Forums

Add option to "toggle crouch" on key press


Daft Mugi

Recommended Posts

23 minutes ago, Daft Mugi said:

This is already achieved through mantling, no? On mantle, the player position matches the space.

Just checked: yes, the player mantled into crouched state if there is not enough room, even if I was always standing up. Then he stands up automatically when room allows.

What if crouch will take effect on keydown under normal conditions, but will take effect on keyup (as before) if pressed on ladder/rope?

 

Link to comment
Share on other sites

Just going to throw this out there. Do we need to hold to slide (tdm_crouch_toggle_hold_time)?

If we always slide on crouch key down without delay, we can easily check and keep the crouch state during the slide. If toggle crouch and crouched, stay crouched. If toggle crouch and standing, crouch until key up.

Link to comment
Share on other sites

So, we have some more simple solutions:

  1. Retain old behavior on ladder/rope, do crouch-toggle only under normal conditions.
  2. While on ladder/rope, use crouch key only for immediate slide down, don't let it change crouch intent at all.
Quote

If toggle crouch and standing, crouch until key up.

I tried to do that on top of the current trunk code: toggle crouch again when key is released if slide-down was used.
To be honest, it does not feel good, better not toggle crouch state to begin with.

Link to comment
Share on other sites

13 minutes ago, stgatilov said:

I tried to do that on top of the current trunk code: toggle crouch again when key is released if slide-down was used.
To be honest, it does not feel good, better not toggle crouch state to begin with.

I agree that it wouldn't feel good if there wasn't an extra variable to keep track of state, because the camera would jerk up and down during the slide.

I think you misunderstood me, though. My thought was about if slide happens without delay. If slide without delay and toggle crouch and crouched, stay crouched. If slide without delay and toggle crouch and standing, crouch until key up.

My patch did: If toggle crouch and standing, crouch until key up. The camera stayed smooth, because I used an extra variable to track state. Feels fine!

Or, maybe I misunderstood you. What didn't feel good about it?

Link to comment
Share on other sites

17 minutes ago, Daft Mugi said:

I think you misunderstood me, though. My thought was about if slide happens without delay. If slide without delay and toggle crouch and crouched, stay crouched. If slide without delay and toggle crouch and standing, crouch until key up.

So, this is basically "always slide down crouched, but then restore state".

Quote

Or, maybe I misunderstood you. What didn't feel good about it?

What feels wrong is that when I hold crouch button, I don't really know when sliding will stop, so I hold the button for longer than necessary. It feels wrong that player lands crouched, then thinks for half a second, then for some reason stands up on key release.


Anyway, I fell really vague about controls, and I think we need more team members here.
@Obsttorte@Dragofer@STiFU@kingsal

The initial simple idea "crouch-toggle immediately when key is pressed down" faced the following problem: if player is on ladder (or rope) and he holds crouch button for some time, then he slides down. Previously the toggle-crouch did not happen if sliding was detected, now it happens first, then sliding down follows.
So we try to find simple solutions for the issue.

Link to comment
Share on other sites

On 5/11/2022 at 9:01 PM, Daft Mugi said:

I noticed that there are many comments that begin with the name of the developer who wrote the code. What is that for in this codebase? And, should I do the same?

The reason I am doing this is so that others can see who applied the change and for what reason (I also add the bugtracker number). It also helps me to find my changes later on quickly if fixes are needed (which happens more often than I like to admit 😕 )

Regarding the actual topic: I've only glanced through the thread as I haven't followed the topic by now, so I just add my two cents, which may be redundant. If misinterpretation occours I may read the whole thread more carefully later, but right now the coffee hasn't kicked in yet :D

  • You cannot climb in a crouched position irl, so I don't expect it in a game. Therefore in regards to visibility the game should handle the player as if he were standing independent from crouch/stand stance while climbing a ladder, rope or mantling.
  • Nevertheless players should be able to tell the game, which stance they want to be in after said action is finished. The stance icon at the light gem should represent that.
  • As tapping the crouch key would cause the stance change, sliding down should still be initiated by holding the crouch key, like it is now. Although I think that the time for how long you have to hold the key before sliding begins could be shortened.
  • In this regards it would be nice if holding the crouch key could be used to abort mantling, if for example you notice that there is a guard coming around the corner. Or is this already possible?
  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

This is an interesting problem. I played around with ladders a bit today.

@stgatilov I agree that we should not dramatically change the current ladder behavior if we can help it. To @Obsttorte's point, it is unrealistic to climb a ladder while crouched. However I think the speed penalty there is fair and the alternative solutions really suck :(:

  • Not allowing players to grab a ladder from crouch will break expectations and likely break some stealth encounters.
  • Arbitrarily popping the players head up when they grab a ladder will be doing an action without an input, which is typically not desirable and also might break stealth encounters. 


Here are my observations: 

  • The interesting thing is you can "stand up" on a ladder,  but cannot go back to a crouch (however the lightgem says otherwise). Unless there is a reason for this, I don't see any harm in animating the players head back to a crouch position to match the light gem response. Once again, the speed penalty there seems fair and mimics the core movement mechanics.
  • IMO - Toggle crouch should always keep the player crouched. So with it on, ladders and sliding both happen in a crouched position. At some speed penalty
  • I agree with @stgatilov having an undesired crouch/ stand state change at the end of sliding sucks. Can we negate that key release all together? Crouch toggle of course will just keep you in a crouch state regardless?
Link to comment
Share on other sites

Note that the lightgem indicator does not reflect whether player is currently crouched, it shows "crouch intent" --- whether player wants to be crouched or not. For instance, when you go through a pipe, you can toggle crouch and the indicator near lightgem will toggle too, but the player will stay crouched all the time.

Link to comment
Share on other sites

29 minutes ago, stgatilov said:

Note that the lightgem indicator does not reflect whether player is currently crouched, it shows "crouch intent" --- whether player wants to be crouched or not. For instance, when you go through a pipe, you can toggle crouch and the indicator near lightgem will toggle too, but the player will stay crouched all the time.

Huh interesting, I didn't realize that. I don't think that changes my thoughts much, but its good to know there is an intent there. 

Link to comment
Share on other sites

1 hour ago, kingsal said:
  • Not allowing players to grab a ladder from crouch will break expectations and likely break some stealth encounters.

Regular-crouch players cannot attach to a ladder while crouching, because they will immediately slide. They must stand before attaching to a ladder.

Quote

Arbitrarily popping the players head up when they grab a ladder will be doing an action without an input, which is typically not desirable and also might break stealth encounters. 

Thief/New Dark does this. I prefer this. I imagine other players coming from Thief may prefer this as well. Regular-crouch players must do this. I think this should be a cvar option. If no other developers want this cvar, then maybe we should have a poll for this. Because if no other players chime in, then it's on them. I already coded this and have it in my build, but they may not be able to.

Quote

I agree that we should not dramatically change the current ladder behavior if we can help it.

My design philosophy has been focused on least dramatic change by making toggle crouch work more similarly to regular crouch. That is to have the same advantages and disadvantages as regular crouch. Also, that helps to make sure mission designers don't accidentally design a space that only works for toggle-crouch players. If I understand @stgatilov correctly, we could flip this and make regular crouch behave more like toggle crouch on a ladder/rope. That seems like an approach worth exploring as well.

Quote

Toggle crouch should always keep the player crouched.

Regular-crouch players cannot be crouched on a ladder. Also, people cannot exactly "crouch" on a ladder in real life. Why make toggle crouch this way?

Quote

At some speed penalty

Why penalize the player for using ladders? Ladders felt awful in TDM until I learned that regular crouch felt normal. I fixed the speed issue for toggle crouch by making it the same as regular crouch.

Link to comment
Share on other sites

On 6/19/2022 at 1:43 PM, Daft Mugi said:

Regular-crouch players cannot attach to a ladder while crouching, because they will immediately slide. They must stand before attaching to a ladder.

Incorrect. https://www.dropbox.com/s/l5m3j6ks5nc2dw5/The Dark Mod 2.10_64 2022-06-19 13-50-29.mp4?dl=0

On 6/19/2022 at 1:43 PM, Daft Mugi said:

Why penalize the player for using ladders? Ladders felt awful in TDM until I learned that regular crouch felt normal. I fixed the speed issue for toggle crouch by making it the same as regular crouch.

I don't think you read my response. There is a speed penalty to being crouched on a ladder when you grab it in a crouched position.

On 6/19/2022 at 1:43 PM, Daft Mugi said:

Regular-crouch players cannot be crouched on a ladder. Also, people cannot exactly "crouch" on a ladder in real life. Why make toggle crouch this way?


Regardless of what you can and can't do in real life, TDM is not a real life simulator. Our goal is to make the game fun while still offering as many usability options as we can manage. We'll make toggle crouch on press, but we'll need to do it with the least amount of wake on 100+ missions. 
 

Link to comment
Share on other sites

6 minutes ago, kingsal said:

Do you have tdm_crouch_toggle_hold_time set to a really high value?

Quote

I don't think you read my response. There is a penalty to being crouched on a ladder when you grab it in a crouched position.

What is the penalty?

Quote

Regardless of what you can and can't do in real life, TDM is not a real life simulator.

I agree. Earlier, I mentioned real life versus game life in this thread.

Link to comment
Share on other sites

3 minutes ago, Daft Mugi said:

Do you have tdm_crouch_toggle_hold_time set to a really high value?

What is the penalty?

I agree. Earlier, I mentioned real life versus game life in this thread.

Mine is set to default "tdm_crouch_toggle_hold_time"  "400"

Its a speed penalty, just like when crouch walking,  which actually makes me wonder if it also reduces climbing sounds. 

Link to comment
Share on other sites

In conclusion (for me), here's what I think we should do:

  1. Make cvars for whatever you all come up with.
  2. Make a cvar (tdm_toggle_crouch_on_key_down) that defaults to disabled. This is toggle crouch on key down. Veteran players who prefer the old behavior from all these years can disable this cvar. When disabled, crouch has the traditional behavior on ladders/ropes. (Not my way; matches other games.)
  3. Make a cvar (tdm_toggle_crouch_disabled_on_climb) that defaults to disabled. Toggle crouch behaves like regular crouch on ladders/ropes with the exception that if you are crouched when attaching to a ladder/rope, you stay crouched until you press the crouch key. After pressing the crouch key on a ladder, your crouch intent matches regular crouch behavior. When you slide, you are using regular crouch behavior, and when you land, you are you are using regular crouch behavior. Then, on key up you stand, just like regular crouch. Speed matches regular crouch. How stealthy you are matches regular crouch. This is the least amount of work and code, probably, and the code is already in the patch. (Not my way; matches TDM regular crouch.)
  4. Make a cvar (tdm_toggle_crouch_autostand_on_climb_up) that defaults to disabled. This will autostand the player when climbing up a ladder/rope. This is for players who prefer Thief behavior. (Not my way; matches Thief/New Dark.)

I've tried to add more ways for more players to enjoy TDM, such as adding cvars to accommodate different preferences rather than saying, "I don't like it, so no." I don't believe my preferences are the only right way. I believe cvars are needed to accommodate several players. I had this working for myself and stayed quiet, but when I saw @The Black Arrow say that he couldn't play with the current toggle crouch behavior, I decided to help out. My energy for this topic is running thin, though.

Can we add those three cvars? @Obsttorte@Dragofer@STiFU@kingsal@stgatilov

Edit: Added suggestion from @kingsal: tdm_toggle_crouch_on_key_down defaults to disabled.

Edited by Daft Mugi
Link to comment
Share on other sites

I dont see a problem with adding those cvars, however we should not default to the new behavior, especially without thorough testing. It might satisfy a few players, but has the potential to irritate a whole swatch of people who are used to it being the current way.  

The best case would be a toggle crouch behavior setting in the settings menu. Players can then customize from there using cvars. 

Link to comment
Share on other sites

Well, the problem is that I don't like having a bunch of cvars either.

We had a story when we realized that multiple missions are broken with use-on-frob turned off. Nobody noticed it because it is turned on by default, and only rare players changed that. I don't even remember if it is fixed or the missions are still broken.

Adding cvars will be temporary solution. Sooner or later someone will notice that cvar is broken in a mission and remove it, or declare it unsupported since it is not in the menu, or someone will find out that nobody uses cvar and will delete it, or somebody will delete it because it does not allow to change something which needs to be changed (or because it got broken due to already committed changes), etc.

Adding cvars as kill switch or for testing is OK, but adding cvars as legit player's choice... we'd better not.

 

We still have a very lazy solution which does not introduce new problems: use crouch on keyup while on ladder/rope.
In the worst case, we can just use it.

And since everybody agrees that crouching while on ladder/rope makes no sense, hardcoding state to "standing" is probably OK too.

Link to comment
Share on other sites

14 hours ago, kingsal said:

Not allowing players to grab a ladder from crouch will break expectations and likely break some stealth encounters.

I never intented nor wrote that. 🤨 All I said is that the player should be treated as standing when climbing, and that the stance displayed by the icon next to the light gem reflects the stance the player will get into once climbing/mantling is finished. So exactly as it works when in tight spaces where you cannot stand up.

11 hours ago, kingsal said:

Regardless of what you can and can't do in real life, TDM is not a real life simulator.

But if a game is set in a scenario that is close enough to real life, players will derive how things work from how they do in real life. This is the fundament of the player expectations. There is a reason why many games, both digital and board games, choose to use a concrete scenario instead of beeing abstract, although in many cases the scenario isn't that important. It reduces the amount of rules you have to explain to the player.

11 hours ago, kingsal said:

Our goal is to make the game fun while still offering as many usability options as we can manage.

While I obviously agree with the first, I have to disagree with the latter, at least in the context used by you. While it is fine to add different possibilities to approach the problems laid out to the player by the game (as it makes the game fun) adding different options just for the sake of having them is not and is only feature creep, and therefore bad game design. If players expect to be exposed when climbing, and I am sure the majority does, there is no reason not to handle it like that. And I bet many assume that there is only one way to climb a ladder (head down with your back to the wall :D).

@Daft MugiI am against adding tons of cvar. Besides the possible bugs introduced players shouldn't have to deal with tons of settings, especially new ones that have no idea how they affect gameplay. In addition it would further clutter the menu.

As far as I understood it the whole point is to improve an existing mechanic. So you look what the potential issues are and solve them. Providing dozens of different solutions and leave it to the player to find the one that more or less works isn't a solution. It is ok to have some aspects tweakable, like how long the crouch key needs to be pressed before sliding begins. Stuff that allows you (the developer!) to fine tune things for improvement. But your are basically asking the player to define core gameplay mechanics, which isn't his task.

So my points stand:

  • Always stand on ladders, ropes and when mantling as well when sliding down (therefore removal of the speed reduction used when crouching)
  • crouch key defines the stance after you have finished movement
  • the toggle is when crouch key is pressed, not released (I think that was the initial point)

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

12 hours ago, Obsttorte said:

So you look what the potential issues are and solve them. Providing dozens of different solutions and leave it to the player to find the one that more or less works isn't a solution.

I did this already! I provided a solution in the form of a patch with a single cvar to toggle between a new way and the traditional way. No one else has provided a complete solution yet. My solution was to make TDM toggle crouch be like Thief. The feedback so far has been that you all don't like how toggle crouch works in Thief. I've been using my patch since March and haven't run into any issues. With my patch, I play Thief and then I play TDM, and they feel similar. I really enjoy this!

I wrote a lot in the beginning of this thread about how different existing crouch systems work and different things to consider. I thought about how it might impact mission design. For example, if it works like regular crouch, then that's a safe choice since it shouldn't break existing missions and it should have the same stealth advantages. I've been thinking about this since March. But I'd rather not think about this anymore for now.

I came here to help, because someone in the community wanted this, and I came to help others in the community have fun with TDM, especially those coming from Thief, since they may not be able to code this themselves. I listened to the community: 1) toggle crouch on key down, 2) make it a cvar since some players may want the traditional way. That's how I made my patch.

TDM is open source and has a community. Some players will want toggle crouch to work like Deus Ex, Dishonored, Thief, Tetris, Quake, etc. Haha Quake doesn't have crouch. Not everyone will be happy if there is a single way. So, maybe tdm_toggle_crouch_deus_ex, tdm_toggle_crouch_thief, tdm_toggle_crouch_tdm.

I don't know. But I do know I've done everything I can for now. I listened to everyone's feedback and came up with compromises and solutions. What else am I supposed to do? It's up to you all now to figure it out for the community by finding a solution (or two). Or, maybe include the community by having a poll. Again, I don't know. I'm a newcomer to TDM and don't know how things work yet around here. I got involved before I was ready, because I was trying to help someone in the community.

Edited by Daft Mugi
Toned it down a bit; I shouldn't have written this half asleep!
Link to comment
Share on other sites

Hi,

I haven't followed this thread but I will see what the debate is about and provide some feedback. For what is worth, I don't recall any issues with the current toggle crouch but then, I probably got used to the existing functionality and forgot if it felt right or not.

TDM Modpack 4.0

Link to comment
Share on other sites

The suggestion to have toggle crouch on key press instead of on key release is totally legit since it would feel more responsive.

I think trouble - for the original devs - begun when it was decided that the sliding down mechanic should also work while pressing toggle crouch alone.

I think the simplest solution is to make the sliding down mechanic work only if the up or down movement keys are currently pressed.

Edited by snatcher

TDM Modpack 4.0

Link to comment
Share on other sites

@Daft MugiYou misinterpreted that sentence or I could have written it better, but either way, my intention was not to offend you. The "you" in that quote doesn't mean you personally. Would have probably been better if I have written "one". And I explicitely wrote earlier on that I only skimmed through the thread. Quoting one sentence from someone you haven't had communicated with yet and getting upset about your interpretation of that sentence isn't a nice move either. I'm, like most of us, no native english speaker.

 

On topic: you cannot please everyone. If you try to, you end up with tons of settings and adjustments. And stating that this is not good doesn't mean that the work you have done isn't good. We need a compromise solving the issues (what you have already done) and may improve the system in a way the majority can agree on. Not twelve solutions to choose from. At least these are my two cents.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...