Download

Grenade Bounce Quake Template!

Thanks to you guys the next version of Quake Template (Advanced FPS Template) will have fully revamped projectiles that can bounce with falloff based on gravity!

A lot more needs to be done but Advanced FPS template will be released for free so you guys helped a lot more people than just me!

I’ll tip both of you guys some bits if you want me to! You have saved me huge amounts of time!

Good to hear it. Dont worry about the Bits for me, just glad to help. Wish you would reply to my PM i sent you months ago though :stuck_out_tongue:

Hmm? I’ll take a look. Willing to bet I told myself I would respond later then forgot about it. ><

its only me, or math expression nodes cause lags when you add something into same bp?

Well after doing a bit of testing I think its safe to say the methods discussed on this thread cause insane net traffic and lag. I cant even play on local host without watching bullets fall to the ground, rubber banding and severe lag. :frowning:

So it looks like ill have to go through this to figure out how to reduce the traffic a bit.

You shouldnt need to perform the Line Traces on the server. The client can perform the Line Traces and the only thing that should be replicated is the position of the Projectile.

Try moving the Line Traces to client side, if you have many clients and they all want the server to perform line traces for them, this could be problematic.

There seems to be more going on. I thought I was doing testing of this as I worked on it but in practice I am getting a lot of lag even when I am not firing my weapon. Looks like I need to go over everything for optimization. If only there was a proper way to test network traffic so I can see if my changes are making a difference.

A quick google search revealed the following.

https://docs.unrealengine.com/latest/INT/Gameplay/Tools/NetworkProfiler/index.html

I havent used this myself and was curious to see if something like this actually existed, thats why i googled it :slight_smile: Im surprised this isnt a feature of the engines session profiler itself.

You may have some luck using it. I might investigate it at a later time though :slight_smile: Im sure you will update the thread with your findings.

Now that might come in handy. I have a feeling I am in for a bumpy road. Its one thing to make everything function with replication. Its probably another thing entirely to make it efficient.

I am thinking that what I will do is remove all replication and RPCs with specifics to function on client or server. Then slowly start working things back again.

So digging into this a bit I think it is exactly what I needed! But the real question is, what are acceptable values for each of these things. I will be posting about this as I figure it out.

Scary new territory for me!

Ok so this is a really important detail. I did a lot of optimizing of the RPCs and found a ton of inefficiencies. But I found that the problems didn’t all go away.

I struggled for a bit with this issue for a bit and even started losing hope that I can get this to work as a multiplayer project.

Well as a last ditch effort I made sure to run a test where a client connected from another machine rather than my own. Instantly the issues all vanished. So apparently, testing performance on one machine is going to give bad results. As soon as I had another machine connect to the server I was suddenly able to see everything working as its supposed to work.

The lag issues are a false alarm now.

As a result I will put up a test build to show progress tomorrow!

That makes sense. Trying to emulate a couple of connections on a single machine has its issues i guess.

Im glad that you were able to debug your problem with the Network Profiler and found some interesting results. I will definitely use it in the future.

What optimizations were you able to make that saw large improvements?

Roughly 90% of the replicated variables and RPCs didn’t need to be set to replicating. Strangely enough, setting everything to no replication then slowly turning replication on for specific things helped a lot.
Its actually a pretty large amount of stuff.

But the biggest difference was made when I reduced the number of multicast RPCs. The profiler was useful at first but in the end stepping back and just going through every blueprint one at a time made the biggest difference.