Search Unity

Need help with my first multiplayer game

Discussion in 'Multiplayer' started by TheCookieNine, Apr 9, 2021.

  1. TheCookieNine

    TheCookieNine

    Joined:
    Oct 17, 2018
    Posts:
    1
    Hi,

    After days of research and endlessly watching youtube multiplayer tutorials Im still as lost as when i started. Therefore have I come here in hope that you guys can help me!

    I've made a game where you get different kind of puzzles, and you as a player need to solve the puzzles. I want to turn this into versus game (fastest player wins) so you can challenge your friends.
    For the first draft I just want people to match up with friends or a random, and basically give each player the same puzzle but still have their own board. When both players have completed the puzzle I want it to compare the time and the game declares a winner, and they can start a new game if the want.
    Can you guys give me some advice in what multiplayer & Networking (Or is this even needed?) is best option and it would be very appreciated if you have guides or videos about this.
     
  2. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    207
    IMHO the easiest way for you to get started with this is to use PUN2. MLAPI and Mirror are perfectly acceptable options but for starting out you will have the easiest time creating and joining others using PUN2. PUN2 also has easily integrated text and voice chat which is nice. Again, just my opinion, any network option is viable for what you want to do here.

    For your game basically what you could is wait for all players to load the puzzle, send a network event that starts a timer and allows the players to begin solving their puzzle. When one player completes it they send another network event to everybody that ends the game, or just sends their time if you really want to wait for everyone to finish.

    That obviously has no cheat prevention, I wouldn't suggest worrying about that if this is your first game. Good luck!
     
    TheCookieNine likes this.