Bolt and Projectiles

hello, i am fighting with PvP and CoOp modes for my space shooter (Galaga like) game.

How i supposed to instantiate projectiles? projectiles are slow enaught that you (and your oponent ) can dodge them. I want to avoid situations, where one player dodged projectile and other not. How should i do this?

Comments

  • For basic projectiles you can sync them using events or entity state triggers.

    If you have an implementation and find an issue, you can share it and we can recommend ways to resolve it.
  • i've done instantiateing on events. everything is working, but i have problem with damageing.
    Player that is hosting room (probably) has littlebit faster reactions. Now i have situations when P1 hit P2 on P1 screen, but on P2 screen he missed.

    ofc i can make projectiles on client "dummy" and only on server side they will do some damage, but then on client side ill not get any visual effects of hit (when on server projectile will hit player and on client side projectile will miss)

    I had idea to add latency for moving host ship (latency based on ping between server and host). But how can i do that?

    Moving part of ships is based on Authoritative movement on Bolt Sample Pack.
  • The host always has an advantage, there isn't anything you can really do about that besides things like "lag compensation" for "hitscan" weapons for example.

    "Now i have situations when P1 hit P2 on P1 screen, but on P2 screen he missed."
    If you posted your implementation on GitHub for example I can recommend some specific changes