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: Working on wall-grab/ladder features (2020)  (Read 942 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: February 06, 2020, 08:59:38 PM »

EDITED: http://csv.swordofmoonlight.net/SomEx.dll/1.2.2.14.zip is a demo of the new wall-grab feature described herein. It may be missing something but I can't think of anything right now off the top of my head. Ladders are next. I want to include them together in the next release.

First, I've been messing around with SOM a little lately and was reminded yesterday my DualShock4 controller was on the fritz. I had forgotten, and that's why I was unhappy with a sometimes bumpy ride in my play sessions the day earlier...

So luckily, I have a new PlayStation4 that came with a controller naturally, and I gotta say that its controller works wonderfully! I remember my old controller took a long time to break in and was super tight and finicky. I'm beginning to think every electronics I've bought off Amazon.com in the past few years may be a second-hand scam ring. My old controller currently has a mind of its own. I may try to open it up and see what's going on inside, but it was never so good as the new controller when it was brand new. It was always very noisy... not sound wise... but when left in the center its output twitches around a lot.


OKAY! Onto my news: I don't want to go into great depth about this, but I'm pretty excited and I feel like this is a project I'm going to apply myself to for a little while while I'm still working on my 3D modeling software effort. I'm partly excited because there's new Moratheia activity (https://www.facebook.com/pg/moratheia/photos/?tab=album&album_id=2785294164821322&ref=page_internal) and they wrote me to discuss working on some things the other day.


I got an idea out of the blue that I don't believe I ever had before. I think it's a revelation from wherever I get my good ideas.

The germ of it is analogous to how ducking down works to keep your position planted in one spot, which is useful for platforming. It's like a safety net. It lets you look around corners in a sense since you can lean out. But you can't lean out any other way. This concept of "wall-grab" is just like this, except you do it while pressing up against anything... except NPCs. You can't duck when doing that, so really you can think of it as another way to duck, except you don't actually duck. Because it's contextual, unfortunately you can't do it without a "wall".

There aren't a lot of reasons to do it. The main reason is just so you don't have to wonder why you can only do it when ducking! Of course, this way you can stick your head out around corners like a spy. That's mainly just for fun, but that's what games are for! In theory though a monster might not be able to shoot you that way, since your body is covered, but they can probably sense your presence unless SOM factors PRT information into its AI.

To duck you hold the action button. So to grab a wall you must too, and then you're locked in place, and so as long as you hold it you can lean out, and you will stay at standing height.


NEXT! The topic headline also includes a "ladder": I've decided on a system for making simple ladders. Maybe more complex climbing systems will come at a later time. This wall-grab feature is what gave me the idea, since it provides a way to think about ladders as something that are neither platforms nor interactive elements, which if you think about it, describes what a ladder is: somewhere in-between.

I've not gotten far with ladders in the past because I could not arrive at a satisfying solution. For a while it's been theoretically possible to construct an event based ladder with teleportation that over short hops is just made to look like blended movements. I'd kind of left it at that. We have a layer system now, so better ladders could be a healthy addition...


To grab hold of a ladder you'd need the wall-grab feature. But it won't automatically climb because you might also want to do normal wall-grab stuff where there is a ladder. So, I didn't say it before but wall-grab will have the same feature set as ducking, so you can do a jump off of it, but probably not a crawl. Except with ladders doing the crawl maneuver will initiate climbing, and the jump maneuver will too, but with a jump first, and even if the ladder is like a fire-escape it might be possible to jump to reach it, but that wouldn't work unfortunately if the ladder were just hanging from a ceiling, since this system requires a wall to grab. But probably in that case we could figure out something with a standing jump... actually jumping onto a ladder will most likely climb the damn things.

(EDITED: As long the bottom is at head height it, I suppose it meets the qualifications for a "wall" ... or if it's a ladder it will be a wall, if not it might be treated as an auto-crawling "tunnel" which already has it's own system that's incompatible with this new wall-grab system.)

To make a ladder the new ObjEdit tool built into SOM_PRM will have a new section added to its menu bar for ladders. I will try to mark it somehow to show if ladder data is present. But it may be just the presence of an underline or something if I'm feeling nonchalant about it.

Somehow the PRF file will be marked as possessing a ladder. Worst case I will flip a bit in the object type field.

The ladder menu will have a little popup window for setting a MDO file's control points. That could be useful for more than just ladders, but it will probably be hidden in the ladder menu. The CPs aren't in the PRT file. They're in the MDO file, so it's appropriate to put this in the menu bar. It might be under a Tools section, but the Ladder menu will have another way to access it if so.

There are four CPs if I'm not mistaken. So they will form a rectangular shape, or probably even a cuboid if there is a little depth to the ladder. But assume for now that the Z dimension is a plane. The shape is skewed a little so that it defines four rungs on the ladder, with two on the top and two on the bottom, and the rest of the rungs are filled in automatically by interpolating/extrapolating those data-points.

In the game as long as you reach the bottom or top rung you can climb and the rungs between are just used to try to make a reasonable climbing motion to match.

I'm confident about this plan. To climb down the ladder isn't a wall-grab but it uses ducking instead, which is analogous to grabbing as you may recall. The nice part of the wall-grab feature is it works beautifully as if filling in a gap in the control scheme that was missing. That's how I know it's correct.

Climbing down should work in any direction I think, and will require using the crawling maneuver. It may or may not be forgiving about just dumbly walking off the ledge above the ladder but I don't think so. I think players will have to reason about ducking at least, and from ducking the only way to move is to crawl, so it should be a learning opportunity. If authors want to make things easier they might make the first ladder impossible to walk off of, or could include invisible obstacles so walking off is impossible.

(EDITED: Actually the invisible obstacle would probably force the ladder to act like a tunnel which would trigger auto-crawling, which should crawl down the ladder. As a downside it would also interact with projectiles, etc. barring something extra.)
« Last Edit: February 21, 2020, 12:04:12 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: February 07, 2020, 07:44:01 PM »

EDITED: I can't express enough I'm actually over the moon about this development. I can't see any problems with it. I keep realizing how it answers a lot of questions all the while without introducing any new control concepts, creating a unified vision for a standard control scheme.

I kind of knew its implications for climbing ladders but didn't think it through yesterday when I posted about it here.

With ladders the question arises about how to control things once you're on the ladder. A lot of games just treat it as a shuttle, but that's never been my idea of how a KF game should conduct itself, so I was left with a lot of questions to answer...

For one, on ladders you have an extra degree of freedom, like flying or swimming kind of, but in those cases you can reorient yourself, whereas with a ladder or climbing more broadly you can't. So, you have to decide, what input goes up and down, and if so, what will you sacrifice.

I've gamed this out numerous times in the past. But it doesn't matter now, because this philosophical change comes with its own answer. Which I see as a relief...

Its answer is life on the ladder works just like life off the ladder: namely that you climb it as if crawling, since the input sequence to utilize the ladder is the crawling sequence; and if you want to move on the ladder, you hold down the action button, which is the wall-grab/duck maneuver, and as long as you're holding it you can move freely on the ladder, but you cannot advance up or down the ladder...

That means you can do everything normally on a ladder while you're holding the action button down.

Depending on how you release the button you either continue up the ladder or jump off the of ladder.

You can jump off in any direction, just like jumping normally. But I don't know if it makes sense to do a stationary jump. That could be a way to hurry up. Tapping action might be a way to jump straight down. But tapping is also for climbing onto platforms, so it would depend on if you are pressing forward or backward if so.

In any case, you have a lot of freedom on ladders, and that can be useful. Some games like Ico I think have you do different kinds of maneuvers on ladders to reach places you couldn't reach by any other means.
« Last Edit: February 28, 2020, 09:40:00 AM 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 #2 on: February 08, 2020, 04:34:53 PM »

Notice

For the record I uploaded a patch yesterday with a fix for a glitch that investigating this turned up. I also had to upload a new patch this morning when I realized I broke something else in the patch with a typo mistake. I swear my brain records everything I do and informs me of my mistakes when I wake up the next day. I mean really specific things...

Patch

http://csv.swordofmoonlight.net/SomEx.dll/1.2.2.12.zip

A new feature I'm looking into (http://www.swordofmoonlight.net/bbs2/index.php?topic=301) instantly bore fruit after it caused me to stumble upon a bug that this patch is intended to correct. The glitch happens when you push the action button up against a climbable surface but instead of letting go you hold the button until it's too late to be able to climb. That pretty much describes the feature I'm working on, except it's limited to climbable platforms. I never noticed the problem because I guess I never tried to do that. There's not real reason to right now. The unwanted behavior is you kind of sink into the wall and get violently spat back out. Luckily the fix doesn't have any visible disturbance, which is a good sign for the feature I'm working on. I thought it might be noticeable even after a fix. You never know. With controls different kinds of maneuvers are always coming into conflict with others. Sometimes there are fundamental reasons you can't have it both ways.

I always drop everything to fix a bug. It was a good reintroduction to my code. It takes me a while to reaquaint myself after a prolonged absence.

ALSO this patch happens to include some new extensions that add a fog effect to the volume based transparency feature described here (http://www.swordofmoonlight.net/bbs2/index.php?topic=295.msg2778#msg2778)

The fog is like the color fog in the distance except for the likes of underwater or otherwise transparent things that use these new [Volume] extensions. It can make a body of water appear darker in its depths or make it appear muddy as if there is a cloud of sediments that renders the water to appear as a single color as opposed to a dynamic surface.

EDITED: I had to reupload the patch after realizing a last second change I made was wrong WRT the unrelated the crouching feature. I should've just left it alone. But I'm glad I realized the mistake. (I'm glad how my brain consistently informs me of my mistakes after a nights rest!! I should probably only upload the day after.)

The glitch could easily be found by a new player who is experimenting with the controls just by trying to climb onto a platform by holding instead of tapping the action button, so it's a very good find. But for me the thought would never occur.

P.S. I think this feature will open up a path to picking up and moving objects. At first I thought that might need to use one of the other buttons, but I'm averse to making things overly complicated...

What I suspect is to pick up an object you would need to grab it this way, and then pull back on it while looking at it. Kind of like pulling turnips in Mario 2. It wouldn't work for small objects since you cannot grab them this way. Maybe you can grab them like crouching, which is like grabbing the floor. But that only makes sense for things on the floor. Anyway, interactive objects are not expected to be small enough to take with you. Those would be inventory items instead...

I think for even larger objects, to move them would require using the crawling maneuver after grabbing them. I.e. "put your back in it!". Then you can take them with you along the ground until you stand back up.

If an object can't be moved then the "crawling" maneuver won't make you crawl away or do anything else. It should serve as an indication that pulling isn't possible. It could possibly paralyze you to indicate the wall isn't moving with you without having you run out into the open, but I think moving away is desirable, so a possible solution is to not be able to move objects like that unless you are close to their center. That way you can still use them as hiding places to be able to peek around them.

(Also, I still aim to be able to sit down. In that case the plan is still to look down prior to grabbing the floor/platform, or I suppose even a wall to sit against the wall. Looking down will be used to transition to crawling even closer to the ground and to sit down or even lie down. I want to make all major movements available eventually. Even if they have no "purpose" it lets you do whatever you would do in real life in the game space... which makes it feel like you're really inhabiting its space.)
« Last Edit: February 28, 2020, 09:40:46 AM 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 #3 on: February 10, 2020, 08:58:03 PM »

Update: I took a crack at this yesterday; worked long into the night. I was able to complete the basics. I think that it will be fine-tuned a lot, but there's already a very sophisticated system in place.

I will probably make a demo build available, before long. I'm trying to not get sucked too deep into this right now so I don't neglect my other already underway projects in favor of a diversion.

BUT WOW! I can already see it's definitely a fixture, and it really completes the control scheme. I honestly can't fathom why I didn't already do this a long time ago. I know I kind of batted around the idea in my head, but it felt then like a bridge too far. Not enough was set in stone that I could see such an unorthodox move made the most sense. (Edited: It's certainly been bothering me for a long time that I couldn't look around walls while standing up.)

What I find so interesting about my KF control scheme is that it's so alien to anything else I've ever seen in a video game. I don't know how much reality there is to that though, since I don't have a lot of first-person games under my belt.

With this system you really feel like you're moving through the space deliberately. It lets you control the game in ways that wouldn't be intuitive without it. What it really gets you is a way to switch between moving controls and controls that keep you fixed on a spot but still able to careen around and turn about. And it has that whip feel that's very organic.

I fussed with it some. I think it will get better with more testing but I think it's good enough that you can do the maneuver when you want to and it won't happen accidentally.

I think I'm going to make it so you can move around a little extra because it's a little jarring when you grab the wall too far from the edge and stretch out to look around it only to not be able too see well. But when you lock on you are already pushed against the wall, so you can always pull back to get a better view. (Edited: To give you an idea, when you grab the wall your shadow stays at that spot but your view can move around. It's the same as crouching but since you're not moving around on the ground in theory just your upper body is moving, so the shadow doesn't track it. But I'm going to make the shadow move a little. And some of that will reflect the extra freedom to actually move around some.)

I think that I'm going to add a crawling option after all. Unlike crouching where stretching out stands up, in this case it goes down. I.e. when you lean over to spy your head goes down. So I think I'm going to have it go pretty far down at the most extreme, and if you crawl away from a low vantage point then you will be able to crawl (hunched over height) away from the wall. Otherwise you walk away normally.

Strikeout: the gulf is too far to bridge. It kind of works but is too sensitive to finesse the analog controller. But it doesn't look as nice either.

I had to make jumping only work when the controller is pushed almost to the extreme. That's because there is a tendency for pulling away from the wall and letting go to look like you've let go of the thumb-stick, and there is no use (mostly) for a standing jump...

I've made a point to investigate how the crouching jump deals with this because I think it's pretty good about not jumping when pulling back, but it probably has a slightly different dynamic.

Anyway, because jumping only works at the extreme I reckon it makes sense for crawling to only work there as well. I hadn't even planned to enable crawling.

I think there will be some special cases for pressing against the wall at the same point that you grabbed it. That's easy to detect since the clipper will push the real center back off the wall, so you have to actively position yourself that way, and there is no real benefit to doing so since it's the most restrictive position.

The experience is hard to describe, but I guess it's most like Deus Ex for the PlayStation 3 except instead of prompts and rails it's organic. You can't slide along the walls but that's just how you normally move, so you don't need to.

EDITED: I think the real position will need to move some if it can so that jumping out from behind a wall doesn't trip over the lip of the wall a little bit that's noticeable... I worked on muffling the footstep sound when crouching and grabbing the wall since you're not really moving in those cases aside from getting a footing and they need to be inherently stealthy. I'm surprised I didn't factor that in originally. I think I was fine with basing it on speed and there isn't much speed in those cases, but I think there can be even though you're more moving your hips in theory. (Anyway, I felt it too loud in its present state. It can be hard to tell how loud the footsteps are because the volume setting tends to turn up sound effects until micro sounds seem like they are loud noises. I don't know if there is an intelligent way to do volume. I assume it's relative to the speakers the sound is being piped into.)
« Last Edit: February 11, 2020, 11:13:31 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 #4 on: February 11, 2020, 10:24:24 AM »

Update: Work-wise today I couldn't tear myself away from this. So I worked on filling in edge cases like what happens if you get pushed around when you're on the wall.

I was able to make the dip part of the climbing (same dashing effect) wait until after it's certain the wall-grab feature isn't in play. That actually looks interesting. A bit more weighty. Earlier I removed some code I couldn't understand that made doors open instantly when climbing. I think the point of it is to look for a door before climbing, but instead now climbing is given priority, so if you want to give the door priority it has to be reachable while standing still. Door detection is a lot better today...

Strikeout: (17 days later) I don't know what I was thinking about there. Ducking is already suppressed when pushing against walls, and button release semantics don't require waiting. At any rate, in the final product release there is no delay for climbing since it can be done as soon as the button is let go and that was always the case since climbing requires tapping. (Chop it up to brain malfunction.)

So I think I'm going to continue this trend and work on making item pickup and NPCs contextual. It can be hard to move around NPCs without triggering them sometimes.

I'm also seriously considering making the "empty container" messages appear if you just touch them because the pickup animation doesn't always suit containers. It can't be changed or suppressed because it's ambiguous if you mean to dash/dodge/jump/activate. For doors and chests it tends to look fine. It synchronizes with their opening. Plus examining closed barrels is an abstract concept to begin with, so animating it is even weirder than not. (Edited: I think I am going to work on this... pushing up against the barrels feels like a more natural way to examine them without withdrawing anything. Crouching over remains should probably do the same.)
« Last Edit: February 28, 2020, 09:46:38 AM 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 #5 on: February 12, 2020, 11:01:05 AM »

Tonight I (twice) uploaded a demo (http://csv.swordofmoonlight.net/SomEx.dll/1.2.2.14.zip) showcasing the "wall-grab" part of this topic/thread.

Unrelated: I think the demo fixes a problem with the mouse cursor sometimes disappearing for the remainder of the program... usually for the entirety of the program. I brute-forced the weird ShowCursor API that is a bit funky about keeping a counter that determines if it really does what you tell it to or not. (Windows seems to never work perfectly in this regard.)

I reuploaded the demo to include that and because I found some bugs and found out that I indeed did get lucky that the change I made to timing climbing inadvertently made it work to tap to enter crawlspaces. (EDITED: (16 days later) it turns out the auto-squatting feature was what made this work.)

I think the current release has a bug with running out of crawlspaces not standing up like it normally does. I originally designed it to do that so something must have got lost in the shuffle at some point. (Investigating that is how I found out what I said in the previous paragraph of this post.)

Right now it works very well but I have to learn to get used to the new wall-grab behavior. I think especially in narrow spaces you have to think to not run into a wall and expect it to slide you around a corner. You have to behave more like a normal human being in the game, which is a good thing in my book... of course, testing features isn't the same as playing a game.

EDITED: I can fix this by providing a sensitivity extension that can disable the feature altogether. In fact I probably should. But may weight until there is demand. The less sensitive it is the more carefully you have to engage it. But if it's used for ladders or moving objects then it couldn't be disabled completely.
« Last Edit: February 28, 2020, 09:51:19 AM 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 #6 on: February 21, 2020, 12:10:39 PM »

Update

I've decided to turn this into a release that superceeds the earlier demo:

http://csv.swordofmoonlight.net/SomEx.dll/1.2.2.14.zip

I'm going to do a front page write up for this release in the next day or two. The main reason for the release is improved Xbox triggers but the movement system is improved a lot too.

It includes the wall-grab feature described here and a number of things I've worked on alongside it, but not ladders. This is a rush release. I really wanted  to have something to write about on the blog right now so it works out for me.

Something that came up was an idea to make it possible to duck/squat when running (while stopping) which I was thankfully able to get to work really well... better than I expected... and which improves the squatting effect a lot...

I don't want to say more since I'd rather save it for my write up.

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 #7 on: February 22, 2020, 03:05:21 PM »

There is now a release (http://www.swordofmoonlight.net/bbs2/index.php?topic=304.msg2799) sans ladder feature. I've reuploaded the file from the previous reply/post since I shared it yesterday.

Since transitioning to crawling (squat-walking) from running went so well I believe that it's (eventually) going to be possible to do that from a wall-hold also. It's a much further way down but not different from the running transition. There's going to be some similar options when reaching the top of a platform. Like (probably) tap to crawl over the top or hold to crouch there.

Because it's now possible to crouch/crawl in most of the standard scenarios it feels like they should be an option everywhere else.

Apart from more polish this should constitute all of the basic movement controls going forward. Crawling off ledges will be changed to prevent falling off of them. That will probably require hanging off of them, but could just be a controlled descent. That will be part of the ladder package.

It's possible to dangle on a platform by letting go of the d-pad or in theory if it's too thin to climb onto. It's not a priority. It would necessitate holding back on the d-pad to not grab the wall, but this is a pretty standard feature in games so it'd probably be for the best to add. I don't think it's necessary to navigate and I would prefer to see that kind of climbing implemented as ladders or free-form hand-hold surfaces, i.e. how Shadow Of The Colossus does it.

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 #8 on: June 21, 2020, 01:17:21 PM »

4mos later, today I worked on a new pseudo friction system that complements this feature very well. I think I'm going to have the shadow trail behind when generating friction so-to-speak to solve a problem that when you grab the corner of a wall and look out behind it the shadow tends to be poking out a little too far suggesting that your body is more revealed than peeking might suggest.

But this isn't actually what it's for, I've been meaning to do this for many years only because when you press up against something the clipping system wants to deflect you along its surface, so it can feel as if everything is greased up and you kind of slide out of control turning on a dime so you can't just stay still.

That just feels goofy, and it's the only reason for the new system. Its purpose is just to be as invisible as it can be while solving this problem. I did it today because I'm toying with a system that lets you "activate" some things like "barrels" by pressing against them while looking down beyond 45 degrees. Because you need to press up against the "object" it needed to be stable to be attractive, hence the new feature.

But it has other benefits, and you absolutely can notice it if you press hard against things and try to move along them. It helps to make the approach for doing the new wall-grab feature that is the subject of this topic/thread and while I was at it I made a tweak to try to prevent "grabbing" the wall if it looks like you're making a run for it. That makes it less sensitive to false positives than it already was.

The friction system I think might contribute to getting stuck on angles accidentally, but that was always possible. To solve that I think that the "objects" need more precise clip shapes, and if you were going to go further than this, you might add an "AI" layer to try to move intelligently around things so you don't get stuck, but I don't know if that's the best philosophy.

Originally SOM actually had a weird effect that was kind of like that, but I'm pretty sure it wasn't intentional. It was sometimes neat, but as often it just felt weird. How it worked was objects tended to have a kind of gravity. I'm pretty sure map geometry didn't have this effect. So you could technically walk over the edge of objects and you would scoot over, and then when you got to the end, you'd scoot back. It looked intelligent, but what was happening is for some reason SOM would break the clipping simulation down into 3 sections, regardless of the time step. I don't know why it did that, but clipping is pretty CPU intensive, so I disabled it a long time ago, and it just does one section per time step now. The only way that could be a problem is if the simulation were actually unstable, but that could only come about if you did something like set your walking speed to a super high speed, then you might actually need to break the simulation down. At that point you'd be moving like a jet plane unless you changed the scale of the map somehow.

I suppose it's possible someone noticed this funny effect and left the three stage system in place just to have it, but I'm skeptical of that because if so whatever was the cause of it should've been replicated in the map geometry part of the clipper.

Anyway, more details on this "friction" is how it works if you want to actually push against something and not slide then it's necessary to get pretty close to a right-angle with it, so that effectively you're not moving very much anyway, so the system is really just eliminating weird glitch like behavior. It should feel like you're doing it on purpose most of the time, but you can definitely sense something's changed if you play around with it. It won't stop you at any angle, but it does slow you down so you have a chance to fine tune the angle if holding still is what you want. If you want to lock in at any angle the wall-grab feature can do that via the action button.

EDITED: I just realized I've been wanting a way to lock you in while climbing to keep from sliding along the edge, and I think this is just the thing for that too! :xmas:
« Last Edit: June 21, 2020, 02:56:01 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 #9 on: October 11, 2020, 01:45:39 AM »

3/7mos later just when I thought nothing more could fit into the control scheme I'm poised to publish a new release with extensive addition to Action button based controls in the next day or so.

I just wanted to include a mention in this topic. I don't want to add it to the retired blog post. The short description of these new additions is all of the different modes have become interwoven so you can move in and out of them all at any point.

There's a new hop system that's just another way to jump, that only made sense after there were so many other ways to jump, it just made sense. To hop you just have to tap the direction and action button at the same time, but the catch is to tap the direction means it must be in a neutral position first, and you have to tap the action button more quickly than a normal tap. You have to press it as fast as a quick button press and not just anything shorter than the hold period.

I've also relaxed the regular jump timing so not to have to be exactly after the hold period, and the difference between these periods is really just counted in 10s of milliseconds, so it's pretty ambiguous, but maybe if you don't jump one way then you jump the other way.

The hop has to be this way so you don't do it when opening a door or picking up money. It's hard to describe but you naturally will press the button longer when bending over to pick up something off the ground or when waiting for a door to open. Plus if you're lazy the hop won't work. You don't generally aggressively pick stuff up open a door like that.

The dash->crouch/squat system described a few posts up now only works when going forward and backward, and I find this natural because you wouldn't want to crouch when circle-strafing and it doesn't make sense to crouch when walking sideways.

Now when releasing the action button in stealth mode the controls enter the squat mode. That means you don't have to crouch to do that anymore. This is like an extension of the stealth mode. I've enlarged the stealth section of the analog sticks. Moving sideways and backwards is technically stealth since the other modes are only for going forward since nobody runs or jogs sideways.

There is some complicated logic so if you're dashing at the full gait it won't enter the squat mode, and ideally if you're slowing down (i.e. releasing the stick) it won't either, but I find this depends a lot on having a well calibrated controller. My best one is still biased to one side. The Windows calibration system doesn't help it. So it seems to sometimes not reach the full gait on the left side and is inclined to squat accidentally on that side. I've worked a lot to make the system feel like magic.

Since you can't crouch/squat when moving sideways something needs to happen instead, but for now nothing happens when you pump the action button in that case. I'm not sure what it should do but I'd have to program an effect from scratch since it can't use any of the existing variables. I mention it to highlight how crazy it is to jam all of this stuff together and not collapse under its own weight. At that point it feels weird if moving the controller or pressing the button in a different way doesn't do anything.

I would say that it can go no further at this point, but I said that before, and was very wrong, so I won't say it again.

Oh, another big innovation is the walking speed now increases after dashing and swinging your weapon, and then it gradually slows down. This way when fighting monsters you will naturally have a heightened movement speed and and incentive to keep dashing to keep it up.

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 #10 on: October 11, 2020, 06:47:00 PM »

EDITED: Before bed last night it dawned on me what would be a good use of that new hole opened up in the control scheme.

I call it sliding:

I implemented it first thing in the morning after a shower. When circle-strafing you actually can't move very fast once you peak the dash. In my KF2 project it tops out at 9 km/h whereas running is 15 km/h and sprinting is 17 km/h. On a side note, yesterday I increased the speed when running slightly so that it's closer to sprinting, which is the dash speed you can set in SOM_SYS, i.e. max speed (although, for a long time I've had the default Ex.ini file override the SOM_SYS setting to encourage people to not play with this value.) For comparison walking forward is 6 km/h.

I've increased the speed and stride by a factor of 1.067 in my project. Like 1/15th. That doesn't sound like much but it's a noticeable difference. I did it because KF2 has a lot of spacious locales and I wanted it to move a little faster. The defaults are chosen because they're round numbers. They let the stride be 1. (My change is from 1.5 to 1.6 walking and from 4.5 to 4.8 dashing.)

Back to "sliding" how this new feature works is when dashing sideways you can pump the action button to slide. It pops the eye-level up about 66% and releases the slow-down effect on circle-strafing so it's kind of like another way to dodge when dashing. Note, I say "pump" instead of press only because in order to do this you're already pressing the action button, so you have to release it and press it again.

But it's more because it also lets the power gauge refill and keeps you dashing even after you let go (this is to prevent normal dashes from creating unpleasant interference) until the slide ends, so you can use this to your advantage too, like a sustained auto dash.

The refill is pegged at your strength level as is normal for SOM. I'm thinking about changing this behavior. I had to reproduce the refill formula in order to counteract it, so I'm now aware of the relevant code if I decided to change the behavior. There's a mystery factor which I guess is a function of the weapon's weight. I don't know if armor weight affects refill speed but I suspect not.

The refill is a little like how jogging refills, but there's no real downside to "sliding" ... it's just a way to move in for an attack when dash circle-strafing. You do have to be careful because you can't slide forward and the equivalent input there could make you squat or crouch depending on if you hold (holding has no benefit to sliding but it will return you to dashing after it finishes.)

Conceptually sliding is like when walking sideways/twisted you can slide your foot like almost a jump but not quite, or like taking a very long step pushing off with the back leg. Probably pretty standard swordplay stuff from movies.

EDITED: I've restricted running/jogging to about 45 degrees (or 90 rather) so that this slide maneuver can be done at up to a 45 degree angle and this makes it more clear when it can and can't be used.

EDITED: Writing this gave me the idea to enhance the player_character_stride extension to scale the walk/dash speeds in the next release. I was setting them all individually, but that seems much easier and it's not a constant value, so it can even be changed by events.
« Last Edit: October 12, 2020, 12:42:41 AM 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 #11 on: November 02, 2020, 04:25:39 PM »

Update: On "sliding" I modified it a few days ago to work better with turning while circling monsters.

I just realized it needed to turn faster to match the increased movement speed, so I made it turn faster in the middle, according to a cosine function. It was still unwieldy so I slowed it down in the middle the same way.

The result was just the first two things I tried, so pretty arbitrary, but when something just works that easily I like to think it was meant to be.

Part of the problem is I have the turning speed to slowdown to normal after the initial acceleration phase of dashing. I did that a long time ago just because running with a very loose/high turn speed is too unwieldy for regular navigation purposes. So really when it speeds up in the middle of "sliding" it's just restoring to normal, which also makes sense since the maneuver is like a return to the initial sprint/burst phase of dashing. The slowdown is relative too since it doesn't actually go slower (at least it doesn't feel like it) but it doesn't peak where it would if not for the slowdown. This kind of makes sense since it recovers your power bar so in the middle you need to drift a ways to recover that energy. It's during that middle phase that's ideal for striking before the power begins to drain again. You can also let go to exit to a walk.