Baret / pltcmd

Control military units only with your radio
MIT License
4 stars 0 forks source link

Streamline game start #166

Open Baret opened 2 years ago

Baret commented 2 years ago

Basic idea/big picture The game setup and startup is a mess. It should be streamlined and cleanly designed both UI and code wise.

Details From the main menu you should be able to get into a "start game" screen. There you can configure:

Technical background I imagine to have a Game object. It is put together after the player clicks "start game" and contains... well everything in the running game:

Regarding options: There are 2 kind of options (right now we only have global GameOptions): Options regarding the local client/player and game options regarding the rules of the current game.

How I imagine the setup of a Game: The "create game" UI might use a mutable PreparedGame (or something) model. It always contains a valid set of properties to create a game: a map seed or loaded map, the factions, maybe GameOptions. Upon clicking "start game" an immutable Game is created that immediately starts. The UI then switches to the GameView showing the Knowledge of the HQ of the player faction (which might come in another issue).

Core of this issue In this issue I want to at least have some straight way to create and start a game instance. One object that contains everything we need that is being given to the UI in a sense like "here GameView, display this game".

Related issues/Prerequisites When completed, this issue might render #153 obsolete.

github-actions[bot] commented 2 years ago

Branch feature/issue-166-Streamline_game_start created!