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 larku · Jul 04, 2013 at 12:32 PM · networkingmultiplayermobilenetwork

Networking 2 player game - use MasterServer?

I'm just looking for advice on the best way to design the networking for my 2 player game and if it's a good idea to use a MasterServer for this.

Basically I have a game where two players play against each other in a turn based nature and as such we need to communicate the turn each player makes each shot (they take it in turns).

In case it influences your advice, I'm targeting mobile devices (Android and iOS, etc).

The high level idea is that users can request to play and they are then paired up with another player (probably in a FIFO manner).

So the mechanisms I need seem to be:

  1. Server: handle the waiting queue for players wanting to play.

  2. Server: handle 'joining' the two players to play a game.

I'm trying to see how the MasterServer provided by Unity will help here - if it's a good place to start extending (I expect I'll need to) or if I should take a completely different approach.

I expect that in each player pair one will have to be designated as the server and one as the client - I expect that some players will not be able to be a server due to NAT (or does NAT punchthrough fix this issue?) Or do I need to have some logic in the MasterServer to never match two NAT'd players (?)...

Sorry lots of questions here, I'm just looking for any insight and ideas that you may have.

I have done some searching and most resources are geared towards multiplayer games (FPS etc) and didn't relate to my problem well.

Note: I already have a VPS (Linode) that I expect to run the MasterServer on.

Comment
Add comment · Show 4
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 KiraSensei · Jul 04, 2013 at 01:05 PM 1
Share

I'm not really up to answer your question, but the only thing I'll tell you is that if you choose to use the $$anonymous$$asterServer provided by Unity to make your game, it is not a definitive solution. This exists only to test your game.

Have a look here to make your own $$anonymous$$asterServer.

avatar image larku · Jul 04, 2013 at 01:15 PM 0
Share

@$$anonymous$$iraSensei - Thanks - Yep, I already have the $$anonymous$$asterServer built and running on my own VPS. Thanks for the heads-up anyway!

avatar image Graham-Dunnett ♦♦ · Jul 04, 2013 at 02:12 PM 0
Share

Your scenario sounds exactly what the Unity networking component was intended for, and yes, use your instance of the $$anonymous$$aster Server to allow players to find each other.

avatar image larku · Jul 05, 2013 at 02:15 AM 0
Share

Thanks Graham, I don't think I explained myself well - I don't want users to have to find each other, I want this all to happen automagically at the master server end.

Also what about the issues with NAT deter$$anonymous$$ing if a given user has the capability to be a server (for the opposing client) when pairing users?

0 Replies

· Add your reply
  • Sort: 

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

17 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

Related Questions

networkdiscovery find IP of one of Devices but not connect to each other 1 Answer

Unity networking tutorial? 6 Answers

Animation & sound over network 1 Answer

UNET AddPlayerForConnection with already existing player GameObject 0 Answers

Multiplayer objects isn't equals. 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