Over the last few weeks, I started to create an FPS using Unreal Engine 4. After spending most of the last 12 months developing in Unity, I thought it would be a good time to switch engine and try out UE4.
As this is my first time developing anything in UE4 using both C++ and Blueprints, I decided to keep the scope of the game moderately limited. However, the concept of the game is a straightforward combat system where the player has to clear out areas of the level of enemies. Similar to the combat of the classic Star Wars: Republic Commando minus the squad. I also have some ideas to maybe have the ability for the player to have secondary objectives that they could complete alongside their main objective.
As the game is still in very early development I only have a few of the systems working and at the moment working by themselves. However, in the last few days, some systems I've been working on have come along pretty well despite still having some more way to go. The two systems, that are still in early stages, that I'm going to talk about are the Interaction and Cover systems.
There are objects in the level that the player can interact with, such as doors. These objects have many of the same components. To handle this all interactive Blueprint objects derive from a C++ class that has all of those common components. When the player gets close enough to the object they can interact with the object using the interaction key.
As this is my first time developing anything in UE4 using both C++ and Blueprints, I decided to keep the scope of the game moderately limited. However, the concept of the game is a straightforward combat system where the player has to clear out areas of the level of enemies. Similar to the combat of the classic Star Wars: Republic Commando minus the squad. I also have some ideas to maybe have the ability for the player to have secondary objectives that they could complete alongside their main objective.
As the game is still in very early development I only have a few of the systems working and at the moment working by themselves. However, in the last few days, some systems I've been working on have come along pretty well despite still having some more way to go. The two systems, that are still in early stages, that I'm going to talk about are the Interaction and Cover systems.
There are objects in the level that the player can interact with, such as doors. These objects have many of the same components. To handle this all interactive Blueprint objects derive from a C++ class that has all of those common components. When the player gets close enough to the object they can interact with the object using the interaction key.
Projectiles are blocked by all objects in the level and as I didn't want the enemy to just stand on the spot and face the player to shoot them. I started to develop the cover system for the enemy AI to use. The AI behaviour for using cover is straightforward, if the player is in the line of sight then look for any valid cover to use. If any cover is found move into cover then attack the player, otherwise, just attack the player.
In the image above the blue lines shows the detected cover and the black line was the selected cover to move to. The enemy will move to the closest cover to itself and once in cover, the enemy will then face the player in order to attack them.
There are more systems that I've been working on and have yet to create, which I plan to write more blog posts about in the coming weeks.
There are more systems that I've been working on and have yet to create, which I plan to write more blog posts about in the coming weeks.