Kromster80 / kam_remake

"KaM Remake" is an RTS game remake written in Delphi from scratch.
http://www.kamremake.com
GNU Affero General Public License v3.0
361 stars 90 forks source link

Teams in multiplayer should match current alliances state #288

Open andreus791 opened 7 years ago

andreus791 commented 7 years ago

Teams and alliances are separate things that seemingly describe the same thing.

Teams are set in MP lobby and split players (hands) into allied groups (0 - independent; 1..4 - teams). Set once on game start. Teams exist only in MP. Alliances on the other hand describe hands standing towards each other and can change during the game. Alliances axist in SP and MP.

This brings some issues: 1) set teams in the lobby, then change alliance type via script. Ex-allies can still use team chat 2) it would be beneficial to be able to get players teams (PR #272, States.GetAllTeams and States.PlayerTeam), but that won't work in SP maps, as we don't have SP "teams" 3) unlike Teams, Alliances are more flexible. F.e. players 1234 are allied (team 1), players 5678 are allied (team 2), 1234 and 5678 are enemies, but what about player 9 who is allied with all players?

Kromster80 commented 7 years ago

We can not properly map alliances back into teams, due to described flexibility issue.

Possible solutions, as I see them, are:

lewinjh commented 7 years ago

I kind of agree with Krom, even in MP a special or coop map can use custom non-team alliances (like you described with player allied to all). But we do display teams in the in-game MP players list, so I don't think we can completely scrap the idea once we leave the lobby.

Regarding #272, maybe just add "MP" to those team functions and write in the description that they are only valid for MP and will return -1 otherwise?

Kromster80 commented 7 years ago

We need to figure out why "we do display teams in the in-game MP players list". I have a suspicion that this info is brought from the lobby, but serves no help during the game. Perhaps players would like to see actual alliances state in there too?

Problem is, Teams are much easier to understand than Alliances, since Teams do not deal with non-symmetrical and inconsistent allies (one mentioned above).

lewinjh commented 7 years ago

Teams are much easier to understand and for 99% of cases they explain alliances used in the game. Showing alliances requires an 8x8 table, where as teams is just 8x1.

reyandme commented 7 years ago

As flexibility issue is quite rare (as @lewinjh mentioned - 1%, not more), and considering Team are much easier to understand, I think we can assume that teams are a group of hands where all members are allied to each other and not allied to any other hands. When flexibility issue happens then we could think there is no team.

offtopic I was doing team separation in replay/spectator dropbox and got same issue - how to understand teams when it comes to replay for MP game - I made it as I described earlier, and think its good enought. So for 'normal' MP games it will show exactly same teams as they were in the game (except team number, which is not important) and for some rare special games - it will not show teams at all.