Search Unity

Fastest network engine to learn

Discussion in 'Connected Games' started by Zhatos94, Jul 19, 2019.

  1. Zhatos94

    Zhatos94

    Joined:
    Jan 2, 2018
    Posts:
    3
    Hey guys, I need some help.

    I'm developing a mobile (Android/Apple) game, which is going to be released soon. The last step needed is: server. We need a server to:

    1) Prevent cheating
    2) Send promotional offers
    3) Correctly save all players data
    4) Share records to friends

    Those are our main goals. The biggest problem is that I'm the only one who codes, so I need a fast solution to implement server side scripting, server security ( if needed? ), database. Because of Unet deprecation, I'm here to ask which would be the better solution for a game, let's say, "like candy crush": we do not have rooms like in FPSs or arena-like games, we only need client-server communication to save/retrieve data to/from server and database, essentially. So it is a 2D game, there is the classic main menu, and the play button which starts the game level ( exactly like candy crush example ), you play, there is the result panel, and you go back to main menu. I don't have network experience, but I learn quite fast. So, I'm looking for the best solution in terms of time, money, ease of use. We don't mind paying a bit for the engine ( until 300/500$ there are no big problems ). I saw the most famous are Tnet, Photon PUN/server, Mirror.

    I really don't know what to do. I would like to know if these or other/easier engines load balance traffic or I have to code everything myself. The most important thing for us is time and ease of use, we need to deliver the game ASAP.

    I really appreciate your help, and I thank you in advance.

    If the problem is not clear or you have questions, please feel free to ask. Thanks.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,974
    Networking and fast learning/development don't go together.

    I'd probably be looking at PlayFab from what you've described. Though your game, which is basically a single player game with shared data, a server isn't going to do anything as far as preventing cheating. You'd have to redesign how you want it to work so that everything is done on the server, and the client just sends inputs and displays results. In that case I'd look at SmartFoxServer, Mirror, MLAPI, and a few others. But doing it that way isn't going to fit into "deliver the game ASAP" since it will be considerably more work.
     
    Antypodish likes this.
  3. Zhatos94

    Zhatos94

    Joined:
    Jan 2, 2018
    Posts:
    3
    Hi Joe, thanks a lot for the reply!

    Yes, I expected that. But there are options for sure that can speed up progress, like the ones you said. PlayFab is really interesting, but it looks like another platform, not really some sort of unity plugin.

    The code redesign luckily is not so bad, because I designed the project for a future server implementation. I'll take a look at SmartFox and mirror I think.

    Assuming I study and develop all days, how much time could be necessary to develop the network?

    Thank you, have a nice day!
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    5,170
    For experienced person, simple implementation to existing game, probably from week to few weeks. That providing game was designed from beginning with networking in mind.

    Otherwise, is easy to spend months. Selecting framework, prototyping, debugging, adapting game to framework requirements, dealing with unexpected issues. Then more testing. And so on, and so forth.
     
  5. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    78
    Of the various standalone servers available I am mainly familiar with SmartFoxServer and I think you should give it a try, given the requisites you have posted.

    That's mostly on you. Cheat prevention is all about server side authority and validating the client input. Any solution with server side coding will do. SmartFox as additional tools such as anti-flood protection, user privileges to allow only certain users to execute certain calls etc.
    There's an integrated email sender.
    You can access local storage or database very easily.
    Depends how you're planning to share them, but I don't think there's any problem with that.

    On the server side you can write your game logic in either Java or Javascript. The details are found at www.smartfoxserver.com
     
  6. Zhatos94

    Zhatos94

    Joined:
    Jan 2, 2018
    Posts:
    3
    Thanks a lot for the replies!
    That's too much time for sure :confused: I'll probably ask someone for some help.
    This sounds very interesting! I'm going to take a look for sure :)
    Mmmh maybe I did not notice that. Could you tell me where is the documentation? Anyway, how can I send promotional offers/specific messages without having specific players' data? I'm missing something I think.

    Have a good day and thanks :)
     
  7. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    78
    I am not sure if there's specific documentation, I suppose it's found in the server side API docs. I have seen it done in one of the examples they have in the "recipes":
    http://docs2x.smartfoxserver.com/ExtensionsJava/recipes

    Without player data (such as email etc.) it's not going to be easy for sure, :) You will have to gather some if you need to send them promotional stuff. SmartFox has a couple of components for building a signup and login system that are pretty neat to use. Typically you will need a signup/login anyways to build a minimum of security in your game, so once those are in place you should be able to reach your players via email and whatnot.
     
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,974
    The biggest issue with networking, even after you have mastered your network API, is it just makes even simple systems much more complicated to implement and test, and thus time consuming.

    Take a simple example of adding a sword to your player's inventory

    Single player:
    1) Enter trigger zone of sword on ground
    2) Player clicks sword
    3) Verify sword can fit into inventory
    4) Remove sword object from game world
    5) Add sword item to inventory list

    Server authoritative:
    1) Enter trigger zone of sword on ground
    2) Player clicks sword
    3) On client verify sword can fit into inventory
    4) Send message to server that player wants to pick up sword
    5) On server verify player is in range of sword
    6) On server verify sword can fit into player inventory
    7) Despawn sword item on all connected clients
    8) Add sword item to player's inventory list
    9) Sync server version of player inventory to client

    So it is somewhat more complicated, but every step of the way you also have to add additional checks. What if the player clicks the sword twice before it despawns? What if 2 players click the sword at the same time? What if the player logs off in the middle of adding the sword to inventory? What if the player's character dies after clicking the sword but before the sword is added to inventory? None of that really applies to the single player variant of the game.

    And you have to do this kind of thing for every single interaction the client has with the server, and test every one of your fail safes. So it takes much longer to develop a networked game. I usually guestimate around 3x as long as the same game in single player.
     
    Munchy2007 and Antypodish like this.
  9. LeonardK

    LeonardK

    Joined:
    Mar 13, 2013
    Posts:
    10