Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by dspmania · Jun 17, 2021 at 04:05 AM · networkingmultiplayermultiplayer-networkingprojectile

Setting slow projectile's moving direction in a networked fps style game (on server, owner client and proxy clients)

I've been working on a networked multiplayer fps-like game with a 'over-the-shoulder' camera view and characters' main attack skills are mostly slow moving projectiles like RPG. You can think of Brawl Stars with 1st person view. My problem is that I can't find a good solution to set (or fix or calculate) the initial moving vector of a projectile when a player A triggered it towards player B, which should be applied to server and all clients. I've searched many Q&As and articles of 'projectiles in network game' (some of them are link text, link text, link text, link text)

However, I can't find mentions about a projectile's direction or trajectory (not the speed) that is easily out of sync in networked play under this situation : authoritative server, owner player's position is predicted in its own device, other players are interpolated (like 100ms), no entity extrapolation is used. For better understanding, I drew a kind of diagram. alt text In above situation, if I take the projectile's direction in Client A (favor of the shooter) and apply it to Server, and Client B, player B in Client B will have hard time dodging this projectile because of the wrong direction.

Can anyone help me out what a projectiles moving direction should be? Is trying to sync it something that I don't have to care? Or the direction can be different on Server, Client A and Client B? Any help would be greatly appreciated.

9290294f-6a09-4587-9a02-d212a9a9c744.png (402.3 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Insok · Jun 17, 2021 at 07:42 PM

Disclaimer: I haven't personally worked on multiplayer games, but I can tell you (just from experience in playing games) that FPS games for example are VERY prone to network and ping delays. And as far as I know, they always interpret the player's positions from the server's perspective. This is also the most convenient way to program the game because it ensures that player A, player B and the server are synced.


In the worst scenario, where both player A and player B have high, noticeable network delays, player A will notice that when he shoots the projectile, it doesn't fire immediately and not at the exact position he is at. For player B, he could've barely dodged the bullet on his client, but still get hit. The reason this is the best solution is because the disadvantage for player A is ONLY dependent on player A his ping. At the same time, the disadvantage for player B is ONLY dependent on player B his ping. If you would try to favor player A, then the higher his ping is, the higher his favor. The same goes for if you would favor player B.


And lastly, you shouldn't try to solve it to realtime for each player, because it is actually impossible.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

165 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity networking tutorial? 6 Answers

RPC and Command Calls OR Network messages for syncing variables across Server and Client? 0 Answers

When to process input in networked multiplayer game? 0 Answers

Does anyone know how to connect outside the LAN network using MLAPI? 0 Answers

Unet: Discern between user disconnection and connection lost 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges