• Ending Support for AOS6
    As highlighted in our 12.10 Update notes, we will be ending support for AOS6 with the release of the 12.11 Update due to technical requirements. Those on AOS6 will need to upgrade to a device that supports AOS7 or above to continue playing DomiNations.

Uneven distribution to restore troops in barracks

Sega

Active member
Joined
Dec 5, 2023
Messages
279
Troops are lost in battle, then they are distributed unevenly in the barracks for restoration - too many troops accumulate in some with a short recovery time, while it is clearly visible that they can be distributed more evenly to optimize the total time spent on restoring troops, i.e. e. minimize idle barracks while others are busy.

BHG, who writes thats programs to you?! Low score in programming! You cannot solve the very simple task of sorting and balancing queues. The developer who implemented such solutions should be ashamed!
 

Sega

Active member
Joined
Dec 5, 2023
Messages
279
BHG, this hint to help your programmers, the Ruby (programming language) code for the sorting algorithm is a uniform distribution into 3 queues (we can assume that these are barracks, and the distributed numbers are the recovery times) (although this code can still be optimized):

# make set of "recovery time of unit"'s
numbers = Array.new(50) { rand(1..10) }

# "barracks"
set1 = []
set2 = []
set3 = []

# === start of algorithm

numbers.sort!

sets = [set1, set2, set3]

while (num = numbers.pop)
min_s = sets.min { | s1, s2 | (s1.sum + num) <=> (s2.sum + num) }​
min_s << num​
end

# --- end of algorithm

puts "barrack 1: #{set1} ::: total time = #{set1.sum}"
puts "barrack 2: #{set2} ::: total time = #{set2.sum}"
puts "barrack 3: #{set3} ::: total time = #{set3.sum}"


This algorithm can be easily implemented in any other programming language. And now, BHG, think again about it - who writes programs to you?... either your programmers are lazy to the point of infinity, or they really understand very little about programming. Agree, there is not a lot of code at all, but your algorithm for distributing into queues (barracks) still does not work correctly in the game.

P.P.S. If your programmers are not able to “invent” even such a very simple algorithm, then don’t have to wonder why the game is full of all sorts of issues and bugs that have not been fixed for a long, long time.
 
Last edited:

Garrett Haines

Approved user
Joined
Jan 23, 2019
Messages
18
Not only that but barracks undergoing upgrade still get retraining allocated, which can’t be deleted from queue and reassigned, meaning you have way less troops until upgrade finishes. Been that way for years.

Now most recent update supposedly fixed it, but castles won’t permit generals assignments still, so I don’t know if the changes took.

Cynical me guesses they couldn’t fix programming so they made total workaround instead… but still not working on my end Fully.
 

Sega

Active member
Joined
Dec 5, 2023
Messages
279
Not only that but barracks undergoing upgrade still get retraining allocated, which can’t be deleted from queue and reassigned, meaning you have way less troops until upgrade finishes. Been that way for years.

Now most recent update supposedly fixed it, but castles won’t permit generals assignments still, so I don’t know if the changes took.

Cynical me guesses they couldn’t fix programming so they made total workaround instead… but still not working on my end Fully.
The "made total workaround instead" is very well noted - they don't understand the program of the game at all, so they try to "solve" it in some workaround way.
Shame on you, BHG programmers!
 
Top