feat(gui): Add Random button to LAN and Online game lobbies - #421
feat(gui): Add Random button to LAN and Online game lobbies#421bill-rich wants to merge 1 commit into
Conversation
|
Should probably be presented differently imo, maybe as a tournament mode or something. As is it's not ideal for casual play due to host being able to re-room until they get their desired army. |
|
What are you thinking for how else it could be done? The main goal is to just skip the in-and-out. The idea was that since it just does what the game does once the match starts, you'd wait until everyone was in, hit the button, and then just play as though everyone got their factions and locations and then quit and rejoined. The host would have to either fully quit out and create a new room or set themselves to random and run again. At that point, I would think they would have just set themselves to whatever they want anyway. Happy to adjust as needed. |
Issue is that they can fill the lobby with computer slots, click random and then see how the lobby would turn out before setting everything back to "normal". Anyone who joins the lobby afterwards is none the wiser but the host has the advantage of knowing this info. |
in that case the random increment is progressed or should progress no? that way the host doesn't have information on the outcome. |
Adds a host-only "Random" button to the LAN and Online game setup screens that assigns random factions, colors, and start positions for all players currently set to "Random" or unset values.
A common way to get random factions and start positions is the "in-and-out" method: everyone sets their faction and location to random, the host starts the game so the engine assigns them, then everyone quits, creates a new lobby, and manually sets the assigned factions and positions. This is tedious and, in online lobbies, risky since getting the same group of players back together is not guaranteed. This button lets the host resolve all random assignments directly in the lobby, removing the need for the in-and-out workaround entirely and saving considerable time since the game start, quit, and rejoin cycle is eliminated.
The randomization logic mirrors the existing
populateRandomSideAndColorandpopulateRandomStartPositionalgorithms fromGameLogic.cpp:The button is disabled for non-host players. Manually chosen factions, colors, and positions are not overwritten. Team assignments are not changed.
New files:
RandomAssign.h/RandomAssign.cpp: Shared randomization module used by both LAN and Online menusChanged files:
LanGameOptionsMenu.cpp: Hooks up the Random button for LAN lobbiesWOLGameSetupMenu.cpp: Hooks up the Random button for Online lobbiesWindow/Menus/GameSpyGameOptionsMenu.wnd: Randomize button addedWindow/Menus/LanGameOptionsMenu.wnd: Randomize button addedData/English/generals.csf: GUI:Randomize -> RANDOMIZEwnd and csf files:
https://drive.google.com/file/d/1sKVIkG2xaKD4z6PKnbosr9BV1IYMOniT/view?usp=sharing
Depends on: GeneralsOnlineDevelopmentTeam/Services#13