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

Difficulty understanding use: Hauling & delivery #1

Open
urgood2 opened this issue Mar 25, 2023 · 1 comment
Open

Difficulty understanding use: Hauling & delivery #1

urgood2 opened this issue Mar 25, 2023 · 1 comment

Comments

@urgood2
Copy link

urgood2 commented Mar 25, 2023

Hi! First of all, thank you for your library. It seems pretty much like magic to me, the way the code works. I had a question (not really an issue, but I didn't know where else to post this) about this part of the comments in the colony.h file.

## Hauling & delivery In order to implement hauling, the pipeline should be started twice per frame. The first execution should assign resources to delivery destinations. This assignment creates the "delivery tasks" for the second execution where characters are assigned to the tasks.

I've been trying to understand what "hauling" means in this context, and what it means to "assign resources to delivery destinations," which is supposed to create "delivery tasks" in the next iteration. Can I have a little help figuring this part out, if you have the time?

@mafik
Copy link
Owner

mafik commented Mar 27, 2023

Hi! This part applies to games where items & resources are delivered to storage spaces. Each storage space may have varying distance from resources & may have a limited capacity. Under those conditions some delivery tasks may interact with each other (for example when there is a nearby stockpile but only one item can be delivered there) so some thought should go into picking which resources would be delivered to which storage spaces. The comment that you're referring to suggests to break down this problem into two parts - first one that would assign items to their destinations (based on their distances / value / other factors) & second one - where colonists are assigned to the delivery (and non-delivery) tasks.

If you're not familiar with this mechanic, I guess it would be best to see it in practice by playing some game such as Rimworld or Dwarf Fortress. It's described here (https://dwarffortresswiki.org/index.php/DF2014:Hauling) but I think experiencing this problem first-hand may help you build a better intuition for the nuances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants