Focusing on multiplayer systems

I’ve been focusing on a separate isolated multiplayer project to keep things nice and clean. I can now turn on game hosting, search for servers and join games. Both characters have working character UIs with server-side interaction.

Coded in damage indicators that show the direction of fire.

I will be merging changes into the main project in my spare time now that the bugs have been ironed out. (Christmas break will probably eat up some time)


Pushing more towards components

I’m pushing more gun parts to components instead on child actor components. This should speed up pushing models to directly working guns (no need for messy external blueprint files).

Already ported the hinge and slide system to drive a specific component and the chamber. Now working on porting over the hammer and cylinder. Setting up a gun should be as simple as popping a component on a mesh and setting its parameters.

The components can also be nested nicely in the editor (already did tests with attaching the cylinder to a crane hinge and worked well).

Added in crane

Added in a crane to the procedural weapon so that it works with the cylinder component (hierarchy follows ok and no errors). Now just have to add in a property to only insert ammo if open.

Next on the list is to add in the loading logic to the slide so it loads from a magazine at x position of the travel distance.

Nested components working

Finally got nested components to work in C++. Set up gun feed for cylinders and the ammo insert works correctly. Now I have to make the shell casing stay in the cylinder until manually ejected.

Component workflow was a major slowdown (wasn’t sure nested in c++ were even possible). Now progress should be a lot smoother.

Component woes

Was fighting with the component system with nested components. Finally decided on a single child actor feed system that attaches to magazines / cylinders.

It can be set to a magazine or cylinder mode. This either lets the ammunition to be distributed along a spline (mags and clips) and the cylinder will evenly distribute ammo containers along a circular spline.

Was hoping to get nested components to work in pure c++ but it’s not a 100% implemented as it is in blueprints so I decided to stop wasting time on it for now.

New system should work ok, just need to re-hookup parts from the old component to the child actor system.

Workflow has been a pretty tough during the week but it’s getting to a stage where I can start making larger progress soon.

Worked out a good middle ground – ammo feed actor

So I finally got a good middle ground where I decided to do the ammo feed mechanism as a separate child actor (it needs it’s own components & ue4 can’t nest them on a component level).

I will be adding this child actor to cylinders, magazines, clips and belt fed boxes and in turn calling it to pull ammo in a unified way across all mediums.

Hope to have all gun mechanisms nailed down and interacting with each other in the near future.

UE4 interfaces just seem broken

Well I’ve gotten prototype parts of a revolver up and running. The cylinder turns after each firing (still need to add a crane), double action working on the hammer. Lots of good things.

So I get around to merging the firing process of the gun depending on the feeding mechanism (magazine, cylinder and in future belt fed). So I think to myself inserting and retrieving ammo should be as easy between these classes as putting a common interface. So I cook up a UInterface that has all of the needed functions and BAM the whole project poops out 64 error messages……

After digging deep into the net it turns out unreal only allows for interface functions to be constant (stupid limit). So as a constant it cannot access the feed mechanism ammo list and if you do pass it through a function it too has to be a const (so it becomes immutable and in turn unchangeable).

Now I have to do a hack work around to get a pickup base class and ammo feed class to work together somehow (you can only inherit from 1 class at a time).

Epic really dropped the ball on this one.