Search Unity

Unity server for multiple games?

Discussion in 'Multiplayer' started by dudinirgad, Jul 19, 2017.

  1. dudinirgad

    dudinirgad

    Joined:
    Jul 19, 2017
    Posts:
    5
    I want to have an android app with a few 'mini games' each of them is a multiplayer game.
    I'm thinking on creating each client in a seperate unity project and converting it to a library, So I will just call a game when needed from my Activity for example. (does this make sense so far? )

    And I want a server to handle all of those small games.

    Can I build such a server with Unity?

    And more interesting than that, I'm interested in creating my own custom server,
    hopefully in c#, Is there any example on how to do it? or a library you know of I could use?
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Doubt creating different Unity projects would really work for the games. Don't see a point in it either to be honest.

    As for creating your server app, yes you can. You can use standard .NET sockets, or use libraries for networking. Depends on your game. Fast paced, go for a UDP library. And as for turn based / non session. You should probably go for TCP.
     
  3. dudinirgad

    dudinirgad

    Joined:
    Jul 19, 2017
    Posts:
    5
    1. Is there any example or tutorial on how to send and recieve custom packets in unity?
    connect thru tcp/udp, Just to get the feel of the flow.

    2.
    Well I need a way to import different mini-games into my app, that's the only way I thought of,
    the app itself is not built with unity only the games, (and the app itself should only open a game when a condition happens.. I mean it's not like a 'game picker' and you just play) Have any suggestions?
     
  4. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    http://lmgtfy.com/?q=C#+Sockets

    Why don't you just make it one big game instead of having them in different parts. And why are you using different engines for different game modes?
     
  5. dudinirgad

    dudinirgad

    Joined:
    Jul 19, 2017
    Posts:
    5
    Because it's an app not a game, it has a purpose.. the games are just part of it's functionality,
    the games are ment to be short. like 1 minute max.. for a game.

    in my app both users can 'battle' over something, When I say battle I mean I open a random minigame for them..
    setup it's server and they play, the winner of the minigame wins the pot.
     
  6. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    That's VERY platform specific and something I can't help you with. But as for networking. Sockets are prolly the way to go if it's not Realtime. For realtime. I would go with a library.