I'd like to ask for some advice on how to design input mapping more reasonably in a multiplayer online game
I'd like to ask for some advice on how to design input mapping more reasonably in a multiplayer online game. Assuming my game supports up to 4 players, who might be playing on 4 different computers, A, B, C, and D. Here are some possible scenarios: Scenario 1: A: p1, p2; B: p3, p4. Scenario 2: A: p1, p3; B: p2; C: p4. Scenario 3: A: p1; B: p2; C: p4; D: p3. Scenario 4: A: p1; B: p2. Scenario 5: A: p1; B: p2; D: p3, and so on... I don't think it's very reasonable to hard-code all move actions (w, a, s, d) for players p1 to p4 in the game, like p1_ui_up, p1_ui_down, p1_ui_left, p1_ui_right; p2_ui_up, p2_ui_down, p2_ui_left, p2_ui_right; p3_ui_up, p3_ui_down, p3_ui_left, p3_ui_right; p4_ui_up, p4_ui_down, p4_ui_left, p4_ui_right. Is there a more reasonable approach?