Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Movement
- - By Matthias [de] Date 2016-01-17 13:42 Edited 2016-01-17 13:51
As I mentioned in IRC lately, I'd really like to improve the movement of the clonk a bit, so that the word "nimble" is actually justified to describe it. For that goal, I thought it'd be sufficient to turn up the acceleration rates to "instant movement" to get a nice feeling where a button press has a clear ingame feedback, but I was wrong, mostly because I hadn't yet analysed the problem properly, so lets start there.

I don't play openclonk very often, so I'm not overly used to the control feel. I almost felt frustrated in recent games though! I noticed I was pressing down my keyboard buttons really hard, almost as if was controlling the clonk via a laggy TV remote with low batteries. What caused this?

Jumping is based on the current movement speed. This makes it really hard to do a backwards jump from a small ledge. I'd usually turn around first, that already starts moving the clonk one or two pixels to the new direction as its part of the "WALK"-procedure. Now in the four frames that the clonk accellerates to top speed I have the options of:
- Jumping to early. Clonk is still to slow, jump doesnt reach because it accelerates slower than walking, I fall down.
- Jumping too late. Clonk moves to far while turning around, slipping over some inexplicable edge of my small foothold, I fall down. This is especially troublesome since with the OC landscape, there is absolutely no telling what is "too far", the visuals don't tell me where I can still walk.
- Nailing the 2 frame window where I don't fall down yet and have enough speed to make a decent jump.
This actually happend quite often while I played.

Hangling has been critizised a lot by now. The forced step width in which you can move really doesnt mix well with an ever so dynamic landscape. It robs you of a whole lot of control over your movement, which can really be annoying because we have those moments where movement needs to be pixel perfect. In small corners you can also quickly start hangling unintentionally. Better hope you hadn't pressed another button then, because you might be moved more than a clonks width without being able to stop.

Scaling is maybe the biggest culprit here. When moving in the landscape, I feel like im scaling all the time, everywhere. I'm scaling more than moving at full speed actually! All it needs is a small bump and I stop running to scale over it.

Small cracks cause this as well. It is not even as big as your foot WALK OVER IT ALREADY! Argh!

To make this worse, scaling up things sometimes doesn't work. When you climb up a loam bridge, for example, theres a good chance that you slip right down again into a "jumping, but not jumping" state, stuck on a top corner. Button mashing time! With just a bit of luck you don't even fall over on the other side now.

Other parts of the landscape are in exactly such an angle that you wobble your way up, constantly switching between walking and climbing.

      (^- oppan gangnam style!)

So to sum these up: The problem is not really a "laggy" experience or delays but rather that the clonk switches to scaling, hangling or sliding down something ever so often without me being able to anticipate that. The problem seems to be with the vertices and the landscape rather than with the animations and movement speeds.
The screenshots I made already use the current master with the new shape maps, but as our landscape is fully destructible and reshapable its obvious this isn't per se a problem with shape maps.

I think this is rather important. In the beginning we agreed that the controls need to be a whole lot better than in CR, but as of now, I really feel like the clonk is less nimble and that I have less control over what is happening. There still are some things where we could just remove delays to make things more responsive (grabbing and releasing things!), but I felt that this was the bigger challenge for now.
Attachment: scaling1.PNG (10k)
Attachment: scaling2.PNG (7k)
Attachment: scaling3.PNG (20k)
Attachment: scaling4.PNG (10k)
Attachment: scaling5.PNG (38k)
Reply
Parent - By Armin [de] Date 2016-01-17 17:26 Edited 2016-01-17 17:33

>To make this worse, scaling up things sometimes doesn't work. When you climb up a loam bridge, for example, theres a good chance that you slip right down again into a "jumping, but not jumping" state, stuck on a top corner. Button mashing time! With just a bit of luck you don't even fall over on the other side now.


One obvious bug is in the upper loam picture which shows a perfect shark edge. In that case the scaling does never work when you climb up with [Up], if you press [Right], it will work. But this scaling-walking-switching mechanic had problems before that, too. I remember being able to fix the Clonk in an animation frame where he kissed the ground. Maybe the new corner scale bug was introduced when fixing an old one. Relevant: 1, 2 Edit: New bug entry.

The other loam bridge looks a bit weird. I think its atm impossible to make a perfect 45° loam bridge.

>Small' cracks cause this as well. It is not even as big as your foot WALK OVER IT ALREADY! Argh!


I haven't compared LandscapeDiff.bmps between CR and OC but I think it was always a must to scale in such cases. OC creates different grounds than CR. This or this in zoom factor 7 is annoying and the Rock landscape shape is imo not smooth enough for Clonks. Another point is the Decel (or Acel?) because they make it more annoying to get full speed while the CR Clonk got full speed directly. Maikel made this alot better though.
https://trello.com/c/3v7zZ0ue/129-texturformen-fuer-die-neuen-materialien
Parent - - By Zapper [de] Date 2016-01-17 17:53
Yes, all of those are issues. And mostly have been since 2009 (or even 1998?) or so...

Suggestions? I guess once thing we could try is to give the Clonk two bottom vertices, which is what a lot of other games do. Then small cracks wouldn't matter anymore AND you could jump off a ledge easier because you would fall down later. That also means that you could "fly" a bit, because your feet could be over the edge while you are still standing on it.
It would also need serious fiddling with the vertices and possibly engine to resolve issues with e.g. climbing.

PS: Another thing is that climbing could only start when you don't have contact with the ground anymore. That would let you walk on angled loam bridges/material without scaling. It would also mean that you could not scale up a wall by walking towards it.
Parent - By Matthias [de] Date 2016-01-17 18:42

>Suggestions?


I only had the idea of "more verticies" myself. Sounds worth a try.
Reply
Parent - - By Sven2 [us] Date 2016-01-17 18:58
I think if you have two or more bottom vertices, you can run into situations where the clonk gets impaled in the crotch and no longer slides to either side. And I'm not sure if keeping the middle bottom vertex helps. It would require some extra movement unstick logic.
Parent - - By Zapper [de] Date 2016-01-17 19:18
Yeah true....

Maybe allow for continuous vertices? aka collision lines instead of points? In the case of the Clonk it would be around 10 pixels to check (instead of 1).
Parent - By Marky [de] Date 2016-01-17 21:49
We already have an issue for that :) #1351. I don't know what to do first, these lines or the viewport stuff. Actually I was working on the classic project a little :p
Parent - - By Newton [de] Date 2016-01-17 19:34

> Scaling


Talking about solutions: What about if the clonk would only start climbing if either
1. he is jumping (against a wall) or
2. you press up while stating against a wall / something that must be climbed upon

This way, the clonk would not climb all over the place. A player would rather jump through a rocky terrain than trying to walk/climb/walk/climb over it. Just an idea, don't know it it would work out.

---

Technically, when does the clonk start to climb? IIRC it has one bottom vertex, one upper vertex, one on the left and on the right and additionally one vertex on each side between the lower one and the left/right one. What are the last mentioned vertices for anyway?
Parent - By Newton [de] Date 2016-01-17 19:48 Edited 2016-01-17 19:51
Okay, after looking at the game with vertices (Ctrl+F6 and Ctrl+F8²), a few suggestions for technical solutions:
* differentiate between when the clonk climbs and touches the wall with his leftmost/rightmost vertex and touching the wall only with the lowerleft/lowerright one. In the latter case, use a different animation, namely something alone the line of standing up from a kneeled position. That would take care of the gangnam problem - which I think is mostly an animation problem, i.e. that the player is confused what state the clonk is in right now
* move both the mentioned lowerleft/lowerright vertex and the leftmost/rightmost vertex up by 1-2 pixels; increase teh amount of pixels the WALK procedure would beam up the clonk by 1-2px. Reasons: Even with the previous suggestion, the animation will look odd sometimes because the clonk is seemingly grabbing the air; The clonk would then not climb on very small bumps

² gosh, why does it make the game that slow?
Parent - By Sven2 [us] Date 2016-01-17 20:54
I fixed some scale problems now by resetting to Walk when the clonk uses a number of items (e.g. the bow). So you may slide down a bit, but you can still fight in a melee, which is very useful.

I wanted to activate it for the grappler (so you can just shoot another hook while scaling a wall), but that caused problems :(
Parent - - By Clonkonaut [de] Date 2016-01-18 00:54
Here's a little bit of insight into the (scaling) problems:

This is the situation when scaling a loam wall:


In this situation, pressing 'Up' won't help. To fully scale the wall, it is necessary to have just a little bit of forward movement so the bottom vertex makes contact with the wall. But up just accelerates upwards. When the hip vertex loses contact with the wall, the clonk's position is adjusted so the next vertex (leg) touches the wall. I guess this is some engine magic happening. For the last vertex this simply fails.

The bad thing is, this behaviour does not seem to be consistent. Tale this situation:


I got into it by stopping at the right moment (just when the leg vertex cleared the edge). If pressing right continuously, nothing is wrong. But stopping at this point gets you into a bad position. The clonk is still walking but pressing forward does not move it that way. In this case, pressing up is the key.

Maybe we should apply a force diagonally upwards if either left/right or up is pressed during scale.
Reply
Parent - By Günther [de] Date 2016-01-18 02:03 Edited 2016-01-18 02:06
The engine magic is in C4Object::NoAttachAction, CornerScaleOkay and ObjectActionCornerScale. Replacing all that with script or a better algorithm is totally possible.

It's all a hack to distract from the fact that the vertices aren't moved. So instead the Clonk is made to kneel and moved up in the same frame, so that the torso doesn't seem to teleport, except that the real position totally teleports.
Reply
Up Topic Development / Developer's Corner / Movement

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill