XPL
XPL

Reputation: 25

UE4 Custom Dedicated Server (collision, hitboxes)

So I am currently developing a custom dedicated server in UE4 from scratch. I use RakNet as a networking engine and want to achieve the typical dedicated server that can manage adding players to the world, hitboxes, collision and verifying packets in general. What I mean by verifying here is e.g. if the server receives a movement packet it can decide whether the packet's sender can move there or not. I see the biggest trouble in verifying the e.g. movement packets and hitboxes because the server has to have access to the world and collision methods of unreal which I don't know how to do from scratch. Is it possible to get the base server from UE4 and equip it with your own networking engine and packet handling? Or is there a better way to achieve my goal?

Upvotes: 0

Views: 1827

Answers (1)

riperjack
riperjack

Reputation: 1

AFAIK there is no out of the box solution for that. You need something custom. I can think of 3 solutions:

  1. Just ignore collisions. Replicate what you get from clients, and that's it. Of course this is a cheap, low effort solution prone to hacking, but maybe it's sufficient for your case ?

  2. Write custom collision handling on your server. This is a lot of work. Server would need to know all the colliders positions, dimensions, etc. You could then use a physics library ( i.e. Bullet Physics ) to check collisions or write a custom collision checks.

  3. Compile UE4 as a dedicated server. You can find more info here: https://wiki.unrealengine.com/Dedicated_Server_Guide_(Windows_%26_Linux) Just use Raknet instead of a native UE4 networking.

PS. UE4 source code is over 2 milion lines of sophisticated C++ code so telling someone to "just download the source code and change anything you like" is not a viable advice.

PS.PS. I'm not sure if RakNet is a good choice at the present moment, this project was not updated since 5 years.

Upvotes: 0

Related Questions