Download

Can you bypass replication by just using a Dedicated server?

Can you bypass replication by just using a Dedicated server? Instead of coding a server client and player client, could you just use a dedicated server? Would other clients be able to see animations, bullets, interactions?

Hey and welcome to the Forum (:

Simple answer: No.

Long answer: Dedicated Servers and so called “Listen Hosts” only differ in the fact, that the Listen Server is also a Client.
You need replication for both, but the Dedicated Server can be hosted as a standalone on some V-Server without any Client being connected.
The Listen-Server, on the other hand, is a Client himself. So the Client who’s playing is also hosting the Server. If this Client closes its game,
the Server will shut down. Dedicated Server also needs no UI (no player, no UI) and has not PlayerController that could be retrieved with
GetPlayerController0 on Server site.

But the main question about the Replication avoidance is simply NO. Both require the same kind of replication. Only the Listen-Server also needs
the Client aspect. In a Dedicated Server, you still need to take care of replication for Animations, Bullets, Interactions etc.

What types of things would you recommend that the listen server handles instead of the client? I know health is a good one, but I’m not sure going about showing weapon animations and etc.

Maybe you’re asking because you want to prototype an MP game w/o the distraction of rep mechanics?
If so, I’ve also wondered why there’s no auto-replicate-everything LAN mode for exactly this reason…

In UDK you could create a prototype using just a Listen-Server and a Client using one of the UT Game types…
At least for an FPS anyway, projectiles, weapons, vehicles, characters and anims all replicated by default…

This was mostly though because Kismet runs server-side, but there was a Clientside-only option too when needed.
So getting back to UE4, there is a lot of overlap. Does this same basic behavior apply using say BP, anyone know?

Afaik there is no “replicate everything” button. Also for FPS there is no basic replicated stuff. UE4 is not UDK after all
and is more focused on supporting multiple genres instead of focusing FPS.

Things that need replication are kinda easy to list for Games that use Dedicated Server which are NOT in reach (Your own Server farm):

Everything that the Client should not be able to access by himself.

I list what the Client could do if you don’t replicate the stuff and let the server check it:

  • Health (1000000 HP)
  • Ammo (Infinity Ammo)
  • Shooting a Weapon (Rapid fire)
  • Line Tracing for an actual “Damage” hit location (Only Headshots
  • Dealing Damage (Dealing 10000000 damage each shot)
  • Moving himself (Teleporting | Speedhack)
  • Inventory (Giving himself items)
  • Money (Giving himself money)
  • Booleans that control if the player is allowed to sprint/crouch/etc (Weird sprint crouching?!)
  • etc.

You always need to think that a Client might cheat. A good example on how to not do this is “The Division”.
They have a Trusted Client setup, where they don’t check if the Client is allowed to fire the weapon again.
So you can just create a small script to rapidly spam the mouse input.

For Games that use Dedicated Servers that players can actually host themselves (similar to Counter Strike etc).
You still want to do the same as above, since, maybe, you don’t want the Clients to easily cheat. Even though the
Server hosting Player itself could cheat, but if he does, his Server won’t be visited anyway.

For Listen Servers, i would say you only need to replicate what other Players need to see. For example Health or the crouching effect.
You can still replicate all the stuff that i listed and pretend the Listen Server Client will NOT cheat, but in fact, he could, since he’s the Server
after all.

I, for myself, always act like people would cheat. People would join the Listen Server (who wants to play normally and in peace) and start
ruining his game by cheating. So I always check that all the stuff that a player could abuse and cheat will be replicated.