Download

Announcing Section 5 of Survival Game - Networking your game

Section 5: Networking your game.

Visit Project Page

UPDATE: Wiki Docsare now available for this section!

We’re announcing the fifth section of the survival sample game today! The documentation will be available in about a week, in the meanwhile you can follow the progress by downloading the project through at GitHub.

**Features **of this section include weapon improvements such as reloading and accuracy. Zombie damaging attacks and movable items to make the environment more dynamic.

The documentation this section will focus on replicating data between server and clients to network your multiplayer games.

&d=1431040566

Known Issues as of section 4

  • Rifle impacts never despawn.
  • Weapon rays are calculated from camera center instead of weapon, causing issues when enemies are close and a difference between server and client FX.
  • Bullet trail moves to 0,0,0 in worldspace.
  • Physics simulation is choppy on clients on dropped items.

Visit Project Page

UPDATE: Wiki Docs are now available for this section!

Cannot wait!! This project is such a life saver!

Will the known issues eventually be fixed?

I noticed the weapon ray issue when I shoot at another player closer, for one person it looks like im hitting him but on the other screen the crosshair is not even on him
Also particle spawn seems to not be perfectly synced like bullet hits on walls & blood sometimes they dont show on the other players screen
& when I climb to an upper level a random AI spawns near me but doesnt even move and I take lots of damage not sure if thats intended

I’m looking into fixing those issues either this section or the next. The weapon ray difference you mentioned is part of those known issues and will be fixed.

That AI spawns next to the player is definitely not intended, I’ll look into that too. (The reason it doesn’t move, is because there is no nav mesh on the rooftops, so that is expected)

Tom, I have a quick question about your TimeOfDayManager C++ class.

Every tick you get the gamestate. Wouldn’t it be better to get it and then store it in a class variable?

Anyway, thanks for this, have been able to look at this for reference for a few functions and how to setup particular classes.

Glad to know those issues will be fixed!
May I ask one more feature request? (apologies if you are sick of them by now)
Any plans to add a melee weapon? I havent been able to find a tutorial for melee weapon with networking support. Only a fake method where its a short bullet, but not a true one

That is possible, but it’s simply getting and casting one class each frame, that will never end up a bottleneck or performance concern. Both are viable.

I’ve been thinking about this, I currently lack animations and models to properly support something like that for the player. The zombie enemies still need an melee attack though, so I might add punching or a spit-like attack, both would use melee attack methods you could use as a reference when building a player swinging a baseball bat for example.

Video of a new feature I’m working on for Section 5.

Cool! Would be nice if you could also showcase how you’d implement IK reach targets for pickup interactions like this.

Is the default character/skeleton that you’re using available in fbx? I could easily make these animations for you if needed, I can hook him up to an auto rigging script for maya and send you an animated fbx /rigged maya version as well if you want to do some more stuff. Should be easy to find some free melee weapons around if not I can do that too

Hi Tom, I noticed when the player is crouched the enemies do not damage you. I can fire my gun and attract every enemy on the map, if crouched, they just swarm around me and do not attack.

Hi! Yeah that is a slightly unfortunate bug…I’ll have to update the anim blueprint so they will look down and “punch” downwards when the player is crouched. I’m reserving section 6 for these type of fixes. Thanks for reporting it!

4.8 has a new blue guy, so we’d have to atleast wait for 4.8 to hit, I’ve asked Epic about fbx availability. I can’t make any promises at this time. It may support a melee attack, but I might as well end up using an alternative

if you want the blue guy in fbx just export it from the engine i already have it rigged in my computer

and i can also help if you want just send me a list of anims you want and i’ll get them for you if i had them

The docs for section 5 are up on the wiki! It’s all about replication using practical examples this time.

Do you think you can break down the reason behind all the math in ASWeaponInstant::?
As i understand it calculates the difference in location on client and server and if its not to large it its a confirmed hit?

Cheers!
WCode.

Hey Tom i see today the crouch lerp system :slight_smile: nice thanks!

*Have a problem when press faster the crouch all time.

There is some validation code I took from ShooterGame. It basically adds some leeway to handle some differences between client and server due to lag, and then checks if the hit the client claims was actually a hit by re-tracing on the server.

What happens when you press crouch all the time?

When you walk and press c all time work nice, but check when you are idle and press c all time the character animation and the camera doesn’t sync.

Haven’t noticed anything strange with that. I’ve added it to my Trello to have a look.