Most of the aspects of game networking seem pretty straight-forward and although there are many ways to accomplish the same task and it’s debatable about what is better, I need some direction with respect to handling weapon fire in fast-paced games. As I see it there are a few options here:
- Each player have the maximum number of “shots” out at a time objects that get reused and synchronize their position when they are visible
- Send an event for non-tracking weapons that simply say that “player n fired his lasers as such and such time” and then apply that to all the clients respectively
- Send an event creating a new “laser shot” that will register the new object on each client and then synchronize position as it goes
I’m thinking for non-tracking weapons the best way to go is going to be option #2 and for tracking weapons option #1. Does anyone else have differing opinions here or an entirely better way of thinking about it?