feat(gui): Add Random button to LAN and Online game lobbies#421
Open
bill-rich wants to merge 1 commit intoGeneralsOnlineDevelopmentTeam:mainfrom
Open
feat(gui): Add Random button to LAN and Online game lobbies#421bill-rich wants to merge 1 commit intoGeneralsOnlineDevelopmentTeam:mainfrom
bill-rich wants to merge 1 commit intoGeneralsOnlineDevelopmentTeam:mainfrom
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. |
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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