Search Unity

Keeping Local player always in the botom of the map in an Isometric Multiplayer Game

Discussion in 'Scripting' started by Arsinx, Feb 20, 2019.

  1. Arsinx

    Arsinx

    Joined:
    Apr 14, 2014
    Posts:
    55
    Im making a 2D isometric multiplayer game similar to clash royale, I want to keep the local player always in the bottom half of the map. and the remote player in the top half. so basically each of the player is playing in the bottom half, Since it is a multiplayer game they cant both actually be in the bottom. I tried to acheive this by flipping the camera perspective camera 180 degress for second player but the sprites and the enviroment does not appear correctly and in the right perspective then, any suggestions on how I can go about acheiving this.
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    If you're speaking about system like a Clash Royale, where local player is always at the bottom and remote always at the top of the screen, then you probably want two different battle fields with isometry. I my fighting game i was using two different camera and UI setups for local player to stay in the left. It's not that hard to achieve this in 3D, but for 2D you need to project your game state to the scene in different manner for local and remote players or you need to rearrange the scene for the second player.
     
  3. Arsinx

    Arsinx

    Joined:
    Apr 14, 2014
    Posts:
    55
    Yes thats exactly what I'm Talking about, my game is entirely in 2D, I have static background Image, Scene objects are jsut sprites placed in the persepective, theres a tile map over it but I mainly just use it for collisions and event triggers, and i have 8 Facing Sprites for all Characters in the game.

    Can you please give me more details on how I would acheive this, as In how to exactly re-arrange the scene for the remote player without breaking any of animation and multiplayer logic.
     
  4. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    Well, i can't advice you on how to exactly rearrange your scene. I just don't know it well enough. In my game i had a model separated from view. And when next model state was ready, wich happens every frame, the system was applying local player state to his view - left fighter and left part of the UI and remote player state to right fighter and right part of the UI. That's the basic idea on how I've solved the problem.
     
  5. Arsinx

    Arsinx

    Joined:
    Apr 14, 2014
    Posts:
    55
    I've added a picture to show how the UI looks right now, I want the local player to always be in the bottom.
     

    Attached Files:

  6. Arsinx

    Arsinx

    Joined:
    Apr 14, 2014
    Posts:
    55
    Guys any suggesiton's on how to do this as I am really stuck with this here and would appreciate any help. it seems like such a small problem and has become a major headache.