Unreal Engine C++ Survival Sample Game

Reading Time: 6 minutes

The project source contains a variety of survival game features and coding concepts in Unreal Engine C++ using practical examples including AI and multiplayer support. There is no step-by-step guide for the project. Instead, the documentation walks you through the available source code.

unreal engine C++ survival game hero banner
Landscape Map part of the C++ Project.

Game Premise

This project originally started as a bi-weekly series for Epic Games. Now it serves as a hub for C++ how-to’s or even as your starting project for your (survival) shooter.

“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.

Project Features

Weapons & Equipment

survival game C++ tutorial section 2 banner

Players spawn with an assault rifle and a flashlight. These weapons can be carried on the character’s back (rifle) and pelvis (flashlight) using Sockets. One of the more advanced features included is the custom AnimNotify that calls for the exact moment during the animation we must switch the mesh from being in the character’s hands to his back or pelvis. Any time you specify an AnimNotify in your animations you can implement this event in the EventGraph of the AnimationBlueprint for that character.

Advanced Animation Blueprint

unreal engine c++ section 1 banner

The project includes an advanced animation blueprint setup for the player character. It includes sprinting, crouching, aiming down sights, weapon fire recoil, etc. along with a special “Idle Break” animation that is played whenever a player is idle for a small period of time. On top of that AnimMontages are used to blend weapon reloading and equipping.

The animations are from the Animation Starter Pack, freely available on the Unreal Engine marketplace.

Zombie AI

ue4 survival game c++ zombies

Enemy AI wanders around the area during the night and moves towards noises made by the player. The AI is able to sense gunshots and footsteps and will attack the player on sight in a furious sprint.

The zombie has audio responses for many of the events including when sensing a player, idling, wandering, chasing, getting hit, dying, attacking, etc. These audio files were kindly provided by @YorickCoster and can be used in your own projects too!

Object Interaction

Some of the objects in the world can be interacted with (Hotkey “E”) These include the assault rifle, flashlight, cupcake, and bomb.

Consuming food restores hitpoints and energy while interacting with the bomb sets the fuze. Weapons can be added to the inventory.

Moving Objects

Using the middle-mouse button, any physically simulated object can be picked up and moved around. Examples include the red barrier and the bomb actor. you can rotate the carried objects using the scroll-wheel and the 1 & 2 numeric keys. Left-clicking while carrying an object will throw it in the view direction. This is a neat trick to throw fuzed bombs are your enemy, or to throw food/equipment to your co-op buddy.

Co-op Multiplayer

The gamemode features an accelerated day/night cycle, during the day players can collect items, equipment and setup defenses for the night to come. For the duration of the night, zombies appear, any existing zombies become active and start moving around the map. Keep an eye out for your energy levels as low energy will hurt your health. If a player dies during the night, he will respawn at sunset as long as there is at least one other player still alive.

Players score points as they survive the night and by killing zombies. The game continues for as long as there is at least one player alive.

unreal engine C++ multiplayer example

Get Started with C++

It might not be recommended to immediately dive into this sample game if you have no prior C++ experience. However, the project is a great way to browse and analyze how C++ games are made. There are six sections linked below with some basic documentation to navigate you through the code.

If you are looking for a more step-by-step guide to learning C++ and Unreal Engine then I recommend checking out my full Unreal Engine C++ Pro Course. The course takes you from the basics of setting up your third-person character all the way to building an ability system, creating AI opponents, performance profiling, multiplayer support, and a ton more!

If you are completely new to Unreal Engine I recommend you first get yourself comfortable with the editor. Have a look at the official Getting Started page to get you up to speed. Use this collection of Unreal Engine Tutorials for a variety of tutorials and places to learn. I written have a collection of C++ Tutorials myself over the years that you can access freely.

And finally, to understand the core classes we use such as Actors, PlayerControllers, and Pawns. I recommend reading up on them in my Gameplay Framework guide.

Download the latest project source at GitHub!

Below you can find documentation for each of the sections created at the time of release.

Project Documentation

The project was developed in distinct sections along with some guiding documentation.

Section 1 – Character Setup

Third-person character movement with animation, object interaction, simple hunger system, all with multiplayer support. (view docs)

Section 2 – Weapons, Death & Inventory

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

Section 3 – Zombie AI

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

Section 4 – Time of Day

Dynamic time of day, advanced player spawning, and a basic game loop. (view docs wiki mirror)

Section 5 – Networking

Introduces the ability to carry around objects like barriers and introduces you to Unreal Engine multiplayer programming called ‘Replication’. (view docs wiki mirror)

Taking this project beyond

This series was built primarily as a C++ learning resource. I hope you’ve learned a lot from the previous sections in this series and put that knowledge to use for your own project! If you wish to use this project as a base for your own game, you can!

