Search Unity

Need opinion on my network solution

Discussion in 'Multiplayer' started by yifu, Jan 4, 2014.

  1. yifu

    yifu

    Joined:
    Dec 23, 2012
    Posts:
    17
    Hi, all,
    I have been using photon cloud a lot in the past few years and I have a demo game running using photon cloud.
    Recently, I started learning learning smartfoxserver 2x and integration to mysql is so easy to do and I got my backend working with unity test client. I think photon server has the option to connect external database as well, but you have to write the piece of code, which I am not familiar with and I haven't find any good documentation on that subject on exitgames forum.

    Currently, I have 2 thoughts:
    1. Use smartfox as a login server and use it to communicate database. Once logged in, I will direct my players to photon cloud lobby and do matchmaking and let player choose their room and play the game etc. The reason I want to have this option is that I am very familiar with photon cloud and I feel like I can be much more productive with it.

    2. Only use smarfox server, but I will figure out how lobby stuff works, and how they sync stuff during gameplay, which takes some time to learn to be as productive as photon cloud.

    Which one do you guys think is better? The game I am gona make is a pvp tank game. I am planning to have 10-16 players in each "room". It is worth completely ripping out all the photon cloud stuff. I am the only one working on this project, lol, sometimes, I can be lazy. But after learning smartfox2x, it really blows my mind, I kind of wish I learnt it 3 years earlier.
     
    Last edited: Jan 4, 2014
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Based on that (and it being a pvp game) i would go for smartfox, photon server or uLink.
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,072
    Do you want a simple login-check or do you need more persisted data?
     
  4. yifu

    yifu

    Joined:
    Dec 23, 2012
    Posts:
    17
    Hi, Tobiass,
    Thanks for replying.
    I think I need more persisted data.
    A example would be, after user login, I want to give them some "extra fields" in the login response, which contains data like "has_a_special_item = false/true".
    So that I can handle it on the client side to give this player a special item or not.

    Now, for smartfox, this is done by communicating with server login extension and smartfox has a database manager which can access external database with some configuration in server admin tool.
    Is there anyway to achieve similar goals with photon server? I know it is possible because photon hosts a .NET runtime. You can use everything that .NET offers including accessing databases. If you can point me to some learning resources or maybe tutorial, it would be very helpful.

    This is complete new area for me. Smartfox has a visual tool and get me going nicely. But for gameplay stuff, I feel frustrated sometimes. I think I had better experience with photon. So if I know how to do it with photon server, I would definitely stay with photon.
     
  5. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    456
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,072
    yifu:
    As Glader points out you could access the DB from the client. You should never do this directly, though.

    With Photon "Turnbased" we are working on "WebRPCs". Basically, you can setup a connection of Photon to your own web-service and use the existing connection on the client to do calls from the client to the web-service. Photon forwards those based on JSon and HTTP (from Photon to the web service).
    You could save and fetch your own, custom data with that quite nicely and even do basic checks. It won't get visual tools but we would be happy to get feedback and know your requirements to decide what's next.

    We hope to open access in the next weeks. If that sounds ok, you're more than welcome.