Search Unity

What is the SIMPLEST to use turn based framework (with database)?

Discussion in 'Multiplayer' started by Dasveloper, May 11, 2017.

  1. Dasveloper

    Dasveloper

    Joined:
    Jan 7, 2017
    Posts:
    8
    Im creating a mobile turn based multiplayer game that needs a persistent database. The simplest way to think of the game would be like the battle sequence of the Gameboy Pokémon series. It will need matchmaking and its turn based where both "trainers" are real people battling each other. The match will need to be played in one session, forcing you to play within X seconds or lose.

    I need to save the Pokémon collected, levels of characters, items/pokemon owned, etc.

    A feature that I need to integrate is a database full of "unique" items that can be awarded to players, obviously players should not be able to access this database or cheat and get these items.

    The only stipulations I really have are that it allows a persistent database, has anti cheat functionality, and most of all is simple(relatively speaking) to set up?

    Price is not an issue, and I have plenty of MySQL/php knowledge if that helps.
     
    Last edited: May 11, 2017
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    It sounds like a single player game where you want to store inventory remotely rather than locally. You can just implement everything in PHP/MySQL and make calls to your server with HTTP requests. I'm sure this would be the simplest for you to implement.

    https://docs.unity3d.com/Manual/UnityWebRequest.html

    anti-cheat functionality would be how you design your implementation, not what API you choose, and would be true of virtually any networking scheme.
     
  3. Dasveloper

    Dasveloper

    Joined:
    Jan 7, 2017
    Posts:
    8
    Sorry I realize now I was unclear. It is actually multiplayer where people can battle each other turn based (only multiplayer during the battles no wandering around the world or anything). Would you still recommend HTTP requests? Maybe PUN for the battles and HTTP to save results?
     
  4. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    be more specific when you say turn based.

    for example, some asynchronous turn based games allow the player to take days to make their turn, which is perfectly acceptable for a plain old web server.

    other turn based games only allow the player to have a very short period of time to take a turn and typically are played out over the course of say 2-20 minutes. for these types of games, you may want to use a socket connection via photon or unet because you'll probably be bouncing messages around a lot.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    What robochase said. Your choice in networking API should really depend on how your game works. For example, a poker game is turn based, and probably would work well using UNET's messages system but not the full HLAPI, so you might do well with a NetworkServerSimple. Other types of turn based games will have completely different requirements, like a clone of the original X-Com game for example. From your description it is still not clear what your networking requirements are going to be.

    How you're going to connect players together is going to be another primary concern. PUN is set up for it, Unity Multiplayer is as well.

    Yes you can store results via HTTP and battle other players using a different API.
     
  6. jaybdemented

    jaybdemented

    Joined:
    Sep 2, 2013
    Posts:
    112
    Your best bet is gamesparks or playfab.
     
  7. Dasveloper

    Dasveloper

    Joined:
    Jan 7, 2017
    Posts:
    8
    Okay I edited the details of the post to include more information, I was trying to not make many stipulations because I was hoping there was a go-to simplest but I realize I made it more difficult. I just want a turn based, kept in a single session game (i.e. time limit between turns), allows server side/authoritative logic, access to make my own database tables, and simple-ish.

    EDIT: on second thought, I'm just going to try for PHP/MySQL, it's the only one I understand fully. I'll have to adapt my game around it but it should be fine. This way I'll have full control over my data. Thanks!
     
    Last edited: May 12, 2017
  8. TomPo

    TomPo

    Joined:
    Nov 30, 2013
    Posts:
    86
    if you don't need physics on the server side you should consider SmartfoxServer 2x. (SFS2x).
    Used it for some card game approach and is quite nice.
     
  9. Allsaveone

    Allsaveone

    Joined:
    Jan 22, 2013
    Posts:
    8
    Hey Dasveloper!

    You can find an overview of using Gamesparks for turn based games here. Gamesparks challenges are perfect for turnbased games, both live and asyncronous, and are built ontop of our powerfull NoSql/Mongo data base.

    Read through those and if you have any further questions the support team will be happy to answer them for you.

    Regards,
    -Dave