Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Permeable solidmasks
1 2 Previous Next
- - By Maikel Date 2015-09-01 01:52
Have been introduced here, which is very cool!

I have some questions/comments:

* Why do we need to define a new material for that?

* The documentation seems to be missing?

* Does it only work for objects, or can we also make materials using this?

* I would also suggest to have the directions up-down, left-right and right-left.
Parent - By Maikel Date 2015-09-02 14:01
Also I think it would be good to have a simple testing scenario for this.
Parent - - By Maikel Date 2015-09-02 14:12
JCeasar the ropebridge is broken by this commit as it seems.
Parent - By Caesar [jp] Date 2015-09-12 06:40
Should be fixed with 2b004e63
Parent - By Marky [de] Date 2015-09-12 09:12
Cool stuff!
Parent - - By Caesar [jp] Date 2015-09-13 01:58

> * Why do we need to define a new material for that?


I want to be able to have both functionalities on the same map. And when checking a collision, there is only landscape and the colliding objects vertices, but no way (well, no direct way) to figure out which object the impacted solid mask belongs to.

> * The documentation seems to be missing?


Todo. Short doc in case you want to play with it:
CNAT_CollideHalfVehicle on a vertex.
SetHalfVehicleSolidMask(true) on an object with a solid mask.
HalfVehicleFadeJump() on a Clonk or object that stands on the solid mask and should fall through.

> * Does it only work for objects, or can we also make materials using this?


It is not unthinkable to make this work for materials, but it is not done.

> * I would also suggest to have the directions up-down, left-right and right-left.


Possible. Do you need this somewhere?
Parent - - By Maikel Date 2015-09-13 07:51

>Possible. Do you need this somewhere?


No but I did not need the down-up direction either, just for completeness.
Parent - By Caesar [jp] Date 2015-09-13 13:27
It needs either more CNATs or more materials. And I don't see for what (yet). Gravity goes down in most situations after all. ;)
Parent - - By Marky [de] Date 2015-09-19 19:07

> * I would also suggest to have the directions up-down, left-right and right-left.
>Possible. Do you need this somewhere?


At least I want to use this in one of my scenarios, it would be very useful.
Parent - - By Caesar [de] Date 2015-09-21 17:03
There's two ways of implementing it. (And I'm kind of reluctant to do so for a single scenario. I was kind of reluctant to do so for something that the milestone wanted, but eh.)
Do you want to describe the usecase a bit more?
Parent - - By Marky [de] Date 2015-09-21 19:21
I want to jump through a platform from below, then land on it (direction would be down-up then). I was surprised that you implemented the other direction first, what is the use case for that?
Parent - - By Caesar [de] Date 2015-09-21 19:33
Exactly what you want is implemented.
Parent - - By Marky [de] Date 2015-09-21 19:50
I thought your implementation lets you fall through from above
Parent - By Caesar [de] Date 2015-09-21 20:41
In case you remove the flag from the vertex.
Parent - - By Sven2 [us] Date 2015-09-21 18:02
If you just want to block movement through certain directions - say, e.g., a door which you can only pass in one direction - you can also just run a timer script that stops objects from moving in the forbidden direction.
Parent - - By Caesar [de] Date 2015-09-21 19:33
Yes, you can do everything in script. But especially 1-frame timers are not so nice.
Parent - By Sven2 [us] Date 2015-09-21 19:55
It doesn't have to be every frame.

Also, if you have to change the engine and add extra checks to every vertex of every movable objects on every frame, the 1-frame timer is actually more efficient.
- - By Armin [de] Date 2015-09-21 18:18
I think the elevator can be a good place to use such a solidmask.
Parent - - By Caesar [de] Date 2015-09-21 19:33
Good point. No "stuck below the elevator that automaticall came" anymore. Objections?

(The only thing is that with the current implementation, normal objects would just fall through.)
Parent - - By Sven2 [us] Date 2015-09-21 19:51

> (The only thing is that with the current implementation, normal objects would just fall through.)


Wait, what? I thought you fall through on request only?
Parent - - By Caesar [de] Date 2015-09-21 20:42
I really have to document this. The material is entirely ignored unless a special vertex flag is set.
Parent - - By Sven2 [us] Date 2015-09-21 21:48
But I thought the whole point of this material was so you can have bridges so you can e.g. push your lorry over the entrance tunnel to your mine? Or make stuff like platforms and elevator cases more usable?

