Network platformer in UE4

When choosing what to do as my specialization I figured I wanted to try my hand at Unreal Engine.

 

It's widely used by several studios and I felt that having at least a basic understanding of how to use it would be beneficial for me.

 

I added on network functionality considering most games today have at least some form of networked feature.

Mechanics

I set out to set up a simple platformer with some basic mechanics like a dash, double jump and a wall jump, then focused on getting all of this to function well while networked.

 

I chose to write all of the code in C++, avoiding blueprints since I felt that in the long run if I work in Unreal that's going to be the most beneficial to me.

 

This in itself presented difficulties since a lof of examples, tutorials and information seemed to be geared towards blueprints and how to use them.

Network

Throughout the project I had to make some adaptions and changes to the various mechanics, one version of my dash stuck to the floor if you dodged into an edge, making you slip and slide all over the stage.

 

Having used Super smash bros as a basis which puts a lot of focus on movement tech I found this to be preferable. 


Once I started implementing the network feature I quickly discovered the way that I coded the dash did not play well over the network.

 

I had to send too much data every tick for it to function properly, causing lag and desync on the server side which in turn caused to client to teleport to the position the server thought it was actually supposed to be. In the end I had to simplify the dash to a more traditional one.

The biggest hurdle of the project was replicating the data correctly, as the client could not set the data it had to trigger a function that was to only be run on the server.

 

Keeping track of what could and could not be done locally could sometimes be unclear.


Thoughts

In the end I feel that I achieved what I set out to do, I'm a lot more comfortable using the framework of Unreal, with at least an intermediate understanding of how to use their network features.


Should I continue this project I would return my dash to it's previous state to try and understand what specifically made it behave it way it did and what workarounds I could use to get it working as I intended without the desync issues I had when playing over the network.