simple machines forum

Please login or register.

Login with username, password and session length
 

News:

Remember to make your own backup of posts before submitting.

 
 

Author Topic: Control/Shift is Magic/Attack and other things  (Read 1608 times)

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« on: November 11, 2018, 11:55:01 PM »

For the record, I'm thinking of making a change to how controls work. Yesterday I added Shift+F3 (and also Shift+Esc, of dubious value) to make the new "zoom" setting go backward, and incidentally I've also added a new zoom setting that is the closest integer match to King's Field II (62) in case you want to use it with SOM. I got tired of manually inputting it into the INI file.

The problem with Shift combinations, which everyone knows, is for SOM shift lashes out with the current weapon. It occurred to me this morning, that this can be canceled if Shift is pressed in combination; but only if normal use is delayed until the button is let go of.

It understandably seems a petty use of a Shift combination, however it's not long until I'm going to add shields to my KF2 project, and they will require a similar delay system. So I thought that since the legacy of SOM is to use Control and Shift for these functions, that it could be very useful to be able to Ctrl/Shift with a controller. It's not so useful with default buttons, but once you start binding hotkeys/macros to leftover buttons, it's of more use. For things like F3 you can use one button instead of two to go forward and backward. I've recently had F3 bound to my controller, twice, for experimenting with VR, but I should probably remove it, since I've since made it available via the PSVR's controls, and am doing less with it. (I suppose I keep pressing it by accident because it's bound to the controls I use to navigate KF2 in the emulator, since it doesn't have sticks.)

Likewise, the Select button is bound to Esc, so Shift+Esc can go backward through the analog modes, perhaps enabling more modes.

Once the coming Quick Select system is developed, it can even be possible to have multiple pages to pick from depending on if Shift or Control or both are held down. That could give you 40+ things to bind items, etc. to.

Holding Control/Magic is going to raise the shield up. But that's a pretty benign thing. And if you do a combo fast enough it probably won't appear on screen in time, since it takes long enough to resolve a tap input.

For controllers known to use triggers, I will throw something together so as soon as the trigger starts going the other way it will kick in, instead of waiting for full release.

It could open the door up to implementing an attack charging system, where you can hold it down for a stronger attack. Which for a trigger will just be equal to the time it takes you to press it all the way down, and not necessarily how far it goes, but that might be an option also. However, if held down too long, it will switch over to a defensive posture as soon as that's a possibility. Whichever comes first.


ON AN UNRELATED NOTE, work on KF2 has put in me in a position where I'm really grappling with the demands of producing something that works well. So I've improved many things, especially around running, and movement on stair like geometry.

Something I've been thinking about is making tapping the Action button work a little differently if it's done when not moving, or rather pressing the movement d-pad/stick. The reason being, is the current way of doing a kind of stoop down, that is really just a rush/dodge maneuver performed in place, is a little off-putting to my taste. So I'm thinking instead that it will act like a toggle to stoop over or kind of sit down, that will just stay down, until you move. You might think of it as examining something, and it might change a little depending on if there is an interactive object in front of you, or something that looks like it might be a chair nearby. Or it might sit on the floor in absence of anything to do. If a wall is in front of you it might just lean into it, or something to indicate that there is nothing unusual about it. Or it is a door that isn't really a door.

If squatting it will stand up as if peeking over something, since when squatting you go up instead of down when pressing Action. It may also move at normal walking pace, instead of dashing.

« Last Edit: December 08, 2018, 12:39:19 PM by Holy Diver »

Holy Diver has 2452 posts

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #1 on: November 12, 2018, 09:44:37 AM »


FWIW, as it turns out, there was already a 150ms delay on pressing the attack/magic buttons so that they could be timed for using them to run, and I think also to prevent repeating by holding them down...

SO it seems like this way is actually a better and more responsive system, because not only should it be faster, or can be so, it is easier to press the buttons down together in combination successfully.


I decided to make pressing Ctrl+Shift equivalent to pressing Alt+Alt, which in most cases is equivalent to pressing Alt, without having the mouse cursor floated. This way the controller can manually input Alt combos, and even Alt+Alt combos. So, you can for example assign F3 to a button, and be able to use it for "god mode" or for changing the FOV with Alt+F3.

Later with the planned Quick Select system you can enter F3 by pressing Menu along with a button assigned to F3, however I don't know how that might work if different menus were assigned to Ctrl+Menu and Shift+Menu, or even Ctrl+Shift+Menu. Currently Ctrl isn't even used for anything that I know of. It's probably best reserved for a host of features.

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #2 on: February 18, 2020, 01:14:37 PM »

14mos later...

This system (unorthodox for a video game) finally gave me a good enough solution for hiding the HUD elements with the controller.

I've been thinking about how to (eventually) holster weapons and use a hands-free mode that originally my main motivation for that was to be able to make part of that alternative mode toggling the HUD elements.

But I concluded that was impossible, and anyway I wanted to be able to do this with weapons drawn also.

I've thought about this in the past but it's only now starting to make sense as a result of changes like the one described in this topic/thread.

What I thought as a compromise might work is to overload the Start and Select buttons by holding them down to toggle the two HUD elements. I wasn't satisfied with that. I don't think I implemented it but I could see it would compromise those buttons and holding doesn't make sense for functions that don't have visual feedback.

So... what I realized is pressing either attack button is now interpreted as a modifier, so technically pressing both is a modifier of a modifier with nothing to modify. So I decided there was no reason to not make tapping the two attack buttons together to toggle the HUD. And if you want to get fancy then you can hold one (the modifier) and press/release the other (the modified) to toggle one at a time. Technically the Magic button is considered to be the left button. Really it would be more correct to call it the Left button. Later I'm going to make an ambidextrous system for drawing the primary weapon in either hand. You can only draw from the hands-free mode.

I've also staked out some keys for this. I've added G key for the gauges HUD and H key for crosshair toggle (a new thing that just uses the Windows crosshair cursor for the mouse) and J key for the compass HUD. These are clustered in the middle of the keyboard so they don't use any modifiers. I use modifiers for keys in the way and things that are more like authoring abilities.

This was a pleasant surprise. It was staring me in the face the whole time. It only works when tapping the modified button so it can work with raising a shield (holding) and attacking or while attacking.

Holy Diver

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • About/Support Me/Sword of Moonlight
look out honey, 'cause I'm using technology
Holy Diver says,
« Reply #3 on: June 23, 2020, 03:35:04 AM »

For the record, it's now possible to fly up/down by holding both attack buttons down (in F4 mode) but I made it so holding 3 buttons down cancel out this Ctrl+Shift behavior, which is used to infinite run at top speed. Ctrl+Shift=Alt on the keyboard, and if I haven't said so, I think pressing either Ctrl or Shift alone equals Alt too, i.e. Alt+Ctrl and Alt+Shift. It sounds very complicated but it's actually a very convenient system.

The timing for canceling out is still leaky since I haven't given it a great amount of attention. I just finally got tired of accidentally doing the wrong thing while doing the 3-button run thing.

Flying is different from other combos since it uses the direction controls, which is why previously it wasn't considered for enabling by holding the attack buttons, since obviously you need to move while attacking too, although you tend to not use flying mode and attack at the same time.