top of page

Networked Wall Run and Ledge Getup in UE4

On-and-off for the past 2 months, I've been working to fully learn the UE4 C++ workflow for implementing networked movement code. This is a pretty difficult topic and one with few resources to learn from, so I spent a lot of time experimenting with different approaches. Many times I'd get something that appeared to work but would run into issues with factors such as network lag, variable frame rate, or struggling with player inputs and getting desynchronized. I think I've finally figured it all out though!


I started by implementing sprinting. This is something that has been covered in a few tutorials online, but so tried them all and eventually was able to create my own variant of them that suits my criteria. I've documented the code outline in another blog post, but you might also want to check out this article by DarthCoder if you are just getting started: https://wiki.unrealengine.com/Authoritative_Networked_Character_Movement


Next was the ledge getup. When the player inputs towards a ledge while in the air, the character should grab the ledge and pull itself up. Pretty simple, right? Just detect the ledge and play a root animation? Unfortunately, while this basic logic is mostly sound, making it work for a multiplayer game was much harder. I first implemented this for a single-player prototype, so I was able to pull most of that gameplay logic, but over the course of a bunch of implementation iterations, I was able to refit it into an organized networked code outline. See my other article for this outline.


Next was wall running. Surely this would be the hardest -- unlike the ledge getup, which doesn't allow player input during its duration, wall running requires support for real-time physics and player input. Luckily, I was able to reuse the outline from ledge getups for this new movement type, and I was shocked when the wall run worked with the networking as soon as I got all the gameplay code done. Since I had covered all the cases for fixing stutter, desynchronization, etc. with the ledge getup, and I also opted to use a new physics state for the getup, wall running was structurally similar. The only complexity that input added was changing movement-related variables that were easily handled in PhysWallRun.


Here's a video of it in action. Wall Running might not look like much since I haven't yet added animations in or tuned it for better game feel, but it is functionally complete. I'll update this when it is more polished!



Recent Posts

See All
bottom of page