Skip to content

Multiplayer Series UE4 [2] – Deathmatch

Location And Team based Spawns

Now you can spread CustomPlayerStart actors in your level and test it. Now you should have a functional Spawn Queue.

You’ll need 3 different Spawn Groups.

  • Lobby
  • Join Spawn
  • Respawn Spawn
Lobby point. This is where player’s can spectate the area.

Main first spawn point for Characters.

Demo

The Things We Did Wrong

  • We didn’t use Gamestate.
  • We didn’t use Playerstate.

There is some really cool stuff in Gamestate and Playerstate, like getting the ping, player name management. They both survive Server Travel, only when the client gets disconnected Playerstate is destroyed as well Playercontroller and Pawn for that Player.

Playerstate is where player info should be stored. Playerstate exists in server, other clients and in players client. So whatever you put in there it will be visible to everyone.

Gamestate is kinda the same thing. Gamestate should hold values that the server needs to know and needs to replicate to everyone. The static Server Player Class we created should actually be in Gamestate Class.

If we stored Server Player’s info in Gamestate we wouldn’t need to restart Player Controller’s during server travel (server travel means map change).

Part 3 – Character

Pages: 1 2 3 4 5
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

[…] Part 2 – Deathmatch Gamemode […]

Level Paradox
1
0
Would love your thoughts, please comment.x
()
x