Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Should I worry about networking early on in my games development?

Discussion in 'Connected Games' started by BattlingBacon, Jul 27, 2015.

  1. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    http://forum.unity3d.com/threads/8-brick-tanks.343771/
    Is a description of my game, in case that info is necessary. Also, I'm looking for feedback on my game in that link, so a reply with feedback there is greatly appreciated.

    So should I worry about networking now? Or later?

    Who would you recommend for a networking service?
     
  2. asperatology

    asperatology

    Joined:
    Mar 10, 2015
    Posts:
    976
    In short, worry about the features already in the Unity engine version you are using right at this moment.

    If you use tons of obsoleted network functions/methods (in which, Unity will warn you of this), and you wish to use Unity 5.1 and up, you need to start worrying about network, and start learning about how to use UNET and how to write using them.

    If you are using using Unity 5.0 and below, and you are not inclined to use the new networking features, don't worry too much about them.
     
  3. JamesPro

    JamesPro

    Joined:
    Mar 5, 2012
    Posts:
    509
    If your game is meant to be Multiplayer then yes you should add in the net code right from the start. Networking shouldn't be an after thought. If it's a Single Player game with optional Multiplayer then you could do the single player part first and then the multiplayer.
     
    StarGamess likes this.
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,433
    If you never did a multiplayer game, you should also test the game in multiplayer as much as you can. There are lots of situations you don't expect to happen, when you are used to things executing the next frame or so. Lag and variation of lag is something you should check. And you should know what happens if a player drops out unexpectedly.
     
  5. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    Tobiass, you're one of the developers of PUN, right?

    Anyway, thanks everyone for your responses! Nobody told me who they would recommend for multiplayer networking servers. So so help with that would be nice. I would assume I already know what tobiass ;) would recommend, but what about everyone else?
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,433
    @magiceel: Yes, I work on PUN and Photon. I can really recommend it ;)
     
  7. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    That was the original way I was going, when I had made this game for just myself and my friends. It was working out well. Where could I find some tutorials on PUN? Most of the script I had was just copy and paste. Also, this is probably a stupid question, but with networking, obviously you would have to store data on servers. How much data does PUN give you to store on servers? I mean like usernames/passwords for logging in, server side stuff, etc.
     
  8. EmreBgdy

    EmreBgdy

    Joined:
    Jul 13, 2015
    Posts:
    14
    Photon doesnt lets you store data. Photon receives the data from one client and shares it with all other clients.
    In example:
    photon takes the location of the client 1 and shares it with client1,2,3,4,5 to make them see you but it doesnt stores it. Its hard to explain but think photon as a gossip girl who tell every single thing that she hears to everyone but forgots them after stelling them. Hope you got it :/

    To do the stuff you mentioned u can use Parse.com(which doesnt have anough docs about unity yet and because of that reason im having very stupid problems.)

    I am working on a RPG game which u live your own life, i am using photon as a server and Parse.com as my database. If you ask me that if you should use photon, i would say yes without thinking since its really easy to use + its based on cloud + it have got a ping detection and makes you connect to the server which has less ping and all that awesome stuff.
     
    tobiass likes this.
  9. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    I get what you're saying, thanks!
     
  10. Myhijim

    Myhijim

    Joined:
    Jun 15, 2012
    Posts:
    1,148
    If you really want to get towards the base end of Networking I can highly recommend a look at the lidgren library. It is a great learning experience and will get you thinking about the best way to sync and manage packets. It comes with full source code, so if you'd like to know how the gears turn it is fantastic (Yet also a basic implementation that has been shard to be expanded upon)

    https://github.com/lidgren/lidgren-network-gen3

    However if you want a more out of the box experience you can never go wrong with Photon ;)

    Myhi
     
  11. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,433
    Photon doesn't store data by default. Instead, we develop Photon / PUN and you pick whatever data solution and community solution is best for you. There are several services, which do a great job in data storage and providing user accounts. We can't compete with those but we make it easy to combine things.

    You should take a look at PlayFab. They created a scripting interface for their services and combine it with PUN. You get user accounts, validation for purchases, in-game inventory and lots more. And you can store your data there.

    The samples are in the SDKs and PUN includes several demos in the Asset Store package. Our demos are very simple by design, so you can focus on the ideas and don't get distracted by design and game rules.

    Aside from that, we have a list of tutorials:
    https://doc.photonengine.com/en/pun/current/tutorials/photon-unity-and-networking-links

    There are also several game kits in the Unity Asset Store which use Photon. UFPS, and PlayMaker have Photon integration to name but two.
     
    Westland likes this.
  12. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    Thanks so much! I have one more question for you. (for example) If I get my game on steam, I have it ready for x amount of CCU, what would happen if 5,000 more players tried to log in then expected on the first day? Could I get a plan for photon, at least for my launch, that would increase CCU when I needed more? Or would I just have to upgrade my plan ASAP?
     
  13. EmreBgdy

    EmreBgdy

    Joined:
    Jul 13, 2015
    Posts:
    14
    Photon is a cloud(if you dont buy a master server) and you should be able to increase your ccu limit in seconds
     
  14. BattlingBacon

    BattlingBacon

    Joined:
    Apr 8, 2015
    Posts:
    32
    Thank you!
     
  15. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,433
    All subscription plans with monthly fees include "overage". This means, your concurrent player count can be bigger than your CCU cap for some time. We won't turn your players away, unless you explicitly don't want to adjust your subscription to the real demand.
    Of course, you can reduce the subscription, too.
     
unityunity