I am wondering what the best (difficulty/time to implement and quality of gameplay) approach is to take for implementing projectiles spawned from AIs in a top-down bullet hell dodging game. I want the dodging of projectiles on the client to be really tight. If you are familiar with ROTMG, similar to that game with big punishments for dying/getting hit and a requirement for dodging on very busy screens with many many projectiles flying around. I am not good at game network programming at all but this is by far the most important mechanic in my game so I am willing to learn if there is no out of the box approach that would work, but I would prefer blueprints/checking boxes in the editor if possible.
Some approaches I’ve considered:
-
Since this is a PvE game, I could have my AI enemies broadcast what they are going to do at the exact time step they are going to do it at (attack, move) 300ms in advance. Anyone with a ping of less than 300ms should be able to draw the projectiles pretty much perfectly this way I think. This seems like a good idea to me but I haven’t actually seen many people talking about doing this, so maybe it is hard to do or I am missing a drawback.
-
Some combination of using GAS with behavior trees. I am not familiar with GAS very much but saw some recommendations for using it in multiplayer for replication.
-
Maybe I am overthinking things and should just use the regular ol’ replicate movement checkmark on my projectile blueprint
-
Something else like projectile path prediction with delta time from when the server sent the projectile spawn info
And then there is the issue that even after my client’s view of the projectile is perfectly synced with the server, the client’s dodges also need to be rewinded on the server so that the player doesn’t dodge on their screen but get hit on the server… Thanks for your thoughts in advance