logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) Ladder Trigger (Read 3406 times)
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #15 - Jan 11th, 2018 at 2:24pm
Print Post  
It seems, I've created a decently working (but not perfect) implementation that can be integrated in PlayerPawn, but I couldn't implement such a functionality within an independent mod without subclassing PlayerPawn (or its derived classes). The major difficulty with implementing a non-intrusive mod is a synchronization between server-side and client-side player moves. I have no any ideas how such a synchronization could be done, and I'm not going to continue any work on this (because there are more interesting things).

So, at this moment I can suggest the following steps. Firstly, we should test the modification in an online game in order to ensure it works well enough. That is, we need to organize a small meeting (I need at least one player who would help me with testing). Secondly, we should decide how to integrate new implementation in 227j.

The existing LadderTrigger does not work well in an online game due to lack of client-side prediction. When the client cannot predict when the player should start to climb and relies on the data about state changes from the server, this is can be observed as a perceivable lag even in LAN game and ping 17 ms. In order to resolve this issue, we need to make the trigger bNoDelete and RemoteRole == ROLE_AutonomousProxy. If we change default properties of LadderTrigger this way, this potentially may break existing ladders on custom maps if they are supposed to be played with custom PlayerPawns that override movement functions in a specific ways. The safest solution would be adding a new LadderTrigger-like class, but this approach implies making the code noticeably more complicated.

Another thing to consider is optimization of speculative move operations. My current implementation uses a lot of calls to Spawn every tick. The number of calls can be reduced by using the same approach as was suggested for real crouching - the same actor can be reused many times. On the other hand, speculative move operations can be implemented natively (in C++), in that case climbing won't need an aux actor at all.
  
Back to top
 
IP Logged
 
strategy-(DOG)-
Full Member
***
Offline


-(DOG)-clan | Oldunreal
member

Posts: 133
Location: Austria
Joined: Jul 30th, 2012
Gender: Male
Re: Ladder Trigger
Reply #16 - Jan 15th, 2018 at 7:26am
Print Post  
Masterkent wrote on Jan 11th, 2018 at 2:24pm:
That is, we need to organize a small meeting (I need at least one player who would help me with testing).


if you still need a player to test, let me know...
  
Back to top
WWWICQ  
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7763
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: Ladder Trigger
Reply #17 - Jan 16th, 2018 at 6:09am
Print Post  
Masterkent wrote on Jan 11th, 2018 at 2:24pm:
Another thing to consider is optimization of speculative move operations. My current implementation uses a lot of calls to Spawn every tick. The number of calls can be reduced by using the same approach as was suggested for real crouching - the same actor can be reused many times. On the other hand, speculative move operations can be implemented natively (in C++), in that case climbing won't need an aux actor at all.

Yes, I'll have a look into that. Sorry for delay, had to fight a freaking flu the last 2-3 weeks.
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #18 - Jan 20th, 2018 at 5:32pm
Print Post  
So far no any mappers or devs asked about testing this stuff. It looks like mappers are not interested in this feature, so let's concentrate on other features and issues then.

Here's the current implementation that can serve a proof of concept:
https://www.upload.ee/files/7913742/Climbing.u.html

Game type: Climbing.ClimbingCoop (for network game).

Available console commands:
    Cmd SavePos <Name> - associate the current player's location with name <Name>.
    Cmd SetPos <Name> - move to location named <Name>.
    Cmd GetPosList - print the list of available named locations on the current map.
    Cmd RemovePos <Name> - remove named location <Name>.
    Cmd SummonLadder [CR] [CH] - summon Engine.LadderTrigger with bHidden==false, CollisionRadius==[CR] and CollisionHeight==[CH].
    Cmd ViewNearest <ClassName> - view the nearest actor of type ClassName.
    Cmd GetVar <VariableName> - print the value of variable <VariableName> of the viewed actor.
    Cmd SetVar <VariableName> <NewValue> - set the value of variable <VariableName> of the viewed actor to <NewValue>.
    Cmd GetState - print the state name of the viewed actor.
    Cmd SetState <StateName> [StateLabel] - call GotoState(<StateName>, [StateLabel]) on the viewed actor.
    Cmd Remove - destroy the viewed actor.
    Cmd Map [URL] - same as "SwitchCoopLevel [URL]".

Note: all Engine.LadderTrigger actors are adjusted to have bAlwaysRelevant == true && RemoteRole == ROLE_AutonomousProxy.
  
Back to top
 
IP Logged
 
Kajgue
Global Moderator
Betatester
*****
Offline


Super-sexy-Kung-Fu-H
obo-sunva-bitch

Posts: 385
Location: Apophizal (T:S:B) Headquarters
Joined: Oct 17th, 2005
Gender: Male
Re: Ladder Trigger
Reply #19 - Jan 20th, 2018 at 8:48pm
Print Post  
I would be interested in this feature, wasn't sure if it was being included in 227 or not.

Might aswel check this out before we decide to make a more personalized ladder actor for our project, or if it could work as a better foundation.

Thanks Masterkent.

Edit: Is this only available as a gametype? For a moment I thought it was an actor that would work regardless of gametype.
  

AKA - ( T : S : B ) Ice-Lizard


Whistleblower Ted Gunderson
Back to top
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #20 - Jan 21st, 2018 at 9:10am
Print Post  
Kajgue wrote on Jan 20th, 2018 at 8:48pm:
Edit: Is this only available as a gametype?

Climbing.u is a sort of tech demo which is not supposed to be used as a mod on a regular basis. The game class Climbing.ClimbingCoop is used for convenience: it changes the existing LadderTrigger actors (by setting their RemoteRole to ROLE_AutonomousProxy and bAlwaysRelevant to true) so that they can work client-side and it makes sure that Climbing.ClimbingPlayer is used as the player class.

ClimbingPlayer is an indirect subclass of PlayerPawn, it implements climbing and transitions between states PlayerPawn.PlayerWalking and PlayerPawn.PlayerClimbing. I couldn't implement such things outside of PlayerPawn, hence the only thing I can offer at this moment is some code that can be integrated into PlayerPawn after optimizing (I noticed that multiple calls to Spawn from movement functions tend to crash the client, so optimizations are required).

An interesting alternative could be adding a new state like PlayerPawn.PlayerModState which would delegate such functions as PlayerPawn.PlayerTick and PlayerPawn.ProcessMove to a custom actor. This would allow implementing an arbitrary player movement logic in mods without subclassing PlayerPawn.

Quote:
For a moment I thought it was an actor that would work regardless of gametype.

Technically, Climbing.ClimbingPlayer can be tested with any game class that supports arbitrary player classes. However, many popular "advanced" game classes (such as JCoopZ1.JCoopZGame) do not allow choosing an arbitrary player class.

Kajgue wrote on Jan 20th, 2018 at 8:48pm:
I would be interested in this feature

How about testing it online today?
  
Back to top
 
IP Logged
 
Krull0r
Global Moderator
Betatester
Developer Team
*****
Offline


227 Emitter Expert

Posts: 384
Location: Germany
Joined: Jul 1st, 2007
Gender: Male
Re: Ladder Trigger
Reply #21 - Jan 21st, 2018 at 10:00am
Print Post  
I like to test in multiplayer, tell me when and where Smiley
  

Back to top
 
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #22 - Jan 21st, 2018 at 10:06am
Print Post  
Climbing Test Server (it should be listed among Coop servers in the server browser), you can join right now.

Edited:
Thanks to Krull0r for testing, we discovered one network-related issue: the other player sometimes appears to be falling while actually climbing. There are also 3 things to tweak additionally: players should not be able to climb regular actors and climbing players should fall after taking a damage momentum that exceeds a reasonable threshold; when "unarmed" climbing is finished, the player should hold the same weapon as before.
« Last Edit: Jan 21st, 2018 at 12:29pm by Masterkent »  
Back to top
 
IP Logged
 
Kajgue
Global Moderator
Betatester
*****
Offline


Super-sexy-Kung-Fu-H
obo-sunva-bitch

Posts: 385
Location: Apophizal (T:S:B) Headquarters
Joined: Oct 17th, 2005
Gender: Male
Re: Ladder Trigger
Reply #23 - Jan 21st, 2018 at 3:39pm
Print Post  
Has testing finished? I would be available to participate now if the server is still running.
  

AKA - ( T : S : B ) Ice-Lizard


Whistleblower Ted Gunderson
Back to top
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #24 - Jan 22nd, 2018 at 2:59pm
Print Post  
Update: https://www.upload.ee/files/7922022/Climbing.u.html

Changes:
- Players can climb only level Brushes and bWorldGeometry actors.
- Climbing can be ended by calls to AddVelocity (which can be invoked by TakeDamage).
- Fixed the issue with client-side weapon switching.

I have no idea how to resolve the visual issue when other players appear to be falling. In Unreal, client-side prediction works in a weird manner. The server does not replicate Physics of other Pawns to clients - it's always PHYS_None there. It looks like clients rely on the value of bCanFly when determining whether the Pawn is flying or falling. Since PlayerPawns typically have bCanFly == false, clients assume that other players should fall.
  
Back to top
 
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #25 - Jun 3rd, 2018 at 2:03pm
Print Post  
So, the bad news is that 227 ladders probably won't be fixed in 227j, because I didn't find a solution which I could consider as good enough for inclusion in the game patch.

The good news is that the recently added customizable PlayerPawn state makes it easy to implement similar functionality within a mod that can be tweaked at any moment (therefore, any issues in such ladders can be resolved much faster than if you had to wait for a new release of Unreal 227 after 227j is done), and I already created a mod that lets you specify climbing areas within a map.
  
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7763
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: Ladder Trigger
Reply #26 - Jun 4th, 2018 at 6:55am
Print Post  
Masterkent wrote on Jun 3rd, 2018 at 2:03pm:
So, the bad news is that 227 ladders probably won't be fixed in 227j, because I didn't find a solution which I could consider as good enough for inclusion in the game patch.

If its due to me having problems right now to catch up with everything that is open, let me know if there is something here I can work on with higher priority.
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
Masterkent
Developer Team
Offline



Posts: 1116
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Re: Ladder Trigger
Reply #27 - Jun 4th, 2018 at 8:47pm
Print Post  
I think, even with natively supported speculative move operations my implementation wouldn't be good enough for inclusion in the patch. In particular, attaching to a surface may not be suitable in case if a mapper wants to let players climb a rope.

Smirftsch wrote on Jun 4th, 2018 at 6:55am:
let me know if there is something here I can work on with higher priority

It's a rarely needed thing and fixing it properly needs more than just modifying a few lines of code, so I think that it's not worth working on it right now.

And I'd suggest to return the signature and the implementation of function Engine.Actor.Move to its previous state:

Code
Select All
native(266) final function bool Move( vector Delta ); 


That new second parameter bTest is needless, I can't do anything useful with it.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo