Unreal Engine 4 C++ Multiplayer Survival Game

Unreal Engine 4 C++ multiplayer survival game sample project covering C++, AI and Networking for games in Unreal Engine 4.

Introduction

This series focuses on the C++ game development aspect of Unreal Engine 4. The goal is to introduce a variety of concepts written in C++. The project will help you to get you more comfortable using C++ for your own projects by using practical examples instead of relying on just theory. You may even use this project as a kickstart for your own project instead of having to start from scratch.

It’s important to note that this series is not a step-by-step tutorial. Instead each two weeks a new section is published, with all source and assets and associated documentation to explain concepts and the “why” behind some of the code. You can leave questions & feedback on the official forum thread.

Last updated for (See GitHub ReadMe)

PROJECT SOURCE DOWNLOAD (GitHub)

PROJECT DOCUMENTATION (Wiki)

Game Premise

“The game is a third person survival game focusing on familiar mechanics from games in this genre.

You’ll have to find a weapon to defend yourself. Food and ammunition are spread throughout the level and so you are constantly on the search for resources. Enemies may be anywhere, making too much noise while scavenging to survive will attract attention. The environment will have interactive objects to help your defense. The game will support coop play with a buddy. Survive as many days/nights as possible.

You will end up with a basic third person game, fully networked and a small environment with interactive objects that you may use as a base for your own survival game.”

Get Started!

You can download the latest project source at GitHub and get started with the project documentation right away!

At this time the project is at Section 4 of 6. Here is a brief overview of what has been added with each section:

Section 1 – Character Setup

section6_advancedanimbp03

Sets up the third-person character movement with animation, object interaction, simple hunger system, all with networking support. (view docs)

Section 2 – Weapons, Death & Inventory

section6_equipment03

Adds weapon support for the character, a flashlight, UT-style inventory with on-character visual representation of the carried items and deals with damage, death and respawns for players. (view docs)

Section 3 – Zombie AI

section6_zombieattacking01

AI “Zombie” enemy to our game using PawnSensing and Behavior Tree. (view docs)

Section 4 – Time of Day

section6_timeofday_combined

A dynamic time of day, advanced player spawning and a basic game loop. (view docs)

Section 5 – Networking

section6_coopoverview

Introduces the ability to carry around objects like barriers and introduces you to Unreal Engine 4 game networking. (view docs)

Section 6 – Polish & Review

section_openworldscenery01

The final section in the series focuses on bug fixing and a bit of polish to the existing features. This section is compatible with the 4.8 release. (view docs)

References

123 Comments

  1. Hi Tom and everyone else.

    I would like to know if it will be possible to add “procedural generator” to the terrain in this sample with C++ or even the BP?

  2. Hi again!

    I have long error message.

    The project could not be compiled. Would you like to open it in Visual Studio?

    Running D:/Unreal/UE_4.15/Engine/Binaries/DotNET/UnrealBuildTool.exe SurvivalGame Development Win64 -project=”D:/Unreal/TheWorld 4.15/SurvivalGame.uproject” -editorrecompile -progress -NoHotReloadFromIDE
    Performing full C++ include scan (building a new target)
    Creating makefile for SurvivalGame (no existing makefile)
    @progress push 5%
    Parsing headers for SurvivalGameEditor
    Running UnrealHeaderTool “D:\Unreal\TheWorld 4.15\SurvivalGame.uproject” “D:\Unreal\TheWorld 4.15\Intermediate\Build\Win64\SurvivalGameEditor\Development\SurvivalGameEditor.uhtmanifest” -LogCmds=”loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
    Reflection code generated for SurvivalGameEditor in 15,772302 seconds
    @progress pop
    Performing 7 actions (2 in parallel)
    [2/7] Resource ModuleVersionResource.rc.inl
    PCH.SurvivalGame.cpp
    [3/7] Resource SurvivalGame.rc
    SurvivalGame.generated.cpp
    Module.SurvivalGame.cpp
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public/World/SGameMode.h(44): warning C4263: ‘FString ASGameMode::InitNewPlayer(APlayerController *,const TSharedPtr &,const FString &,const FString &)’: member function does not override any base class virtual member function
    with
    [
    ObjectType=FUniqueNetId
    ]
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public/World/SGameMode.h(116): warning C4264: ‘FString AGameModeBase::InitNewPlayer(APlayerController *,const TSharedPtr &,const FString &,const FString &)’: no override available for virtual member function from base ‘AGameModeBase’; function is hidden
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(492): note: see declaration of ‘AGameModeBase::InitNewPlayer’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(19): note: see declaration of ‘AGameModeBase’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public/World/SGameMode.h(116): warning C4264: ‘FString AGameModeBase::InitNewPlayer(APlayerController *,const FUniqueNetIdRepl &,const FString &,const FString &)’: no override available for virtual member function from base ‘AGameModeBase’; function is hidden
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(489): note: see declaration of ‘AGameModeBase::InitNewPlayer’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(19): note: see declaration of ‘AGameModeBase’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public/Editor/SoundNodeLocalPlayer.h(28): error C2555: ‘USoundNodeLocalPlayer::GetInputPinName’: overriding virtual function return type differs and is not covariant from ‘USoundNode::GetInputPinName’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Sound/SoundNode.h(158): note: see declaration of ‘USoundNode::GetInputPinName’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\AI\SZombieCharacter.cpp(44): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\AI\SZombieCharacter.cpp(49): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\AI\SZombieCharacter.cpp(76): error C2664: ‘void TBaseDynamicMulticastDelegate::__Internal_AddDynamic(UserClass *,void (__cdecl ASZombieCharacter::* )(UPrimitiveComponent *,AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &),FName)’: cannot convert argument 2 from ‘void (__cdecl ASZombieCharacter::* )(AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &)’ to ‘void (__cdecl ASZombieCharacter::* )(UPrimitiveComponent *,AActor *,UPrimitiveComponent *,int32,bool,const FHitResult &)’
    with
    [
    UserClass=ASZombieCharacter
    ]
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\AI\SZombieCharacter.cpp(76): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\AI\SZombieCharacter.cpp(225): warning C4996: ‘UGameplayStatics::PlaySoundAttached’: PlaySoundAttached has been renamed SpawnSoundAttached Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Kismet/GameplayStatics.h(475): note: see declaration of ‘UGameplayStatics::PlaySoundAttached’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Components\SCarryObjectComponent.cpp(221): warning C4996: ‘AActor::AttachRootComponentTo’: Please use AttachToComponent. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(1125): note: see declaration of ‘AActor::AttachRootComponentTo’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Components\SCarryObjectComponent.cpp(239): warning C4996: ‘USceneComponent::DetachFromParent’: This function is deprecated, please use DetachFromComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(661): note: see declaration of ‘USceneComponent::DetachFromParent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public\Editor\SoundNodeLocalPlayer.h(28): error C2555: ‘USoundNodeLocalPlayer::GetInputPinName’: overriding virtual function return type differs and is not covariant from ‘USoundNode::GetInputPinName’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Sound/SoundNode.h(158): note: see declaration of ‘USoundNode::GetInputPinName’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp(13): error C2039: ‘AudioComponent’: is not a member of ‘FActiveSound’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Sound/SoundNode.h(22): note: see declaration of ‘FActiveSound’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp(13): error C2228: left of ‘.IsValid’ must have class/struct/union
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp(13): error C2227: left of ‘->GetOwner’ must point to class/struct/union/generic type
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SBombActor.cpp(13): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SBombActor.cpp(18): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SBombActor.cpp(23): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SFlashlight.cpp(18): warning C4996: ‘USceneComponent::AttachTo’: This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(614): note: see declaration of ‘USceneComponent::AttachTo’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SFlashlight.cpp(21): warning C4996: ‘USceneComponent::AttachTo’: This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(614): note: see declaration of ‘USceneComponent::AttachTo’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeapon.cpp(16): error C2039: ‘bChartDistanceFactor’: is not a member of ‘USkeletalMeshComponent’
    D:\Unreal\TheWorld 4.15\Intermediate\Build\Win64\UE4Editor\Inc\SurvivalGame\SWeapon.generated.h(10): note: see declaration of ‘USkeletalMeshComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeapon.cpp(117): warning C4996: ‘USceneComponent::AttachTo’: This function is deprecated, please use AttachToComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(614): note: see declaration of ‘USceneComponent::AttachTo’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeapon.cpp(124): warning C4996: ‘USceneComponent::DetachFromParent’: This function is deprecated, please use DetachFromComponent instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(661): note: see declaration of ‘USceneComponent::DetachFromParent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeapon.cpp(490): warning C4996: ‘UGameplayStatics::PlaySoundAttached’: PlaySoundAttached has been renamed SpawnSoundAttached Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Kismet/GameplayStatics.h(475): note: see declaration of ‘UGameplayStatics::PlaySoundAttached’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeaponInstant.cpp(259): warning C4996: ‘UWorld::SpawnActorDeferred’: This version of SpawnActorDeferred is deprecated. Please use the version that takes an FTransform and ESpawnActorCollisionHandlingMethod. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(2747): note: see declaration of ‘UWorld::SpawnActorDeferred’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Items\SWeaponPickup.cpp(30): error C2039: ‘bNoCollisionFail’: is not a member of ‘FActorSpawnParameters’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(454): note: see declaration of ‘FActorSpawnParameters’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public\World\SGameMode.h(44): warning C4263: ‘FString ASGameMode::InitNewPlayer(APlayerController *,const TSharedPtr &,const FString &,const FString &)’: member function does not override any base class virtual member function
    with
    [
    ObjectType=FUniqueNetId
    ]
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public\World\SGameMode.h(116): warning C4264: ‘FString AGameModeBase::InitNewPlayer(APlayerController *,const TSharedPtr &,const FString &,const FString &)’: no override available for virtual member function from base ‘AGameModeBase’; function is hidden
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(492): note: see declaration of ‘AGameModeBase::InitNewPlayer’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(19): note: see declaration of ‘AGameModeBase’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Public\World\SGameMode.h(116): warning C4264: ‘FString AGameModeBase::InitNewPlayer(APlayerController *,const FUniqueNetIdRepl &,const FString &,const FString &)’: no override available for virtual member function from base ‘AGameModeBase’; function is hidden
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(489): note: see declaration of ‘AGameModeBase::InitNewPlayer’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(19): note: see declaration of ‘AGameModeBase’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SBaseCharacter.cpp(101): error C2039: ‘GetMatchState’: is not a member of ‘AGameModeBase’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(19): note: see declaration of ‘AGameModeBase’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SBaseCharacter.cpp(242): warning C4996: ‘UGameplayStatics::PlaySoundAttached’: PlaySoundAttached has been renamed SpawnSoundAttached Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Kismet/GameplayStatics.h(475): note: see declaration of ‘UGameplayStatics::PlaySoundAttached’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SBaseCharacter.cpp(246): warning C4996: ‘UGameplayStatics::PlaySoundAttached’: PlaySoundAttached has been renamed SpawnSoundAttached Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Kismet/GameplayStatics.h(475): note: see declaration of ‘UGameplayStatics::PlaySoundAttached’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(38): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(41): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(44): error C2248: ‘USceneComponent::AttachParent’: cannot access private member declared in class ‘USceneComponent’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Components/SceneComponent.h(123): note: see declaration of ‘USceneComponent::AttachParent’
    D:\Unreal\UE_4.15\Engine\Intermediate\Build\Win64\UE4Editor\Inc\Engine\GameplayStatics.generated.h(24): note: see declaration of ‘USceneComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(130): warning C4458: declaration of ‘InputComponent’ hides class member
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(332): note: see declaration of ‘AActor::InputComponent’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(501): error C2039: ‘bNoCollisionFail’: is not a member of ‘FActorSpawnParameters’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(454): note: see declaration of ‘FActorSpawnParameters’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SCharacter.cpp(810): error C2039: ‘bNoCollisionFail’: is not a member of ‘FActorSpawnParameters’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(454): note: see declaration of ‘FActorSpawnParameters’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SPlayerController.cpp(28): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(830): note: see declaration of ‘UWorld::GameState’
    d:\unreal\ue_4.15\engine\source\runtime\engine\public\AudioDevice.h(36): note: see declaration of ‘UWorld’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SPlayerController.cpp(91): warning C4458: declaration of ‘MyHUD’ hides class member
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/PlayerController.h(222): note: see declaration of ‘APlayerController::MyHUD’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SPlayerController.cpp(101): warning C4458: declaration of ‘MyHUD’ hides class member
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/PlayerController.h(222): note: see declaration of ‘APlayerController::MyHUD’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\Player\SPlayerState.cpp(41): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(830): note: see declaration of ‘UWorld::GameState’
    d:\unreal\ue_4.15\engine\source\runtime\engine\public\AudioDevice.h(36): note: see declaration of ‘UWorld’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(9): error C2011: ‘FLogCategoryLogGameMode’: ‘struct’ type redefinition
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(24): note: see declaration of ‘FLogCategoryLogGameMode’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2027: use of undefined type ‘FLogCategoryLogGameMode’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(24): note: see declaration of ‘FLogCategoryLogGameMode’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2065: ‘CompileTimeVerbosity’: undeclared identifier
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.IsSuppressed’ must have class/struct/union
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.GetCategoryName’ must have class/struct/union
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2665: ‘FMsg::Logf_Internal’: none of the 2 overloads could convert all the argument types
    d:\unreal\ue_4.15\engine\source\runtime\core\public\Logging/LogMacros.h(34): note: could be ‘void FMsg::Logf_Internal(const ANSICHAR *,int32,const FName &,ELogVerbosity::Type,const TCHAR *,T1)’
    with
    [
    T1=FVector *
    ]
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): note: while trying to match the argument list ‘(const char [76], int, ELogVerbosity::Type, const wchar_t [37], const TCHAR *, FVector *)’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SGameMode.cpp(100): warning C4456: declaration of ‘MyGameState’ hides previous local declaration
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SGameMode.cpp(85): note: see declaration of ‘MyGameState’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SGameMode.cpp(145): warning C4996: ‘AGameModeBase::InitNewPlayer’: InitNewPlayer with shared pointer is deprecated, switch to FUniqueNetIdRepl version instead Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(492): note: see declaration of ‘AGameModeBase::InitNewPlayer’
    D:\Unreal\TheWorld 4.15\Source\SurvivalGame\Private\World\SGameMode.cpp(284): error C2039: ‘bNoCollisionFail’: is not a member of ‘FActorSpawnParameters’
    D:\Unreal\UE_4.15\Engine\Source\Runtime\Engine\Classes\Engine/World.h(454): note: see declaration of ‘FActorSpawnParameters’
    ERROR: UBT ERROR: Failed to produce item: D:\Unreal\TheWorld 4.15\Binaries\Win64\UE4Editor-SurvivalGame.dll
    Total build time: 258,36 seconds (Local executor: 0,00 seconds)

    How i can fix this? UE4.8 -> UE4.15

    Thanks all! Bye!

    • The problem is with ASGameMode::InitNewPlayer( the signature of the function changed between 4.8 and 4.15, look at AGameModeBase.h to see what parameters are expected in your current version for InitNewPlayer.

Leave a comment on this post!

This site uses Akismet to reduce spam. Learn how your comment data is processed.