How would you design a real-time multiplayer game, detailing both the frontend state management and backend synchronization layers?