What is the use case of a platform that works only for clonks?
Parent - By Caesar Date 2015-10-22 13:42
Flipped the behaviour.
Parent - - By Zapper [de] Date 2015-09-21 21:46

>(The only thing is that with the current implementation, normal objects would just fall through.)


Yeah, no, then it's not useable
Parent - By Caesar [de] Date 2015-09-21 21:51
Guise…

It's a simple thing to change, but uh, explaining and understanding is /very/ hard.
- - By ala [de] Date 2015-11-08 13:42
Alright, need your brains here:

So currently, the permeable solidmasks can be passed from below only - but they will soon work from above as well, if the player wishes to do that.

Now - what do you think is the best way to control that?

So we thought of just picking down - which seems to be free, but since the mechanism should also work with vehicles it gets tricky once you control an elevator or a blimp.
An extra button (like x) will probably not be that great on gamepad.

Old Nintendo games almost exclusively use the combination of down and jump, to pass through such a solidmask. Also starbound uses it.
The difference is that those games have a jump button, not just "up". Maybe pressing s and w combined is a bit of a hassle?

What do you think?
Parent - - By Caesar [de] Date 2015-11-10 23:30
S+W is not a good idea… I'm thinking only S might be good, but then we'd have to allow rolling only while walking and passing only while standing, or so…
The current state is that you press X and will pass all permeables until you release it, after which you'll only pass the current one.

Also to think about: Down-button might do something special if you grab a vehicle. So if we want to keep the option of being able to take those with you, that's a thing to keep in mind.
Parent - - By ala [de] Date 2015-11-10 23:58
Another thing that was mentioned, is that the down button is currently used to collect items. Although this was just the old way of collecting, maybe this can be dropped now that shift has been introduced?

>Also to think about: Down-button might do something special if you grab a vehicle.


Yeah, most likely this is for air and water vehicles, blimp and also a submarine - that currently doesn't exist though :). Theoretically you could control those with mouse, but than again imagine a gun attached to a submarine.. that would be fun, you could control the gun with the mouse - and the sub with wasd. We would loose those possibilities.

So for vehicles it's especially tricky - just pressing down might be too problematic: For example imagine the frustration of someone pressing down on a blimp and falling through it's basket :D.. that said - the xtra button does indeed sound like the best solution for now.

>The current state is that you press X and will pass all permeables until you release it, after which you'll only pass the current one.


Yeah! Sounds fun already :)
Parent - - By Pyrit Date 2015-11-11 02:05
Hmm, I don't really understand what's wrong with the down-button? If you are in a vehicle, e.g. a submarine and it is currently moving down, you would expect it to go down also through solid masks.
Same for the elevator-case-case (heh). You are driving down with the elevator and the elevator hits a woodbridge. If you are pressing down, it just goes through the woodbridge.

>Falling through the blimp's basket


Why would that happen? As long as your Clonk is controlling the blimp, down stands for "move the blimp down",  and not "pass through the solidmask". If the blimp hits a solidmask while moving down, it should pass through.

Hm, the case where that doesn't work would be if your blimp or elevator case is holding other objects, like a lorry or an additional clonk or just a rock. These objects would have to know wich solidmask is responsible for thier movement. If a rock is in a moving blimp, it would have to know it belongs to the blimp and therefore pass through everything the blimp is passing.
Parent - By ala [de] Date 2015-11-11 12:27
Oh, yes. You're absolutely right, I just had a mind block there. In that case vehicles are all fine.
Parent - - By Clonkonaut [de] Date 2015-11-11 13:23
You should definitely never fall through a vehicle you're holding on to. However, this might turn out to be problematic.

First of all, we should agree which solidmasks are permeable after all. Do you want to fall through a castle floor? Do you want to allow this? Subsequently we have to ask ourselves if the blimp or the elevator case are solidmasks you'd want to fall through.
I don't see how this advantageous in case of the blimp. But I can see many people accidentally dying because if that.

The elevator case might be an object where you'd want to fall through. But it gets very tricky if the case itself should pass through solidmask (like bridge elements). Scriptwise you'd have to set the 'fall through' flag for the case and for the clonks on top (and probably every object lying on the case). But then there's no distinction between the case's solidmask and the bridge's and everything would fall through the case as well.
I don't think we can have elevator cases pass through solidmasks.
Reply
Parent - - By ala [de] Date 2015-11-11 13:56
Mainly I see a logic problem for the player: Some solid masks can be passed through - and others can't, how to tell?

