So I am trying to implement a suppression mechanic for shootergame. The basic idea is that you have a radius around the players that if a shot (i.e. a linetrace in this case) overlaps the radius then the players view is obscured a little (i.e. you play around with the post-processing etc).
Now this has to happen over the network. So thats the biggie I think.
Currently I have the line trace information for when the radius is broken (a sphere component on the player, using linetracemulti to trace by channel and getting the overlap on the sphere from that). Right now I’m just calling a blueprint event with that information.
So what I think I need to do from here:
- Pass the hit from the client weapon code to the server via RPC call to validate
- Handle the call on the server and verify that the actor hit does indeed handle suppression
- Update a suppression value on the suppressed object, with rep notify
- When the client receives the rep notify, update the post processing according to the new value
Now I particularly want to handle some of this from blueprint, at least until I’m happy with the functionality. So I’m thinking that the best bet is to do the whole list from blueprint. Which is what I’m currently trying to implement.
Does that sound reasonable?
One thing that occurs to me is that I can save network bandwidth by checking that the actor does actually handle suppression BEFORE sending the RPC call to the server to actually run the suppression code.
Anyone got any pointers for implementing this?