Incidencia #42175

For human player, units are "activated" in a random order. Next unit should be the nearest on the same continent

Abrir Fecha: 2021-05-04 18:04 Última actualización: 2021-05-15 22:54

Informador:
Propietario:
(Ninguno)
Tipo:
Estado:
Open
Componente:
(Ninguno)
Hito:
(Ninguno)
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Ninguno
Fichero:
Ninguno

Details

When it is my turn (as a human with gtk3.22 client) , active units show up in seemingly random order. On big maps with many units this is very confusing and frustrating, and the map moving all around with autocenter nearly makes me sick :)

We have time as it is during human turn, so we could check for the nearest unit on the same continent, then pick next continent ? (it may cost several milliseconds !)

I don't know if it is on client or server side. I can try to fix this , but i need some clue for starting point

Ticket History (3/16 Histories)

2021-05-04 18:04 Updated by: alain_bkr
  • New Ticket "For human player, units are "activated" in a random order. Next unit should be the nearest on the same continent" created
2021-05-04 18:15 Updated by: alain_bkr
Comentario

answer to myself , it would be good enough to have :

select active_human_units
order by continent, x, y;

or simply (for including sea or air units) , ordered by x,y

(Edited, 2021-05-04 18:19 Updated by: alain_bkr)
2021-05-04 18:29 Updated by: cazfi
Comentario

Reply To alain_bkr

but i need some clue for starting point

Quick grep & source reading shows find_best_focus_candidate() as a potential starting point. ( http://files.freeciv.org/doxygen/master/html/control_8c.html#aede9b43c8abba0d490d1539c97658e01 )

(Edited, 2021-05-04 19:33 Updated by: cazfi)
2021-05-05 17:19 Updated by: alain_bkr
Comentario

Thanks for the function and the link.

1/ it seems to be done like what i asked for, in two rounds : a first one for idle units, then for waiting units.

(btw i understood that what is done is mathematically correct, but a human brain does many more things to find "best" nearest unit, something like treat a zone, then the nearest zone, using spatial considerations, like U-shape , nearby island...)

2/ I still believe there are cases where focus jumps to another place, and come back later to the first tile.

  • It is a feature when a unit is "waiting"
  • I a 99% sure there are some cases that i fail to reproduce from saved games. (i guess the order may not be the same after reloading)

I am searching around units on boats (who auto-sentry on loading) , workers just finishing some activity, unit waiting (a noticed a difference when pressing key-w : we don't have a question-mark near the unit as what happens in gtk clicking on wait in action-popup (attack , wait ...) )

2021-05-05 18:08 Updated by: kvilhaugsvik
Comentario

Reply To alain_bkr

(a noticed a difference when pressing key-w : we don't have a question-mark near the unit as what happens in gtk clicking on wait in action-popup (attack , wait ...) )

Intentional. A unit that has stopped next to an eneemy city to wait for you to select the action can be killed by enemy units in that city. This is also why units with an action selection dialog has a higher priority in the focus queue.

2021-05-08 23:46 Updated by: alain_bkr
Comentario

I have observed (100 % sure) a case, where i unload an ingeneer, then the focus goes far away, and in the end come back to unload a marine troop.

I believe that focus should be geographically ordered, and nothing else. Maybe show the soldiers first, but before moving elsewhere we should move other units from the same tile (o decide to make them wait until the end of the turn)

Ingeneers, explorers, diplomats and boats are part of the attack , the soldiers are only the tip of the iceberg.

Also i noticed that something autocenter on the last moving unit (like boat Going somewhere) , and the focus stay there, but the first active unit is not this one. So i need to press C to center the map on the active unit. This happens during the very weird time interval when the player thinks he can do some things, but it is not the case, because AI have not yet finished their turn. This add to confusion

(Edited, 2021-05-08 23:47 Updated by: alain_bkr)
2021-05-09 13:00 Updated by: cazfi
Comentario

What is the order *within* the preference queue? I don't think it would be that bad if there was a one big jump per turn when switching from preference queue to other units, but it might be that focus jumps all over the place while going through the preference queue.

2021-05-09 16:38 Updated by: chippo
Comentario

Reply To alain_bkr

When it is my turn (as a human with gtk3.22 client) , active units show up in seemingly random order. On big maps with many units this is very confusing and frustrating, and the map moving all around with autocenter nearly makes me sick :)

For this and other reasons I have autocenter on focused units off. My main reason is that after sending a discoverer to un-fog some landscape, I want to think and act on the stuff if has un-fogged immediately, rather than leaping to the other side of the world. Then, if there is something to act upon, I'll do it by awakening some units, or building a new something. If there is nothing to react to, I press 'c' to center on the focused unit.

With the frustration of autocenter off, you'll see that the seemingly random order is not so random - like a transport and it's escort will always be called together (though sadly, the escort first rather than the transport, but that is easy to rectify with a quick mouse maneuver).

2021-05-10 16:28 Updated by: alain_bkr
Comentario

An other observation about focus movements :

When a settler build a city the city-control-box opens, but meanwhile the focus moves away to the next military unit, even if we have other non military units near the brand new city (workers ...)

2021-05-10 17:54 Updated by: chippo
Comentario

Reply To alain_bkr

When a settler build a city the city-control-box opens, but meanwhile the focus moves away to the next military unit, even if we have other non military units near the brand new city (workers ...)

Ja, but if you have autocenter-on-focused-units off, when you close the city dialog, you are still viewing the map around the city and can choose to select workers ...

2021-05-12 04:21 Updated by: alain_bkr
Comentario

1/ i did unselect autofocus on units , this solves the problem with cities.

2/ Units are still selected on a very weird order

  • a transport boat in a city, then go away, and last come back to the first city for an engineer.
  • a spy in a fortress (who was sentry with an alpine troop n order to protect nearby worker), he becomes active as an enmy comes near. Then the focus goes elsewhere and not to the alpine troop on the same tile ! later the focus comes back to the worker , and last to the alpine troop!

3/ i have other examples, a heavy soldier, then go away, then come back to an alpine troop just near the first one.

I believe there is something broken.

2021-05-12 19:47 Updated by: alain_bkr
Comentario

Even worst : I have a pile of tank + spy for an attack . They are not sentry, i wanted to see them each turn until i have enough units on the tile.

I send the spy, then 2 tanks , then the focus goes away, even if there are other ready tanks on the tile.

2021-05-12 19:51 Updated by: cazfi
Comentario

Reply To cazfi

What is the order *within* the preference queue? I don't think it would be that bad if there was a one big jump per turn when switching from preference queue to other units, but it might be that focus jumps all over the place while going through the preference queue.

Nobody answered this, but the problems reported sound like they could be that within the preference queue the geographical distance does not matter.

2021-05-13 02:17 Updated by: chippo
Comentario

I must say, in my current test-game, the order of the units becoming focused, is really bad. I've never really noticed a problem before. I wonder if I'm only noticing now, or whether things have gotten worse lately.

Oh! I didn't answer your question, 'cos I don't know.

2021-05-15 22:37 Updated by: alain_bkr
Comentario

it may be linked to #42288 (gtk3.22 : press 'c' to center focus is sometimes wrong)

in both cases, tiles are hexagonal

2021-05-15 22:54 Updated by: alain_bkr
  • Tipo Update from Feature Requests to Bugs

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar