Improve production queue management

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Improve production queue management

#1 Post by Oberlus »

When playing intense multiplayer games where you need to get the most out of your industry, current queue management is cumbersome. The three main issues I have identified:
  1. You need 7 troop ships and can't make a 10 batch because you can't spend more PP than the strictly necessary: then you have to add at least two batches (e.g. 1 4x + 1 3x).
    If you also want the troops to pop up at the same time (e.g. because you want to use the "rally to somwhere" but be sure they arrive to destiny at the same time): then you have to watch their progression and reorder them or pause one to ensure simultaneous completion.
  2. You want to keep a certain ratio of ship designs (e.g. 1 cannon, 1 bomber and 3 chaff): then you have to add one batch for each design, carefully set their sizes to ensure all of them get PP on each turn, and watch their progression to reorder or pause some batches, or add new smaller batches for the design that is dragging behind, or change their size. And this goes on for the whole game (I mean, it is worse than previous point issue).
  3. You have enough PP to build 10x ships but you want to make sure you get at least part of your batches in case your PP supply gets cut: you must add 10 1x batches instead of 1 10x.
Mind my lack of English (or any other language) terminology for graphical stuff below.

Solution for issue 1: change the drop down menu with fixed numbers for the size and repetition fields for an editable box with the up and down arrows, same we have to set (e.g.) number of systems per galaxy at game creation (that can be affected by the mouse wheel). Also, make it show "infinite" symbol when the player writes down or rolls the wheel to a number bigger than 99.

Solution for issue 2 (not that easy): Allow the player to drag and drop ship designs into an already present ship design batch, which will create a "composite batch" showing the two (or more) ship designs in the production queue rounded/enclosed by an extra box and preceded by a small tittle line with the wording "Composite batch" (or alike) and the size and repetition numbers.
The player can then move the whole composite batch up and down in the queue by dragging the composite batch title, or right-click in that title to access the common options of "move to top", "pause", "disable stockpile extraction", "remove", etc., and can remove or add ship designs into the composite batch as would be done with normal batches (drag and drop into the batch, or right-click on a item within the batch to remove it).
The items within the composite batch have the exact same appearance and functionality than the regular batches: repetitions, size, ship design name, and progression. Repetitions might not be a good idea for the items within the composite batch, I'm unsure. But size (x1, x2...) is important so that one can ask for 1 cannon + 3 chaff, etc.
The PP that get invested into the composite batch are evenly distributed among all the ship designs.
The minimum turns for all ship design within a composite batch must be equal to the maximum of all of them, so that all the ships in the batch are finished at the same time.

//Edit
Tentative mock-up for the composite batch thingy:
composite_batch_mockup.png
composite_batch_mockup.png (43.08 KiB) Viewed 5272 times
Equation for PP distribution among items in the batch (if I got it right):
Ai = min(A*Pi/P, Pi/Tm)
where
A is total PP that can be allocated to the batch in the production queue
Pi is PP to build item i (i=1..N), considering size of item i.
P = Sum {i=1..N} Pi, is total PP of all N items in the batch.
Ti = minimum turns to build item i
Tm = max(T1, ... TN)
//


Solution for issue 3 (even trickier): add a toggle somewhere in the (composite) batch items to enable/disable automatic split of a batch, that work like this: for batches of size>1 (x2, x3...), if PP invested are not enough for full size, split the batch into two, one with size for which PP invested are enough to go at max building speed, and one batch for the remaining size.
This might be rather problematic, and I would say it is not worth trying. Like saying "Are you annoyed because someone cut your supply lines and screwed up your production timing? Be careful next time and protect your supply lines better"


Now, let the debate begin and I'll open feature requests for each one once debate is settled.

ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Re: Improve production queue management

#2 Post by ThinkSome »

+1 from me.

(1-2) Was very painful during the 5 minute per turn test game, when I wanted to send warships to 2 border system to prevent the AI from wrecking me while I was asleep.

1) Perhaps a logarithmic slider + entry box?

2) I don't know how the production queue is implemented, but if it is implemented as a list of objects, then you can make a batch object that derives from the normal queue one and just reimplement rendering for it. The PP should be evenly distributed, yes, but only when all things within the batch have the same turns to finish. E.g. if one would have a colony ship together with a 2 turn scout, they would want all PP to go into the colony ship.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#3 Post by Oberlus »

ThinkSome wrote: Mon Apr 13, 2020 12:28 pm1) Perhaps a logarithmic slider + entry box?
Could you elaborate or point to an example?
The PP should be evenly distributed, yes, but only when all things within the batch have the same turns to finish
Oberlus wrote: Mon Apr 13, 2020 12:13 pm The minimum turns for all ship design within a composite batch must be equal to the maximum of all of them, so that all the ships in the batch are finished at the same time.
So that if you have a chaff design that need 2 turns minimum, and a stealth ship that takes 8 turns, the UI should automatically up the minimum turns to finish of the chaff ships to 8 turns.

Or just adjust how the PPs are distributed: so if you have 5 chaff ships (5 x 5 PPs per turn x 2 turns = 50 PP total) and an armed titan hull (1 x 100 PP x 8 turns = 800 PPs), and the composite batch is getting 100 PPs per turn, the 5 chaffs should get 100*50/850=5.88 PP per turn and the titan 100*800/850 = 94.12 PP per turn, and they all will be completed at the same time after 9 turns.

ThinkSome
Psionic Snowflake
Posts: 460
Joined: Sun Mar 29, 2020 11:13 pm

Re: Improve production queue management

#4 Post by ThinkSome »

Actually the better word would be exponential, so that the adjustment increases exponentially as you move the slider to the right (instead of linearly as with normal ones).

That PP distribution does not take into account changes in production output. Distributing PP like I said could allow them to finish in 8 turns if production (unexpectedly) increases.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#5 Post by Oberlus »

ThinkSome wrote: Mon Apr 13, 2020 1:30 pm That PP distribution does not take into account changes in production output. Distributing PP like I said could allow them to finish in 8 turns if production (unexpectedly) increases.
Example, please, or I think you are wrong.
If PP invested change (that 100 PP in my example), the formula still applies (change the 100 to whatever). The point of the formula is not to get a steady and constant supply of PP but to ensure that the percentage of completion that each part of the batch gets is the same (the formula above lacks the clause to control maximum per turn).

Heracliton
Space Floater
Posts: 30
Joined: Wed Apr 13, 2016 12:57 pm
Location: UK

Re: Improve production queue management

#6 Post by Heracliton »

@Oberlus:

"Solution for issue 1: change the drop down menu with fixed numbers for the size and repetition fields for an editable box with the up and down arrows, same we have to set (e.g.) number of systems per galaxy at game creation (that can be affected by the mouse wheel). Also, make it show "infinite" symbol when the player writes down or rolls the wheel to a number bigger than 99."

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This. Long overdue IMHO.

Could such a code change be applied to map scale? The jump from 200uu to 500uu in a single step (depending on scanner tech level) is ridiculous - have a drop-down 1 to 99 x 10 uu?

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#7 Post by Oberlus »

Updated OP with composite batch mockup and PP distribution equation (both tentative).
The Silent One wrote:...
Poke!

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: Improve production queue management

#8 Post by The Silent One »

Oberlus wrote: Mon Apr 13, 2020 6:47 pm
The Silent One wrote:...
Poke!
Huh? :o
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#9 Post by Oberlus »

The Silent One wrote: Mon Apr 13, 2020 8:34 pm Huh? :o
How are you? Got time to sink into this stuff? :D
Or give opinion on whether it is feasible (graphics-wide).
I guess implementation of internal mechanics won't be yours to decide or make, but still.

User avatar
The Silent One
Graphics
Posts: 1129
Joined: Tue Jul 01, 2003 8:27 pm

Re: Improve production queue management

#10 Post by The Silent One »

Oberlus wrote: Mon Apr 13, 2020 8:59 pmHow are you? Got time to sink into this stuff? :D
'Fraid I will be quite busy for the next couple of months. The idea sounds good though, and if someone takes the effort to implement it, I will supply graphics as needed.
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Improve production queue management

#11 Post by Ophiuchus »

I think i like the batch idea. An extension would be collapse/expand for batch contents.

Not completely sure about PP distribution in a batch though - there are multiple options which correspond a bit to stockpiling:
  • linear distribution (i think that is what you intended) - this is probably the most sane. If you have a design with 10turns minimum all designs in the batch progress 10% every turn.
  • build what you can (put as much PP as possible into each item) - use do not need your PP right now, but in a few turns
  • delay production as much as possible: synchronize min turns. e.g. if the fleet has 10turn designs and 3turn designs, build 7turns only the 10turn designs, then build all designs as once.
Linear is KISS and the others would adress nanomanagement issues. With "nanomanagement" issues I mean the options would solve micro (timing of spending PP) issues (GOOD) but the UI cost is probably not worth it (BAAAD).
Last edited by Ophiuchus on Tue Apr 14, 2020 9:15 am, edited 1 time in total.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#12 Post by Oberlus »

Ophiuchus wrote: Tue Apr 14, 2020 9:01 am I think i like the batch idea. An extension would be collapse/expand for batch contents.
I opened an issue for it. I'm adding your comment there.

And another issue for the numeric spinner for repetitions and size of batches.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Improve production queue management

#13 Post by Ophiuchus »

Some more ideas for the batch.

Produced batch gets its own fleet which includes all and only the ships from the batch; you can set the (base) fleet name already in the production queue (a batch number will be added for repetitions). Batch can get a fleet order (target, stockpile enable, fleet focus (active/passive..),... ).

UI: batch gets repetition (and maybe amount), batch item gets amount

UI: batch item ordering - either alphanumerical, or highest PP cost items first (no manual sorting)

UI: batch mouseover shows fleet stats

UI: condensed view. you can have two items in the current space of one item showing icons left or right. turns and completion of items are not important in condensed view (with linear progression).

UI: collapsed view: only one line for the batch is shown, uncollapse if you really need the info what is in your batch.

As batch has already a meaning in the code, we should find a different name for the feature. E.g. "fleet production item"
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

User avatar
LienRag
Cosmic Dragon
Posts: 2148
Joined: Fri May 17, 2019 5:03 pm

Re: Save Research order for reuse?

#14 Post by LienRag »

Oberlus wrote: Sun Jan 30, 2022 10:28 am Composite batches of ships in production queue, https://github.com/freeorion/freeorion/issues/2855
UI-wise, I'd say these batches would be prepared in another panel ?
Like in a tab in the design panel where you can build batches from the available designs and give each batch a name ?

Then in the production queue you'll just have the "xxx batch" to select.

User avatar
Oberlus
Cosmic Dragon
Posts: 5715
Joined: Mon Apr 10, 2017 4:25 pm

Re: Improve production queue management

#15 Post by Oberlus »

That's an option.

I myself prefer to do the management in the production queue:

- Add to the production queue the different ship designs you want to include in a batch (you can set now how many of each design or do it later).
- Drag&drop one of the desired ship designs in the queue into another, creating the composite batch, and add the rest of ship designs to the composite batch.
- Set number of repetitions of the composite batch, and maybe alter the amount of each ship design.
- Optionally, right-click to save the composite batch as another producible item (into category Ships).

Post Reply