Question about online turn based combat

I’m going to reference Magic The Gathering Arena for this question.
So I have two players on two separate devices.

In the game the main player takes up the bottom half of the screen and the opponent takes up the top half of the screen. Reference picture below

So my question is how do I make it so
on device 1 player 1 is viewed bottom of screen and player 2 is viewed as top
on device 2 player 2 is viewed bottom of screen and player 1 is viewed on top

In your code, you would have a property on your Player class that identifies if it’s the local player or remote player. This way if local player is player1, the player1’s client displays at the bottom. if local player is player2, player2’s client displays at the bottom. If the player is remote, your client code knows that that player is to occupy the top half of the screen.

1 Like