FPS game series or tutorial C++

After check the survival game series: Ongoing C++ Gameplay Example Series: Making a Survival Game - Announcements and Releases - Unreal Engine Forums i think will be nice to have other series or tutorial covering an FPS game:

The Survival Series cover:

  • AI.
  • TPS.
  • Weapons in TPS.
  • Basic movement and controls of a TPS.
  • Pickup system looking to items.
    And more…

The idea of a FPS:

  • How manage the weapons in viewmodel & worldmodel.
  • Manage FPS camera recoil, shakes…
  • Pickup weapons without need of look to the item.
  • Pickup system and weapon array.
  • How to manage Stand / Crouch / Prone.
  • Network manage.
  • How manage the weapon and hands animations.
  • How move the camera with a bone head from the weapon viewmodel.
  • How zoom or aim with the weapon and how manage the animations.
  • How to select from menu a weapon and spawn with that weapon.
  • How manage a weapon attachments and different animations in FPS viewmodel and worldmodel.

Its like the Shooter Game Example but without achievements and others things and more focus in the weapon gameplay and weapon stats, step by step.

The final idea is a game with a basic map where you can play with bots and players using network implementation where you can select a weapon at spawn and in the map are these weapons too.
About the gameplay you can stand / crouch / prone and shoot in that different positions, you can reload the weapon an change attachments and a better management of stat of the weapon recoil etc than the Shooter Game, incluying animations of the weapon & hands at reload for example, in the Shooter Game doesn’t have reload animation in the weapon for example.

Example weapon config:

https://dl.dropboxusercontent.com/u/28070491/UE/Forums/DemoExample.jpg

Hi Hevedy,

I think a lot of this can be dissected from the already available ShooterGame. A lot of the weapon code especially is very similar between survival and shootergame, adding first person support wouldn’t be a ton of work for the weapons as shootergame supports both first and third person (it’s entirely possible to do a difference check between the who weapon files and you’ll mostly see a difference of first person support that is missing in survival game) ShooterGame is very complex and intimidating when going through the unfamiliar code. If you have followed and learn my survival game code, you’ll have a much easier time going through ShooterGame as I borrowed a lot of conventions.

I’ll walk through your notes and give you some info on where to find it.

  • How manage the weapons in viewmodel & worldmodel.
    **> ShooterGame uses flags bOwnerNoSee (for third person) and bOnlyOwnerSee for first person mesh. Both the first and third person mesh are set up in the character. A lot of their functions like GetWeaponMesh perform a check if we want to return the first or third person mesh variant. This already pretty complex and probably not something you wish to start with when first building your game… **

  • Manage FPS camera recoil, shakes…
    > Camera shakes are supported in ShooterGame right here: AShooterWeapon::SimulateWeaponFire()

  • Pickup weapons without need of look to the item.
    > Have a look at the Ammo and health pickups in ShooterGame, they pickup items by touch instead of “E” to interact. (ShooterPickup.cpp)

  • Pickup system and weapon array.
    > ShooterCharacter has an Inventory array that holds all weapons. (Identical to survival’s Inventory)

  • How to manage Stand / Crouch / Prone.
    > Stand / Crouch is supported in both projects, Prone isn’t, that could something to cover as a feature in either projects.

  • Network manage.
    > The same between both projects, have a look at my latest wiki docs on replication: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

  • How manage the weapon and hands animations.
    > The setup for this would be similar to how I’ve done it w/ Survival. The Animation Blueprint grabs the required data like is reloading, is running etc. from the character and caches these values to steer the animations in the AnimationBlueprint using Statemachine and additive blends. ShooterGame has the solution (although probably not very easy to grasp) where they manage to play animations for both first and third person depending if we are a local controller (eg. viewing ourselves from a first person) or are a remote controller, so “we” are looking at him from a third person.

  • How move the camera with a bone head from the weapon viewmodel.
    **> are you talking about “true first person”? **

  • How zoom or aim with the weapon and how manage the animations.
    > We have zoom and animation support in the survival game with “IsTargeting” that drives the animation to use hip or ironsights animation and zooms the FOV in the SPlayerCameraManager. (ShooterGame supports this too using similar code)

  • How to select from menu a weapon and spawn with that weapon.
    > That’s another interesting one, I’d like to do more with UMG in the future.

  • How manage a weapon attachments and different animations in FPS viewmodel and worldmodel.
    > While weapon attachments aren’t covered (You would be looking for Sockets to add to the weapon mesh and AttachTo to add your own weapon add-ons) the different animations between first person and third person are covered in ShooterGame. It’s all pretty advanced and I entirely agree some docs on all that would be super helpful

“…in the Shooter Game doesn’t have reload animation in the weapon for example.”

Last I checked they do have reload animations for the weapons, or I’m misunderstanding you?


Bottomline here is that I think you’re entirely right that having something for FPS development is very welcomed, I’d have to leave it to the docs and learning resources team to figure out the best approach. I can’t make any promises myself.

Noope, look you are checking the BF true ? Check the BF or COD at reload animations (the camera of the viewmodel follow the clip more or less and i see the animations in the COD using Maya have a camera in one bone of the viewmesh skeleton attached )

*Will be nice to see that of the prone.

About the other things out of the general things between this games i like more focus in the weapons system and the “gunplay” like in the photo the manage of settings for weapons the Shooter example is too simple and the UT4 don’t have ADS and as the other example is too simple, will be nice to see some system like the “real FPS games” from 2002 to the present the very first game for example COD2 you got now BF and other million of FPS now but in the engines don’t are a true example of the weapons manage (Kick, Swap, Recoil etc) and will be nice to see things like that. In the old games you can see the weapons system like old Call of Duty’s from 1 to 5 and BO1 and get an small idea, but you can’t see the manage of the config only the config files as in my screen example you can see that settings the 90% is based in the COD settings system but no idea about how implement all and will be nice to have something of this public to all (tutorial or example).

*About the Shooter Example you can see at reload the weapon don’t have anim of clip reload.

*And the weapons of the shooter demo use animations for all where in the FPS games the jump don’t have animation is code and the idle movement too

In addition to this, there don’t are examples about how manage the bullet penetration and the decals of the bullets throw the wall in the 2 sides of the wall and manage the damage after cross wall.