My intention was actually to use this solid mask for a ton of objects: Bridge segment, castle floor, the moving stone segments, elevator, sailing boot, guard towers - and yes acutally also the blimp: The controller of the blimp would not fall through, since he is controlling the blimp, so only the clonks that ride with him would be affected. Actually they shouldn't move around too much on a blimp, so I guess it would be ok.

>But then there's no distinction between the case's solidmask and the bridge's and everything would fall through the case as well.


So this is a technical barrier? - if that's the case, obviously we could not have that - only if it would work correctly, say the elevator with his objects just passes through.
Parent - By Clonkonaut [de] Date 2015-11-11 14:16

> Mainly I see a logic problem for the player: Some solid masks can be passed through - and others can't, how to tell?


I don't see the logic problem after all. Playerwise, you don't know what a solid mask is. When playing clonk for the first time, no one would ever say 'I see, I am standing on top of the castle because of the solid mask' and afterwards ask why 'this solid mask behaves differently than another'.
Playerwise, everything is a platform. It could also be a small stripe of material. The distinction becomes clearer after you've learned how this is handled script-wise. My point is: Naturally, you don't see a connection between the platform of a blimp, a bridge element and a loam bridge except that those are 'platforms'. Now (or better: in the future), two of those are platforms that you can fall through. But you don't really know why (except when knowing that internally these are called 'solid masks' and are something different than material).
There is no obvious rule of thumb telling you that you can't drop through the loam bridge. There won't be an obvious rule when you can't pass through the blimp as well. You can't even say that you can always pass through the platforms of moving objects because a castle can't be called a 'moving object'.
You can't pass through 10 pixels of rock but you can pass through a moving, floating stone bar? You can't pass through 10 pixels of 'bricks' (internally: the brick material) but you can pass through a castle floor?

I see a problem with logic, regardless whether it is combining the 'can pass through' behaviour with the internal definition of a 'solid mask' that a new player has zero chance of finding out or it is just a bunch of objects we define to be passable. You have to tell this in another way.

Other games usually do this by just having a certain set of graphical elements that define such a platform. By assigning this behaviour to rock platforms, blimp baskets, castle floors, bridges and what else, we present no sane method of deduction to the player.
Reply
Parent - - By Pyrit Date 2015-11-11 14:03

>But then there's no distinction between the case's solidmask and the bridge's and everything would fall through the case as well.


Oh yes, I see. It would be necessary to store multiple solidmasks at the same location if they overlap, and also know wich solidmask belongs to wich object.
Parent - By Clonkonaut [de] Date 2015-11-11 14:23
The way Caesar implemented the permeable solid masks would not allow for this distinction anyway. Right now, you can't say 'fall through the solid mask of object x' but 'fall through permeable solid masks until you don't overlap with a solid mask anymore'.
So, yes, it would require some more work. Even more complicated.
Reply
Parent - - By Caesar [de] Date 2015-11-12 10:58 Edited 2015-11-12 11:01

>First of all, we should agree which solidmasks are permeable after all. Do you want to fall through a castle floor?


I would argue against castle floors. But we could replace the tower entrance/exit passages by two permeable solidmasks. (This has tricky implications for the path-finder, but so do the solidmasks in general.) (Also, we may want callbacks when something touches a solidmask.)
Parent - - By Sven2 [us] Date 2015-11-12 15:55
I don't see a problem with the current "door opens as you approach". It's interesting for meles because you have the tactic of following your enemy directly to slip into the enemy base if you're fast enough. Having doors that only allies can pass with a 100% success rate seems pretty cheap to me.
Parent - By Caesar Date 2015-11-12 15:57
I was more thinking of CR castle towers where you can go upwards. On the going-through thing I agree, but I loved in CR how it required teamwork to get someone back into the castle.
Parent - - By Clonkonaut [de] Date 2015-11-12 16:58
Why would this only be passable by allies?
Reply
Parent - - By Sven2 [us] Date 2015-11-12 17:20
Why else would you want a permeable SolidMask in a tower? If anything goes through, you can as well keep the door open.
Parent - - By Clonkonaut Date 2015-11-12 17:49
If you do not use permeable solidmasks, you'd need to do something like in CR (staircase thingies). And there, it wasn't a particular problem that enemies also could use those.
Reply
Parent - - By Sven2 [us] Date 2015-11-12 19:43
Oh you're talking about going up. I thought you meant the side doors. Yes, for tower platforms it makes sense.