SpatialOS (Large Scale Multiplayer)

In collaboration with Improbable, I was able to add support for SpatialOS, their large-scale multiplayer solution. The project has a special branch on GitHub named SpatialOS-main with these changes included. Along with the code changes I published 3 additional tutorial videos guiding you through these steps and explaining how you can add SpatialOS to your Unreal Engine project yourself.

Getting Started with SpatialOS

I will be walking you through the steps to get your own project up and running with SpatialOS! After converting the project in this first part we will continue by adding some interesting features for large-scale multiplayer and check out SpatialOS’ online debugging tools.

In case you’re unfamiliar, SpatialOS is a game hosting platform that allows developers to scale multiplayer games beyond normal limits.

To kick things off we start by installing SpatialOS’ Unreal GDK and run a ‘local deployment‘ using the sample project provided by Improbable.

Sign-up here! http://bit.ly/2ZrkF2Q
UnrealGDK Documentation: http://bit.ly/30FUoyY

Upgrading Project to SpatialOS

In part two of this tutorial series for SpatialOS and Unreal Engine, we convert the project to run on SpatialOS servers and run our first ‘cloud deployment’ with two players.

Porting guide: http://bit.ly/2lZWquF
Cloud deployment workflow: http://bit.ly/2keYgat
SurvivalGame on GitHub: http://bit.ly/2khAgUc
Get SpatialOS: http://bit.ly/2lXYKCi

Offloading AI to dedicated server in SpatialOS

We’re ready to offload our zombie AI to a dedicated server-worker! Follow along in part three where I show you just how easy it is to offload in SpatialOS.

Offloading setup: http://bit.ly/2mRVUiA

Sign Up for Unreal Engine Content

Receive the latest tutorials, tricks, hidden gems and more exclusive content!



174 Responses

  1. Hi there, I am not new to the engine or to C++ projects, but I am having an issue. I am unable to open the project in any way. Not from the project launcher or from VS2019. It won’t let me rebuild in code. It says I need the .net sdk, but it is definitely installed. Any ideas what it may be?

  2. I’m trying to figure out how to use C++ to trigger animation. You mentioned this project in the C++ mastery course on udemy. So I went though your code and I thought I had it figured out but when I press the reload button my character disappears so i’m missing something. I was going to look through your documentation to see if I can find it but your view docs links are all pointed to bad links. The ones I’m currently interested in are the Character one and the weapon one.

  3. Hey Tom, thanks for updating the project to 4.26.
    I’ve tried compiling it from inside the engine and it still seems to crash. It usually takes 2 or 3 compiles before this starts happening. I believe Callen was having the same problem so I’m assuming it’s the same for everyone else.
    Would appreciate if you confirm, cheers!

  4. Hi Alexander,

    It seems the UE4 is throwing crashing when compiling in the engine due to a internal error.

    File: UObjecftArchetype.cpp

    Error: Unhandled exception thrown: read access violation.
    UClass::GetAuthoritativeClass[virtual](…) returned nullptr. On Line 131

    Odd thing is, I didn’t have this problem until today… I’m getting this error from the Repo files, and my Project I’ve been working on.

    Maybe Tom knows more about this? ;P

    • Yep it’s a strange one! I’m getting this issue with my own project and have been searching around for an answer. Struggling! Thanks for letting me know anyway Callen, hopefully Tom might have something 😀

  5. Hi Tom, I found the compile problem after updating the Survival Game project files to 4.26. You have to include “PhysicsCore”, in the SuvivalGame.Build.cs file to use Physical Materials (IE UPhysicalMaterial and EPhysicalSurface) in SImpactEffect now. Otherwise you will get a linker error. Hope this helps! This course along with your Udemy course are the best for learning C++ in Unreal Engine! I hope you make more!

    • Hey Callen, since you managed to upgrade to 4.26, are you coming across an issue where you compile and UE crashes?
      I can successfully build the VS project no problem, but hitting compile in UE causes it to crash.
      I’ve tested this on another PC and the same issue occurs (so it’s definitely something wrong with the project working with 4.26 and not my setup).

      Here’s the error I’m getting when UE crashes:
      https://pastebin.com/WbG9Kicx

      Are/were you getting this issue? If you know a fix please let me know, thank you!!

  6. Thank you for this great project, I used it for implementing audio with Wwise. It was a very simple project that helped me understand Unreal Engine and C++ scripts a lot better

  7. Hey Tom!

    I’ve been looking at developing a massively multiplayer-capable survival game crossplatform for PC and VR. This is my first full game project, but I have over 10 years of experience with programming in various languages for hobby projects (mainly game servers). Currently, I’m in the planning phase and am looking at ways to cut down the levels of work required to get this thing off the ground and running as painlessly as possible, given that I’m working alone. I recognize that you’ve included a MIT license in the github distribution, but I would like to ask personally before I begin:
    Are you actually okay with this stuff being used in a project that will be sold?

    Naturally, I would be adding much more to it compared to how it is by default, and I would certainly follow the license requirements, but I still wanted to check personally. Using something like this would save a vast amount of time and effort that I could be using on optimization and proper featuresets.

    Either way, thank you for this resource and your time,

    “JoDa”

  8. Hi Tom, I just tried to update Survival Project to 4.23, I got most of the errors taken care of and I’m done to just a couple now that I cannot figure out. They are in the Game mode around Line 250.

    bool ARGameMode::IsSpawnpointPreferred(APlayerStart* SpawnPoint, AController* Controller)
    {
    if (SpawnPoint)
    {
    /* Iterate all pawns to check for collision overlaps with the spawn point */
    const FVector SpawnLocation = SpawnPoint->GetActorLocation();
    for (FConstPawnIterator It = GetWorld()->GetPawnIterator(); It; It++)
    {
    ACharacter* OtherPawn = Cast(*It);
    if (OtherPawn)
    {
    const float CombinedHeight = (SpawnPoint->GetCapsuleComponent()->GetScaledCapsuleHalfHeight() + OtherPawn->GetCapsuleComponent()->GetScaledCapsuleHalfHeight()) * 2.0f;
    const float CombinedWidth = SpawnPoint->GetCapsuleComponent()->GetScaledCapsuleRadius() + OtherPawn->GetCapsuleComponent()->GetScaledCapsuleRadius();
    const FVector OtherLocation = OtherPawn->GetActorLocation();

    // Check if player overlaps the playerstart
    if (FMath::Abs(SpawnLocation.Z – OtherLocation.Z) < CombinedHeight && (SpawnLocation – OtherLocation).Size2D() < CombinedWidth)
    {
    return false;
    }
    }
    }

    /* Check if spawnpoint is exclusive to players */
    ARPlayerStart* MyPlayerStart = Cast(SpawnPoint);
    if (MyPlayerStart)
    {
    return MyPlayerStart->GetIsPlayerOnly() && !Controller->PlayerState->bIsABot;
    }
    }

    return false;
    }

    it is the 2 const float CombinedHeight and const float CombinedWidth. SpawnPoint and OtherPawn are giving errors of pointer to incomplete class type.

    Thank you for the Tutorial and the project both here and on Udemy.

  9. Hello, I am trying to remove the death sequences from the player. I can’t find where some of the functions are being called. UnFreeze(), StartSpectating(), I need to remove these functions but cant seem to figure out where they are even being called from.

    • I know they are in the player controller but I need to just get rid of all of that, so I can handle the death on my own terms but even when I do the spectating messes with it.

  10. Hello, I download the file from Git and am trying to open it using Unreal Engine. I keep getting an error note saying SurvivalGame could not be compiled. Try rebuilding from source manually. Is there any way to fix this? It says that the file is built using versions 4.20, 4.21, and 4.22 but I only have versions 4.20.3, 4.21.2, and 4.22.3
    Thank you

  11. Hello Tom im trying to figure out how to make the movable objects in this project actually collide with stuff when i pick them up but i cant seem to figure it out

    • You might want to try using physics rather than hard-attachment. eg. a physics constraint (component) might help as the object will then physically be moved around and can still collide with the environment.

  12. Hey Tom,
    just recently I tried to recreate your Survival Game again with engine version 4.21.2. I somehow can’t figure out why your project always compiles while mine doesn’t whenever I want to add a USpringArmComponent to my Character.h. A good friend of mine (a programmer) and me where trying to figure out a whole afternoon what’s going on. You never forward declare the class or include any header files that has USpringArmComponent in it, do you?. Or did we miss it somewhere? Same for the CameraComponent. I know they changed the way we should include header files with 4.16 (only include what you use) but yours is still a mystery (“X-Files Theme playing”) 😀 What’s the magic behind it? 🙂

    • I think the magic is in the project being old enough to still use Epic’s monolithic Include system. The old Engine.h can still be used which holds nearly all common includes you might need. I wouldn’t advice you do the same, I suppose its part of the projects legacy now.

      • Alrighty. Thanks for the fast answer! We had a guess that there was some .h file containing the Engine.h. So many things to learn from that project, truly one of the best MP “Templates” around to learn the MP part of the Engine. I wish there was some Dedicated Server stuff from you 🙂

  13. Hi,

    I’m really struggling to see what the tutorial aspect of this, am I missing something? All I can see is the ‘documentation’ page, in which you gloss over one or two functions per class without really going too in-depth and that sections branch, which contains vastly more code than is ever mentioned in the docs. Sorry if i’m coming off as harsh, but i’m genuinely confused what im missing. Is this the whole tutorial and we’re instead supposed to be learning from copying the code? Please could someone let me know if im missing some crucial part to this?

    • Fair question Will! Originally this was created as a series where I added complexity over time so it all started off much simpler though even then it was not a step-by-step but more of a sample project with supporting documentation.

      Afaik it’s not branded as a “tutorial” and more often then not referred to as a Sample Project instead, that’s what it should be branded as atleast.

    • lol I found it! just need to ask one more question. when I go to package , it will build the game and everything with it but then it says “Build Failed”, yet im able to still play the game I made?

  14. I can not open the project.

    “SurvivalGame could not be compiled. Try rebuilding from source manually.”

    help me please thank you des de ja

  15. Hello instructor. Can you build a course make game FPS Survival in above. Instead, many peoples have to read. can you make tutorial ?. Thank you instructor very much.

  16. 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?

  17. 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.

  18. Hi all!

    I can’t build to 4.16/4.17… I try automaticly in UE4, and manually in Visual Studio.

    I need a UE4Editor-SurvivalGame.dll file for 4.16/4.17.

    Thanks Tom! Bye!

  19. Hi Tom!

    Gotta say, I really appreciate what you have done here. Besides the awesome work on the project itself, you’ve responded to countless comments asking for help… Onya mate! 😀

    Is there any word on whether this will be updated in the future for newer versions of UE? I’ve been holding off on beginning a project due to the massive increase in UE’s flexibility in recent updates – is there any way for people to use these files in engine versions like 4.16.3 without you having to update them constantly?

    Cheers again for your work!

    Best regards,

    keen

    • Hi mate!

      The wiki/blogs don’t get updated from all these versions, but the github source is updated occasionally by me (although I’ll admit to some lag between releases and me updating the source) the upgrade to 4.16 should be easy, I believe it only spews out warnings on changes to the build.cs files they like you to make eventually. I should actually get on that and upgrade it for both 4.16 and 4.17 😛

      Cheers!

      Tom

  20. Hello, the files.cpp and file.h that I delete manually are always present in the editor, I want to remove them from my project to facilitate the development because there is only the functionality of the character who m ‘ interress

    thank you,

  21. Can you help me for Aİ ? I want to zombie Ai just follow nearest player and attack but it should be blueprint and work multiplayer.

  22. hi Tom ! im using your sample for my main project and now i have a reply and i have some question .. well i use you zombie for do simple , and i have https://www.youtube.com/watch?v=n3IH4qGf_ZA this caractere , how can i use the demon animation with the damage effect on the zombie ? can i ‘retarget’ zombie blueprint on the demon? what is the next step for this demon are playable with life and damage based on the zombie exemple of our projet .. i am sorry for my english ahah ^^ i hope you will know whati try to mean , by the way tom , really good works !

  23. hi tom , i have some problem …. im sorry about my english , so my probleme is when is launch the project , the load stop at 45% and i have this report :

    Fatal error: [File:D:\Build\++UE4+Release-4.14+Compile\Sync\Engine\Source\Developer\DerivedDataCache\Private\FileSystemDerivedDataBackend.cpp] [Line: 57]
    Cache path C:/Program Files (x86)/Epic Games/Users/Maison-/Documents/Unreal Projects/EpicSurvivalGameSeries-master/SurvivalGame/LocalDerivedDataCache is longer than 119 characters…please adjust [DerivedDataBackendGraph] paths to be shorter (this leaves more room for cache keys).

    UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:332]
    UE4Editor_DerivedDataCache!FFileSystemDerivedDataBackend::FFileSystemDerivedDataBackend() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\filesystemderiveddatabackend.cpp:57]
    UE4Editor_DerivedDataCache!CreateFileSystemDerivedDataBackend() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\filesystemderiveddatabackend.cpp:311]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseDataCache() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:540]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseNode() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:141]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseHierarchicalCache() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:417]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseNode() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:161]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseAsyncPut() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:328]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseNode() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:177]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseKeyLength() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:369]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::ParseNode() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:165]
    UE4Editor_DerivedDataCache!FDerivedDataBackendGraph::FDerivedDataBackendGraph() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:82]
    UE4Editor_DerivedDataCache!FDerivedDataBackend::Get() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatabackends.cpp:878]
    UE4Editor_DerivedDataCache!FDerivedDataCache::FDerivedDataCache() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatacache.cpp:201]
    UE4Editor_DerivedDataCache!FDerivedDataCacheWithRollups::FDerivedDataCacheWithRollups()
    UE4Editor_DerivedDataCache!InternalSingleton() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatacache.cpp:1006]
    UE4Editor_DerivedDataCache!FDerivedDataCacheModule::StartupModule() [d:\build\++ue4+release-4.14+compile\sync\engine\source\developer\deriveddatacache\private\deriveddatacache.cpp:1031]
    UE4Editor_Core!FModuleManager::LoadModuleWithFailureReason() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:485]
    UE4Editor_Core!FModuleManager::LoadModule() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\modules\modulemanager.cpp:327]
    UE4Editor_Core!FModuleManager::LoadModulePtr() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\public\modules\modulemanager.h:308]
    UE4Editor_Core!GetDerivedDataCache() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\misc\coremisc.cpp:97]
    UE4Editor_Core!GetDerivedDataCacheRef() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\core\private\misc\coremisc.cpp:108]
    UE4Editor_Engine!GetGlobalShaderMap() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\engine\private\globalshader.cpp:613]
    UE4Editor!FEngineLoop::PreInit() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:1539]
    UE4Editor!GuardedMain() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\launch.cpp:113]
    UE4Editor!GuardedMainWrapper() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
    UE4Editor!WinMain() [d:\build\++ue4+release-4.14+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
    UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
    kernel32
    ntdll

    Can you try to help me to resolve my problem?

    • Hi mate,

      The answer is in the first few lines of your log:

      “Cache path C:/Program Files (x86)/Epic Games/Users/Maison-/Documents/Unreal Projects/EpicSurvivalGameSeries-master/SurvivalGame/LocalDerivedDataCache is longer than 119 characters…please adjust [DerivedDataBackendGraph] paths to be shorter (this leaves more room for cache keys).”

      You need to move your project to a folder on disk that is shorter.

    • I can’t seem to open it using 4.15 right now. Due to it not being cooked or rather, the fact that I’m new to this all and don’t really know how to open it.

  24. Hi Tom, I have a question…will you upgrade this to 4.15 or that’s not in your plans?
    I seen you have done this before but I wanted to ask to be sure. If you could be so kind to reply.

      • Oooh hahahaha, I’m just starting to mess around with it, there’s a lot of cool things I wanna try out in this new upgrade. Thanks for the reply!!!

  25. It might not be the best place to ask this but i really can’t find any answers. Can someone please tell me/teach me how to create a second player (local splitscreen) in C++ and give inputs to it? I can’t find anything that is in c++ and nothing that works in blueprint. I’m trying for a week and I can’t find a solution.

    • Hi Alex,

      ShooterGame example available via the Learn-tab of the Epic Games launcher might have some splitscreen code for you to look into. I never tried it, but I remember seeing some mentions of it in their code.

  26. Fantastic tutorial! When I play the game I see a very noticeable lag when the game time advances. I set the sunlight to not cast shadows, I set the trees to not cast dynamic shadows and rebuilt the lighting but it’s still there. If I remove the day/night manager from the game it goes away. My laptop is intel i7, 8GB RAM, windows 10, Radeon 5600 with 2GB RAM.

    • I’m afraid that’s due to the Skylight actor being re-captured dynamically as the time of day changes. Not very ideal, I know where are other ways of handling blending of this by texture, esp. now!

      I haven’t seen hitches myself after making some changes to how frequently it re-captures, but it’s still a perf hog and if you’re moving forward with this project, it’s better to blend between a few cubemaps in the Skylight rather than trying to dynamically recapture.

      One source on blending cubemaps I remember is from Zak: https://www.youtube.com/watch?v=cHzt73Tn0L4

  27. pls sloved this error

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

    Running C:/Program Files (x86)/Epic Games/4.14/Engine/Binaries/DotNET/UnrealBuildTool.exe SurvivalGame Development Win64 -project=”C:/Users/Kavan/Documents/Unreal Projects/SurvivalGame 4.14/SurvivalGame.uproject” -editorrecompile -progress -noubtmakefiles -NoHotReloadFromIDE
    @progress push 5%
    Parsing headers for SurvivalGameEditor
    Running UnrealHeaderTool “C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\SurvivalGame.uproject” “C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Intermediate\Build\Win64\SurvivalGameEditor\Development\SurvivalGameEditor.uhtmanifest” -LogCmds=”loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
    Reflection code generated for SurvivalGameEditor in 4.9968581 seconds
    @progress pop
    Performing 6 actions (4 in parallel)
    [2/6] Resource ModuleVersionResource.rc.inl
    [3/6] Resource SurvivalGame.rc
    PCH.SurvivalGame.h.cpp
    Module.SurvivalGame.cpp
    SurvivalGame.generated.cpp
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SBaseCharacter.cpp(101): error C2039: ‘GetMatchState’: is not a member of ‘AGameModeBase’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameStateBase.h(10): note: see declaration of ‘AGameModeBase’
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SPlayerController.cpp(31): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\Engine/World.h(780): note: see declaration of ‘UWorld::GameState’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime/Engine/Classes/Animation/AnimInstance.h(24): note: see declaration of ‘UWorld’
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\Player\SPlayerState.cpp(41): error C2248: ‘UWorld::GameState’: cannot access private member declared in class ‘UWorld’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\Engine/World.h(780): note: see declaration of ‘UWorld::GameState’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime/Engine/Classes/Animation/AnimInstance.h(24): note: see declaration of ‘UWorld’
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(9): error C2011: ‘FLogCategoryLogGameMode’: ‘struct’ type redefinition
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(20): note: see declaration of ‘FLogCategoryLogGameMode’
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2027: use of undefined type ‘FLogCategoryLogGameMode’
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Engine\Classes\GameFramework/GameModeBase.h(20): note: see declaration of ‘FLogCategoryLogGameMode’
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2065: ‘CompileTimeVerbosity’: undeclared identifier
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.IsSuppressed’ must have class/struct/union
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2228: left of ‘.GetCategoryName’ must have class/struct/union
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): error C2665: ‘FMsg::Logf_Internal’: none of the 2 overloads could convert all the argument types
    C:\Program Files (x86)\Epic Games\4.14\Engine\Source\Runtime\Core\Public\Logging\LogMacros.h(37): note: could be ‘void FMsg::Logf_Internal(const ANSICHAR *,int32,const FName &,ELogVerbosity::Type,const TCHAR *,T1)’
    with
    [
    T1=FVector *
    ]
    C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Source\SurvivalGame\Private\World\SCoopGameMode.cpp(69): note: while trying to match the argument list ‘(const char [111], int, ELogVerbosity::Type, const wchar_t [37], const TCHAR *, FVector *)’
    ERROR: UBT ERROR: Failed to produce item: C:\Users\Kavan\Documents\Unreal Projects\SurvivalGame 4.14\Binaries\Win64\UE4Editor-SurvivalGame.dll
    Total build time: 47.08 seconds

  28. Hi Sir ! Have you even thought to make Youtube tutorials for your game ? Because it would be very nice. We can understand the concepts of Unreal Engine C++ more easily and efficiently.
    Looking for a positive response.

  29. Hi Tom! How i can use the RPG Inventory system in the project? Please write the minimal instructions! Thank you!

    • Hi Zoltan,

      The RPG inventory system isn’t mine and afaik it’s a paid package (which I don’t own). So you’ll have to resolve that yourself I’m afraid.

      – Tom

    • After looking at GameMode.cpp in the Engine project, i see that the other InitNewPlayer function is being called instead of the one that ASGameMode class is overriding. I swapped the ASGameMode InitNewPlayer() to use the other prototype and everything works now (Couldn’t deal damage to AI because SetTeamNumber() wasn’t getting called). Any explanation as to why switching from 4.12 to 4.13 could cause this to happen?

      • Thanks for pointing this out Clay, I just updated the public repo with the same fix. Looks like a bad merge in the engine code, the functions are so similar that one of them should in my opinion be removed.

  30. Shooting a bomb to kill a zombie doesn’t register as a kill for the player. Is this expected? When debugging I see the EventInstigator parameter in the ASBaseCharacter::TakeDamage() function call is null.

    • After slightly more digging I found the last parameter to ApplyRadialDamage was nullptr. I believe just keeping track of who the last APawn/AController to interact with the bomb was and using that instead of nullptr should fix the problem.

  31. Hi,

    I have a question?

    What happens if FocusedUsableActor in SCharacter.cpp is destroyed?

    Then this code FocusedUsableActor->OnEndFocus(); will result in editor crash. Maybe it’s not likely in your case but what would be the best way to ensure that FocusedUsableActor is not destroyed when it’s used?

    FWeakObjPtr or AActor::OnDestroyed?

    • Fair point, Hadn’t considered that case. I’d go for a WeakObjPtr and check it’s state before calling functions on it. Good find.

      – Tom

    • That means you are opening the engine with a different version than it was built with. The project was last updated for 4.12

      – Tom

      • I am Getting this:
        3> SurvivalGame.generated.cpp
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp(13): error C2039: ‘GetAudioComponent’: is not a member of ‘FActiveSound’
        3> G:\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Sound/SoundNode.h(11): note: see declaration of ‘FActiveSound’
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp(13): error C2227: left of ‘->GetOwner’ must point to class/struct/union/generic type
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Player\SCharacter.cpp(127): warning C4458: declaration of ‘InputComponent’ hides class member
        3> G:\UnrealEngine\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(316): note: see declaration of ‘AActor::InputComponent’
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Player\SCharacter.cpp(888): error C2027: use of undefined type ‘UAnimInstance’
        3> G:\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprintGeneratedClass.h(15): note: see declaration of ‘UAnimInstance’
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Player\SCharacter.cpp(888): error C2227: left of ‘->Montage_Stop’ must point to class/struct/union/generic type
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Player\SPlayerController.cpp(94): warning C4458: declaration of ‘MyHUD’ hides class member
        3> G:\UnrealEngine\Engine\Source\Runtime\Engine\Classes\GameFramework/PlayerController.h(188): note: see declaration of ‘APlayerController::MyHUD’
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\Player\SPlayerController.cpp(107): warning C4458: declaration of ‘MyHUD’ hides class member
        3> G:\UnrealEngine\Engine\Source\Runtime\Engine\Classes\GameFramework/PlayerController.h(188): note: see declaration of ‘APlayerController::MyHUD’
        3>E:\Game Development\Master Branch\Source\SurvivalGame\Private\World\SGameMode.cpp(99): warning C4456: declaration of ‘MyGameState’ hides previous local declaration
        3> E:\Game Development\Master Branch\Source\SurvivalGame\Private\World\SGameMode.cpp(86): note: see declaration of ‘MyGameState’
        3>ERROR : UBT error : Failed to produce item: E:\Game Development\Master Branch\Binaries\Win64\UE4Editor-SurvivalGame-3591.dll
        3> Total build time: 171.06 seconds
        3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3075: The command “G:\UnrealEngine\Engine\Build\BatchFiles\Build.bat SurvivalGameEditor Win64 Development “E:\Game Development\Master Branch\SurvivalGame.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.
        ========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

        Please Help

        • SoundNodeLocalPlayer.h and SoundNodeLocalPlayer.cpp copied from another epic project “ShooterGame”

          In SCharacter.cpp add a line #include “Animation/AnimInstance.h”
          Done

  32. This has absolutely made a lot of things clear for me on how to do things. For the life of me, I cannot find where the text is set for the “stats” in the top left: ComputerName – Score 0 – Kills 0 – Deaths 0. I want to add another varaible in their for debugging purposes but its not in the UI blueprints and I looked at all the references related to those variables. 🙁

    • In the Editor, Content->UI->SurvivalHUD. Open the survival hud blueprint and go to DrawLeaderboards. It is located here.

    • Hi Diego,

      There is no automatic way to convert C++ to Blueprints. You can however have a C++ project framework and continue building features etc. using Blueprint on top of that.

      – Tom

  33. Hi Tom! I admire your work in this tutorial. I’ve downloaded the github version of this game and build it smoothly. But I realized this game was very choked up and laggy. Can you give me the advice to fix it?

  34. hi Tom,
    your tutorial are awesome, but i’ve got a problem with the function TakeDamage() and DealDamage().
    i can’t TakeDamage from other player and InflictDamage to other Player (it’s a Multiplayer game), in my characterClass i override the function TakeDamage and in my WeaponClass i’ve created the weapon trace and DealDamage to inflict damage, i don’t know what is/are the error/s.
    Thanks for your time.

    • The damage application is already implemented in the project. You should have all the functions necessary to deal/take damage – without any specific errors I can’t do much to help.

      – Tom

  35. Hello Tom.I am facing a problem while running the section 1 uproject.It says SurvivalGame could not be compiled.Try rebuilding from source manually .I have ue 4.9.

  36. Hello, very nice thank you for taking the time to make these,

    I know your busy so ill be quick, roughly how difficult would it be to make a mobile (android mainly) version of this?

    Thanks

    Luke

    • There will be some rendering limitations, and of course you’d need to fit in your own methods of controlling the character etc. I’ve not tried this, but I welcome you to give it a shot.

      Just keep in mind that the project was definitely not designed for mobile, and certain features may very well be way too heavy for mobile at this point.

      • Thanks Tom. Would you mind to point me in the right direction as to how you would go about implementing this in the context of this example project? Just some general advice would help point me toward the solution and I can work it out on my own from there.

  37. Hey Tom, I tried to open the survival game unreal project file in UE4, but then I got a message that said “The following modules are missing or built with a different engine version: UE4Editor-SurvivalGame.dll” and it asked if I would like to rebuild them, so I started the build and when it was finished I got an error saying “Error recompiling, try recompiling from source manually.”

    I am really new to UE4 in terms of opening another users UE4 project, so I just was wondering if I am doing it correctly or if the problem stems from a difference in versions?

    I am running UE4 version 4.9.2

  38. Hi. I have downloaded the full project from github. Now when I try to open it up with UE 4.8.1 , build fails with around 20 errors.
    Some of them are :
    error C2555: ‘USoundNodeLocalPlayer::GetInputPinName’: overriding virtual function return type differs and is not covariant from ‘USoundNode::GetInputPinName’

    error C2039: ‘SpawnSoundAttached’ : is not a member of ‘UGameplayStatics’

    What could be the reasons? Am I doing something wrong?

  39. I’ve played around a little with the weapon trace & weapon trails. It seems that the weapon trail is not working correctly. It doesn’t go into the direction you’ve shot, but in a fixed direction (I did not manipulate the c++ code, the Vector parameter is still set in code). If you comment the “only create trails fx by other players” part out, you’ll notice it quite quickly.

    Cheers
    Theo

  40. Hi Tom,

    So in some of the levels in this project there’s those Barrier that you can push and jump on but I noticed that they shake when you jump on them and sometimes they just bounce off.

    I made a short clip to show what I mean:
    https://www.youtube.com/watch?v=BJnKnkoEsas

    And just to note if I start a new project and put something on the ground and simulate physics the same thing happens.
    Here’s a test in another project just to show it:
    https://www.youtube.com/watch?v=DKTPc42OUUU

    How do I fix this and make the behavior more real?

    I know it’s kind of unrelated but I couldn’t find an answer for it anywhere.

  41. Hello Tom,

    My name is Joaquín and I´m following your C++ SurvivalGame Samples. I will like to question, Is this C++ API’s Project available for UE4 4.8?.

    Thank you very much!.

    Best regards

  42. Hello, Tom! I’ve learned a lot going through the Wiki for the past few weeks. So before I ask my question, I’d like to thank you for taking the time out to post these tutorials as they’ve been a lot of help.

    I noticed the TeamNumber variables have not been used yet, and was curious if there was a currently a procedure to make them workable in game. I’m following along, but have not seen this functionality mentioned.

    • Hi D,

      The teamnumbers in SPlayerState are used by the GameMode, have a look at CanDealDamage() in SGameMode to see how 🙂

      – Tom

      • Oh, it seems I was mistaken! I thought that teamnumbers was used to separate players into teams, whereas it actually separates the AI zombies from the players. Makes sense now 🙂

  43. Hello, I have this error

    1>D:/Doc/Unreal Projects/AzuraDreams_NG 4.6/Source/AzuraDreams_NG/BaseCharacter.h(61): error : In BaseCharacter: Unrecognized type ‘FTakeHitInfo’
    1>Error : Failed to generate code for AzuraDreams_NGEditor – error code: OtherCompilationError (2)

    I need Help!! I work with Unreal 4.6.1

    • You either don’t have the FTakeHitInfo copied over from the survival project or you don’t have the #include to wherever you added your FTakeHitInfo struct.

      – Tom

  44. Thanx for the gr8 content i noticed that there is a bug on pirate boomb explode and game crash in the latest update github.
    Also if possible can you add more comments on the damge handling system and how it works in details.

    In sweapon.h there is a macro PURE_VIRTUAL if you can explain what it do.

    I know it still work in progress but i though to let you know.

    Keep dropping the good stuff .
    big thanx from the hart
    Abdullah

    • Hi Abdullah,

      Thanks the bomb crash has been reported, I will fix that today! Thanks for pointing this out to me.

      I’ll add some comments to PURE_VIRTUAL to explain how/when to use it. For now: It’s basically to omit the implementation requirement since our SWeapon.cpp has nothing to implement, it’s only when we reach the SWeaponInstant.cpp that we care about this function and need to implement behavior.

      – Tom

  45. I just tried the second part, and the flashlike is inside his arm. It looks like you missed the attatchment point or something. Just a small thing. Otherwise, it is awesome.
    Oh, one more thing, could you make it so we can open the Visual Studio project? It seems all the profect files are missing from the project folder (Intermediate/ProjectFiles) There is not even a folder. Thanks.

    • Hi Lance,

      The flashlight is a content bug, I need to fix the translation during import.

      You’ll need to generate the Visual Studio files by right-clicking the .uproject, I can’t includes those folders because they are supposed to be machine specific. Perhaps I should clarify this in the project documentation.

      – Tom

  46. To your understanding what is fully networked? As with your inventory tutorial you stated it was fully networked/multiplayer as well while it’s not. (as checking the replication check box doesn’t make it multiplayer/fully networked)

    And do you plan on making a blueprint only series for this?

    As always great work on sharing this I’m sure it’s useful for a lot of people.

    • The inventory tutorial itself doesn’t state it’s fully networked. The separate UsableActor tutorials (considered a “part 1”) are fully network supported however.

      And as for this project, yes it will by default support all features in multiplayer.

      Edit: There won’t be a BP version for this (not planned atleast) The main reason this is all C++ is to balance out the great difference between BP and C++ resources that are currently available for UE4.

      – Tom

  47. The video series on 3rd person power pickup is outdated, they will need to modify some things in the code to get it to work. I don’t think it would be a good starter series for people trying to learn UE4 C++. Unless you want them to test their skills in debugging code. 😉

Leave a comment on this post!