Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Road building UI for Workers #4981

Closed
touhidurrr opened this issue Aug 24, 2021 · 10 comments
Closed

Road building UI for Workers #4981

touhidurrr opened this issue Aug 24, 2021 · 10 comments

Comments

@touhidurrr
Copy link
Contributor

touhidurrr commented Aug 24, 2021

Hi. In Unciv we all know that worker automation might make the workers make roads to connect cities. But the question is when? From my experience they do it totally Randomly wasting a lot of moves. Sometimes they work one or two tiles, leave it behind and then do some other job, making the building of roads much time consuming and inefficient.

So, what is the alternative? Stop worker automation and build roads manually. But that's a pain also. You have to select each tile and then build roads.

So, solution? UI or Option for building roads. I saw this mechanism in Freeciv. The intregrated a road building feature with the movement UI! Just select your worker, select another tile. And then two options will appear. One 'Move to the tile', Two 'Connect the Tile with roads' saving a lot of human time at once! The good part of these feature is when you are calculation most efficient path to move between two tiles, you are actually calculating most efficient path of connecting two tiles with roads also.

I suggest this to be added in Unciv also. It would make the GamePlay a lot easier. Since many players like to do everything manually instead of automation.

@yairm210
Copy link
Owner

This feature is implementation hell.
We've tried to do this twice already and could not reach a state where it was working well.
You're welcome to try as well.

What this actually contains:

  • "create road to to tile x" as long term unit action
  • shortest road is not shortest unit movement, don't build roads around forests/jungles/hills but through them
  • what do you do if one of the tiles is already occupied?
  • how do you visualize to the player what time the unit is building a road to?

The actual UI is the trivial part

@touhidurrr
Copy link
Contributor Author

touhidurrr commented Aug 24, 2021

This feature is implementation hell.
We've tried to do this twice already and could not reach a state where it was working well.
You're welcome to try as well.

What this actually contains:

  • "create road to to tile x" as long term unit action
  • shortest road is not shortest unit movement, don't build roads around forests/jungles/hills but through them
  • what do you do if one of the tiles is already occupied?
  • how do you visualize to the player what time the unit is building a road to?

The actual UI is the trivial part

My recommendations to avoid a possible implementation hell is to add an option called 'Build Roads' on the worker. Clicking Build roads and then clicking another tile will show a connect road icon like the movement icon. Then if the user likes the path in between he/she can start building the road.

About shortest movement path is not shortest road path:
What does roads does actually? Civilopedia says reduces the movement cost by half. (?) Assuming that between 2 tiles there is 3 possible paths with cost 11, 12 and 13, the cost of moving with roads will be 5.5, 6 or 6.5. So either 6 or 7.
Now the shortest movement algo will choose the 11 cost path which should also take 6 turns via roads. So why is it that both paths are not equal? I can't understand it.

About what will the worker do if something comes between:
The worker will just stop building roads so that the player can decide what to do next.

About the Forest / Jungle problem:
Now that's a tricky one. Cause there is no smart solution to this. Letting the player to choose is the only reasonable option. Becuase a player can choose to build Lumber Mills in Forests and get the +2 Science buff from Jungles with University. So, about a Forest or a Jungle should be worked or not depends solely on the player. My solution is like the screenshot below show a connect roads icon instead of the movement icon and show a road built through the tiles. Now there can be Jungle or Forests in the path but the player can choose if he/she will build the road or not. Also better if the white highlights are disabled clicking on the 'Build Roads' option.
Screenshot_2021-08-24-10-56-54-62_5b83b50424e447777d9855d9701553df

@touhidurrr
Copy link
Contributor Author

Also this a feature request. I am not an Android Developer.

@ajustsomebody
Copy link
Contributor

ajustsomebody commented Aug 24, 2021

This feature is implementation hell.
We've tried to do this twice already and could not reach a state where it was working well.
You're welcome to try as well.

What this actually contains:

  • "create road to to tile x" as long term unit action
  • shortest road is not shortest unit movement, don't build roads around forests/jungles/hills but through them
  • what do you do if one of the tiles is already occupied?
  • how do you visualize to the player what time the unit is building a road to?

The actual UI is the trivial part

why dont we just copy civ 5 mechanic

@ravignir
Copy link
Contributor

i had such idea:
there would be an additional worker button that would allow buildings multiple roads
p
it would open such screen
o
user would just select add tiles/remove options to tap/click the tiles to put them on the list and once all is set, they would select start roads construction button.

@ajustsomebody
Copy link
Contributor

i had such idea:
there would be an additional worker button that would allow buildings multiple roads
p
it would open such screen
o
user would just select add tiles/remove options to tap/click the tiles to put them on the list and once all is set, they would select start roads construction button.

not automatic but surely better than nothing, also if we generalise this we can make this work with improvements as well

@will-ca
Copy link
Collaborator

will-ca commented Dec 1, 2021

Two options:

  • Store planned improvements per tile. So long as there are any planned improvements, automated workers will prioritize those. Messy, but potentially powerful.
  • Store planned actions per unit. More predictable and more like Civ V.

Either way, separate routing logic from automation logic.

@AdityaMH
Copy link
Contributor

AdityaMH commented Apr 8, 2022

#5856

Copy link

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Mar 14, 2024
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants