Devlog 02

Developing a Modular Weapon System

Firearms are rather important in a first person shooter, so let's make some awesome ones.

Author

3 min. read

Post image
Developing a Modular Weapon System

A lot has happened since the last devlog - Namely that I've moved between countries and generally have had a lot to deal with surrounding that. As a result of this, Unreal Engine has continued to evolve, with the latest version as of writing, being 5.6. I've found some time to work on the project again, after upgrading my setup from an RTX 3080 build to RTX 5090 SFF setup, so in connection to that I've upgraded to the latest version and begun migrating a few of the systems I had built already. Upgrading the input system has been pretty straightforward thankfully, which ties nicely into todays topic: Weapon systems.

As we’ve already discussed in the last devlog, the aim of this project is to rebuild the old publisher demo in Unreal Engine 5 almost exactly as it was (To the best of my ability). And of course I am immediately straying from that path. The demo only contains a single weapon, the SMG. Well, there’s also a couple of grenade types which could be consideredd weapons but for the purposes of this post let’s just say there’s only one to keep things simple.

In order to try and build something that is just a bit more future proof, I’ve decided that I’ll expand on the weapon system so instead of just having a single SMG, I’ll create a flexible base class from which you could theorethically create any type of weapon you’d want. From here, I should be able to easily extend it into pistols, SMGs, assault rifles, shotguns, snipers etc. You get the idea.

I’ve never built something like this before, so I am doing a bit of research currently, investigating how similar systems are built in other games. The few I am looking at right now are:

  • S.T.A.L.K.E.R. Gamma
  • Escape from Tarkov
  • And more

Just for clarification, this doesn’t necessarily mean that I’ll add a massively complex system where you can customize every inch of your weapon, although that would be a nice addition.

Wishlist

  • Multiple sights and scopes
  • Suppressors
  • Lasers
  • Flashlights
  • Under-barrel attachments, like grenade launchers, breaching-shotguns etc.
  • Procedural animations

Where I'm at currently

I have a BP_Weapon_Base blueprint which handles logic such as magazine size, current ammo in gun and firing mechanisms. The implementation currently only exists for the classic SMG while I figure out how to correctly ensure everything is also replicated and works in multiplayer, as I'd like for this vertical slice to be usable in co-op.

I've built the system in a way that suppression, scopes, lasers and under-barrel attachments are handled through sub-blueprints so that their logic is contained in a way that reflects how each item would behave in the real world. This also makes it easier to manage everything, as I don't have one massive blueprint handling everything, and is generally a good practice.

--Insert screenshot here--

Return to overview