To explain more clearly what I want to do :
### Goal :
I want to build a non-interactive combat system for FreeOrion, the 4X game inspired by Master of Orion.
The current combat system is minimal (ships fire at each other in four rounds, after each round ships that had damage superior to their hit points are destroyed).
It was planned to have a 3D combat mode to replace it, but then the dev team understood that it would pose a big problem in multiplayer, since it would force players not engaged in combat to wait for the players engaged in combat to have resolved their combat before a new turn could proceed.
So any interactive combat mode is now excluded from the game by the core design principles.
To make the combat interesting while non-interactive, my idea is to put the interactions before combat.
To get that I want to use a formation system :
- each player designs a certain number of formations (well, to be precise, formations and combat doctrines)
- each fleet chooses a formation before combat
- once combat occurs, the ship positions corresponding to the formation and the orders corresponding to the combat doctrine are executed and resolved
- after combat and end of the turn, players can look at what happened during the combat
### Implementation
I believe that formation/combat doctrine and combat log should be done on the same board.
UI
This board should be a checkerboard of (by default, but parametrable) 9 columns and 9 rows.
One player having the top 3 rows to place their ships and the other one having the bottom 3 rows (the three middle rows being no alien's land).
These rows and columns will be grouped by three ("top", "middle" and "lower" rows, and "left", "center" and "right" columns).
On the design screen :
Tokens corresponding to ships categories (not the ships themselves, since the formation is generic, not for a specific fleet) are put by the player (singular : each player designs their own formation and combat doctrine) as they wish on the three rows that are theirs.
Cards corresponding to the orders that it's possible to give (the combat doctrine) will be in a stack, I guess on the left of the screen.
Note that these cards are to be selected, not drawn (that is, the player can choose which cards he wants to play).
Also cards are not "spent" when used : if you give the "fire" order to a row, you still have the fire order available to give to other rows, columns or whatever¹.
These cards are put, each turn, either on squares of the checkerboard, on rows, columns, big rows ("top", "middle", "bottom" as per above), big columns, on the "big squares" produced by big rows and big columns (e.g., "top left" or "middle right" etc.), and special out-of-the checkerboard groupings (Species I guess, and Task Forces).
Cards are put round per round, but since they are not executed, they stay on the screen.
Nothing happens during the design phase, players just put the ships and cards.
Resolving combat :
Combat resolution will be entirely off-screen in FreeOrion as it is done server-side at the end of the turn (the global game turn, not the combat turn).
Players will only get combat logs.
These combat logs should be rendered using the same panel UI I guess.
So the mock-up will do combat resolution and combat log rendering simultaneously.
** On the Combat log screen** :
The board is the same than the design screen's one, save for the card stack (the cards used for the combat doctrine are shown on the checkerboard and the out-of-the-checkerboard groupings, but the card stack of unused cards isn't).
Ships are put on the checkerboard according to each player's formation (one player top, the other one bottom).
Planets in the system are also put on the checkerboard.
For each round there is a precise schedule of what order is executed first (movement before fire, for example).
Following this schedule step by step, all orders of the same priority are executed (in no particular order; there should be no race condition).
The orders executed are shown, and the corresponding cards removed from the board.
Results of these orders are also shown (ships destroyed, for example).
This for the four (by default) rounds.
I guess this should be done in two modes : a general animation showing the whole process, and another mode where the player clicks on a button to advance each step to the next one.
I think that's it ?
¹ Writing this makes me realize that maybe it would be more interesting to have the cards actually be spent when used; not sure about the whole consequences though, I'd have to think more about it. So for a start we'll have the cards not spent.