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 iNoMore · Feb 10, 2014 at 06:44 AM · multiplayerserveronlinearchitecturefighting

Online Fighting Game Architecture

Hello!

I am creating a simple stickman fighting game for practice

Now, I am not sure about the smartest way to set this up If I try to make the server be incharge if everything, It may cause movement delay and by that will make it impossible to do combos

If I give the client to be incharge of the movemant, then that my cause Inaccurate sync, which isnt that big deal, but then - where do I check fir hit direction? Server or client? And if client, which one? Attacker or defender? Since I want the player to be able to block

I know its probebly can be a "perfect solution" but what do you think will be best for this type of game? Maybe you have better idea I havnt thoght of...

Thanks for taking the time to help!

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
2
Best Answer

Answer by Kiloblargh · Feb 10, 2014 at 07:03 AM

You have to actually make the game and test it on two computers on the same local network side by side. That's really the only way you will figure out how to work it. Trial and error.

I am in that stage of a 2 player game at the moment. It is a long stage...

If this game is a 2-player only game, I don't think you must have an authoritative server; there is nothing wrong with making client and server identical peers and using RPCs exclusively (with RPCMode.Others to send to the other player.) Doing it like that is going to be your fastest option. And it is surprisingly fast, like a tenth of a second. And then you can do client-side prediction, and make it seem even faster than it really is.

If I were you I would make blocking local, and make combos attacks possible based on the last echoed position of the remote player. That is, if you see them in position for a Raging Demon or whatever, you start doing it, but if they were blocking, they will cancel your attack in (2/Network.sendRate) seconds and you'll see the first two frames but that's it.

Comment
Add comment · Show 3 · 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
avatar image iNoMore · Feb 11, 2014 at 04:46 PM 0
Share

Thanks you! Where would you recommand to do the hit detection? On the side that recuves the hit? Or the striking player?

avatar image Kiloblargh · Feb 11, 2014 at 06:48 PM 0
Share

I would do it on both sides but only make the RPC'd version actually do damage; the round-trip delay to update the other player's health bar is going to be less noticeable than the lagged hit sound/ particle fx would be. An online fighting game is just never going to be as smooth as a console version; you will get occasional random 1-second lags; and you have to look at the consequences of that happening from both players pov and deter$$anonymous$$e which solution is going to make them less likely to throw the controller across the room and ragequit. And again, trial and error.

For me, "WTF! I WAS BLOC$$anonymous$$ING THAT!" case would generate more rage than the "Huh? I didn't see him block..." case.

avatar image iNoMore · Feb 12, 2014 at 03:16 AM 0
Share

Thanks a lot! You really helped me out :)

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

18 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

Related Questions

Unity networking tutorial? 6 Answers

How to make server files 1 Answer

Popular Multiplayer Framework/Services? 0 Answers

My network server doesn't work. 0 Answers

Getting server status and counting connected players from outside of the server with having the IP address 0 Answers


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