Although for castles, I also find it OK if they're closed and you need stairs. It's supposed to be a sturdier structure after all.
Parent - By Clonkonaut Date 2015-11-12 20:10
Yeah, I think Caesar meant up/down. Force field doors wouldn't good, yes.
Reply
Parent - - By Clonkonaut [de] Date 2015-11-11 10:10

> I'm thinking only S might be good, but then we'd have to allow rolling only while walking and passing only while standing, or so…


Or we just delete the roll. Currently, there is absolutely no advantage in rolling. Zero. It just forces your clonk to move x pixels left or right without any chance of stopping it, potentially ending up in a lava pit or similar.

In addition, this is worst possible control scheme I can imagine:

Down + Direction = Roll
Down = Pass through

This will most certainly lead to misfired rolls because you didn't release the directional key fast enough. Walking left/right and passing through a solidmask is also something players might just want to do.
Reply
Parent - By Armin [de] Date 2015-11-11 13:18
I agree. Imo the whole roll mechanism feels a bit out of place.

Also, I'm not happy with the idea of letting the Clonk crawl or roll through small holes. The swim vertices changes are still able to cause stucks and the Clonk is already insanely mobile. He doesn't need more buffs.

(I write a bugtracker entry about the Clonk's water vertices bug.)
Parent - - By ala [de] Date 2015-11-11 13:44
We could put roll on x for now, if the pass through gets on s.
The problem with the role most often is that it is used by accident. On x this should not happen so easily, and it can still be used in melees to doge arrows. We can still delete it later.
Parent - By Clonkonaut [de] Date 2015-11-11 13:50

> and it can still be used in melees to doge arrows


But it can't. As I said, the roll does nothing. It might give you the impression of doing something but it doesn't. There no change in shape or similar that would allow dodging things.
Right now it's just something that might get you killed because you can't control the clonk when its rolling.
Reply
Parent - - By Zapper [de] Date 2015-11-11 13:55
My two cents, too:

* I am completely against arbitrary ambiguous controls - we must not end up like in CR where you have to hit left-left-down-throw but NOT be in front of a tree at the same time
* Thus, the roll can not stay as it is now. It has the possibility of screwing you up when you don't want to be screwed up.

The roll
-------
The roll actually has ONE use: continuing to move after falling down a great height (the kneel-down actually lead to a bug report previously).
However, to preserve that we do not need to mess with everything else. That means that the roll can still start when falling and pressing left/right (as it was for some time) but then immediately STOP if you let go of the direction key. Rolling would then just be an alternative animation to walking.

Falling through
--------------
Falling through can NOT be triggered by a movement key alone or by a combination of movement keys alone. We will have the situation that you are standing with a lorry on an elevator and want to:
        1. go down with the elevator while grabbing the lorry
        2. same as 1. + moving the lorry left/right (while possibly still holding [down])
        3. fall through the elevator with the lorry

I'd say we add an extra key for crouching (e.g. C or X). Holding C will send your Clonk into a crouch animation (we already have that for e.g. the shield).
C+Down can fall through solid masks.
C+Left/Right can trigger the roll if we want it.
C alone might reduce your hitbox or whatever.
Parent - - By Pyrit Date 2015-11-11 14:15

>Falling through


The problem here is the way you control the elevator.  You are holding the lorry and you control the elevator 'through' the lorry. The lorry's commands get forarded to the elevator case.
What about this: While you are holding the lorry, you control only the lorry, not the elevator. If you want to go through the case, you just press down. This will send you and the lorry you are grabbing through the elevator case.
If you want to travel down with the elevator case, you must let go of the lorry and grab the elevator case. I don't see the problem.
Parent - - By Zapper [de] Date 2015-11-11 14:27
The problem is that it would be extremely unintuitive and error-prone. Go watch some Let's Plays and see what random new players do already with the current controls..

I am really very much against double or triple assignment of direction keys. This is not CR where we only have 6 keys.
Up Topic Development / Developer's Corner / Permeable solidmasks
1 2 Previous Next

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill