4-player Coop Horde Prototype

Recently I started working on a (4-player) Coop game project in Unreal Engine 4. The game will feature Horde mode including a few others and is build using the C++ Survival Sample Game I built earlier this year for Epic Games. The source for that project is available to all users of the engine. Additional docs on the project are available on the Unreal Wiki, which I recommend when wanting to get get started with the project or learn C++, AI or Networking with UE4.


This new project is about all coop-play with friends. Below is a video of the first 4-player playtest I did a few days after the project had started.

Adding Ranged Combat AI

Besides a ton of other improvements I added AI capable of ranged combat. For this I used ShooterGame as a reference for basic ranged bot behavior and build from there. The video below demonstrates the additional behaviors I added including ‘Last Known Position’ for the bots to keep track of where the player was last seen. This position information is based on vision and audio cue’s (shooting your weapon or walking can be “heard” by bots – this behavior is available in the original Survival Sample project)

This new ranged bot type was added to the playtest earlier this week, at the original accuracy levels the bots are brutally difficult which created some very tense and fun gameplay!

The Tools

The current selection of available items include Sniper Rifle, Assault Rifle, Explosive Shotgun, Pistols, Medkit, Ammo and explosive barrels (see below for a nice demo of the barrel in slow motion)



What’s Next?

I am currently exploring the possibilities for the game’s direction, it will take reference from takes like Alien Swarm, Left 4 Dead and Borderlands. It’s already been a great asset for improving my knowledge of A.I. and some of the bugfixes made to this project have been pushed back into the original Github repository so everyone can benefit.


Meanwhile you can follow my updates on Twitter or follow this blog using the form below to receive new posts right into your inbox!

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


      • If you do change your mind and plan to offer it up as maybe a paid tutorial system like your current free version of survival-sample-game. Please shout id be willing to pay 🙂

  1. Hey Tom,

    great work! I’m also working on a third person shooter game atm, however I stumbled across the issue that you are able to clip through the wall when zooming and standing next to a wall. Does the “seeing” (in my case also shooting :/ ) through wall thing also occure in your game? If not, how did you prevent it? 🙂


    • At the moment it does, I have not looked into a solution but I reckon increased camera collision radius and smaller nearclip value should help a lot for the camera clipping.

      – Tom

      • Thank you very much for answering, I really appreciate the support. I’m going to play around a little with these settings but I guess, at least on my end, it has something to do with switching from a “follow-camera” to an “over-the-shoulder-camera”, which is too near to the wall. However it would be great if you could mention a solution (if implemented) on one of the your next blog posts as well.
        Keep up the great work.


  2. Hi, it’s me again,

    sorry for spamming your block, really. I just wanted to know how you did the names over the players heads. Did you use an umg-widget or are you iterating over the players in the HUD c++ class and determine the position the names should be drawn there?


    • Hi Theo,

      The nameplates are done using WidgetComponent and assigning a screenspace UMG Widget. In C++ I assign my pawn to the UMG widget (so I based my nameplate widget on a custom user widget created in C++ and then sub-classed again in UMG to set up the text block etc.) with the cached variable in the widget I can update name and alignment (enemy/friendly)

      – Tom

      • Hi Tom,

        I managed to get it working, thanks a lot!
        However two questions remain:

        a) How did you handle the replication of the text? The player’s name of the local character works now like a charm but it doesn’t display other client names. I used a “setPawn” method on my NamePlateWidget (extends UUserWidget) and called it in the PostInitializeComponents of my Pawn class (casting the WidgetComp->GetuserWidgetObject to my own user widget class). For me getting the names in the custom user widget means at the moment casting from this stored pawn variable to its player state – but I guess it’s not the right way since I’ll never be able to get the names of the clients with this method.

        b) Do you scale the WidgetComponent in any way? It seems the nameplates in your demo stay the same even if you go far away from the player. Using this approach in my project I got the feeling that the text gets somewhat bigger when moving away from another player.


        • Hi Theo,

          a) that’s probably too early. I push a reference of my pawn into the widget somewhere during BeginPlay of the pawn. The widget binds the nickname of the player to the textfield internally (you can for example: GetUserName() const – in the widget to access in UMG)

          b) I don’t apply any scaling, it’s doing whatever is default for screen-space widget components.



  3. Hi Tom
    when i search ue4 project i found yout website
    and i see your projects thats awesome!!

    my school game make projects teams are make third personer shooting game like overwatch
    do you know overwatch??

    but.. i dont understand ue4 system well..

    so… plz share this projects?? i wanted refer this project

  4. Looks nice! I’ve got one quesition: How did you achieve this smooth lerping/interpolating (?) on your crosshair in the hud? I’m not sure how to use those functions to get this effect…my crosshair is setup like the crosshair in the shooter game example. Thanks in advance!

    • The weapon itself sets the accuracy values without any interpolation. The crosshair widget (UMG) simply blends towards the new value he gets from the weapon class each Tick. So this is basically a lerp between current and target crosshair position which makes it smooth automatically.

Leave a Reply