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
2
Question by lvictorino · Sep 04, 2012 at 12:40 PM · mobilenetworkstrategy

Network strategies for smartphone games

Hello there,

I am working with Unity for several months now, and I am finally working on the network part of my game. As I discover the common trap linked to network development (NAT and server reachability...) I wonder what is the best (or at least, the most common) strategy for a multiplayer game on smartphones.

The common strategy for PC/Mac games is to allow players, via an option pannel to configure their connectivity options. Also the game often warn players when connectivity is bad so they can configure their routers or their computer to play. Then it's easier for developers to build up a p2p communication between players thanks to option pannel and the computer nature.

But you can't ask players to configure their router or some other physical device when they are playing on a phone right? I mean, as long as you can play via 3G or Wifi and don't have a clue about your connectivity options (when you are using a public wifi access for example) you often can't modify gate access or stuff like that to enhance network reachability.

The few test I've done on my game (helped with some friends) led to complete connectivity failure due to NAT. As my phone uses wifi I'm not sure if ports are reachable or if my router allows NAT connexions because I'm not always at home, using my own wifi (the one I love, the one given by a well configured router).

So how do "real" games do stuff like multiplayer games on mobile? Is the most common solution to have a dedicated server reachable by everyone everywhere? What to say to players (who probably have bought a multiplayer game) when they actually can't play with others?

Comment
Add comment · Show 1
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 lvictorino · Sep 05, 2012 at 01:11 PM 0
Share

No, guys, seriously what is your strategy when you work for mobile phone...?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by dscroggi · Sep 19, 2012 at 12:55 PM

Unity networking is pretty solid for small multiplayer, which is what it's designed for. Of course if you want hundreds of users you would need to go with an out of box solution like Photon, Smartfox, or roll your own. If you're designing a session based game with 4 users like Castle Crashers it would work fine. I've never had a problem being disconnected or whatnot and generally it connects on the first try with no issues. Try the Ultimate Networking package on the asset store, that did the trick for a small multiplayer game.

Comment
Add comment · Show 4 · 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 lvictorino · Sep 24, 2012 at 06:32 AM 0
Share

Do you use this specific package or every of your games work perfectly find without it?

avatar image dscroggi · Sep 24, 2012 at 07:53 AM 0
Share

I've used built in Unity networking for three games now. I wouldn't say any networking solution is perfect, but it works well enough. Depending on the method you use, some work better than others. I used a matchmaking system which produced a few problems due to the low number of connections. A lobby based system where players choose from a list of existing games manually may not have the same issues.

Anyway I'm working on a fresh solution now using .Net sockets. If you want a copy, I can e-mail it to you. It has semi-functional chat and position updates in a persistent world setting.

avatar image lvictorino · Sep 24, 2012 at 07:57 AM 0
Share

But, do your games run on smartphones? I mean... with no NAT troubles at all?

avatar image dscroggi · Sep 24, 2012 at 08:59 AM 0
Share

Yes, it does work. Here's a video of the game I'm referring to running on a smartphone, although it is not actually a multiplayer session.

http://www.youtube.com/watch?v=gSfZAwtjtnY&feature=plcp

avatar image
0

Answer by Kiloblargh · Sep 05, 2012 at 05:14 PM

Buy Pro, then get Photon Cloud. They don't like to publicize this fact but built-in internet multiplayer on iOS/Android with Unity just plain doesn't work and making it work has never been a high priority. If it was, the Social API would already support GameCenter matchmaking.

It's also the reason why the $400 version of Unity iOS does not include use of System. Net but the $3000 version does.

Comment
Add comment · Show 1 · 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 lvictorino · Sep 05, 2012 at 08:50 PM 0
Share

According to your answer there is NO WAY one can make a cross-platform multiplayer game using Unity without suffering from connectivity issues without using a third party like Photon Cloud ?

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

10 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

Related Questions

Is this possible to make virtual host in real server? 0 Answers

Backend solution for asynchronous game 1 Answer

Unity knowing if connected to cellular not WiFi 0 Answers

Can't access "NetworkServer" 0 Answers

Screenshare to mobile device 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