I'm making a 1v1 game with each player at one end of the screen. The game is an online client-server game. I would like the local player to be on the left side of their screen and their opponent (the remote player) on the right side. Similar to Clash Royale where the local player is always on the bottom and their enemy always on top.
What is the easiest way for me to accomplish this?
Some solutions I've thought of so far:
- The server checks every time it sends data back to the players that if it's sending the data back to player 2, it flips it before sending it back. I don't particularly like this solution because it will greatly complicate the code, increasing the chances of bugs, and make it less flexible / re-usable in the future.
- The client checks if it is player 2 and flips the data it received back from the server if it is. I don't like this solution for the same reasons as above.
- Some camera tricks I don't know about.