Jump to content

Do quick actions in passing


Recommended Posts

If I change the mode of a door or a flow rate of a valve, it gets added to some poor dupe's task queue and they come by a while later to do it - even if several other dupes pass though that same building in between.

"I'm going that way anyway; I'll do it." would be a nice way of scheduling these quick little tasks. If a dupe's route already takes them by the door or valve, insert the task in their queue so they do it on the way to whatever else they're doing. Much more efficient that way. Maybe this level of efficiency would be a trait some dupes start with, or a powerup dupes get at high levels.

Link to comment
Share on other sites

18 hours ago, Gearloose said:

If I change the mode of a door or a flow rate of a valve, it gets added to some poor dupe's task queue and they come by a while later to do it - even if several other dupes pass though that same building in between.

It's not working exactly that way. Dupes don't have a task queue. There's one global task queue and dupes pick their tasks from that when they're done with previous tasks. They pick their taks by priority (from highest to lowest) and by proximity if the priority is the same. This means a duplicant may pass by a task to be done if he's after another, higher priority task, or if another duplicant already picked this task and is on his way to do it.

In the next release, there will be a slight improvement that when a duplicant picks a task, he may "steal" a task to be done from another duplicant if it's the highest priority closest task for him and he's closer to it than that other duplicant.

Link to comment
Share on other sites

1 hour ago, Kasuha said:

It's not working exactly that way. Dupes don't have a task queue. There's one global task queue and dupes pick their tasks from that when they're done with previous tasks. They pick their taks by priority (from highest to lowest) and by proximity if the priority is the same. This means a duplicant may pass by a task to be done if he's after another, higher priority task, or if another duplicant already picked this task and is on his way to do it.

In the next release, there will be a slight improvement that when a duplicant picks a task, he may "steal" a task to be done from another duplicant if it's the highest priority closest task for him and he's closer to it than that other duplicant.

If they had a separate list for micro tasks (tasks that take up no more time than simply walking there, like switches) while also queueing up the micro tasks in the global queue, then when assigning a task to a dupe during the pathfinding stage they could do a check to see if it will pass by a unassigned micro task and tell the dupe to do that first and then it's original task.

 

Link to comment
Share on other sites

1 hour ago, AlexRou said:

If they had a separate list for micro tasks (tasks that take up no more time than simply walking there, like switches) while also queueing up the micro tasks in the global queue, then when assigning a task to a dupe during the pathfinding stage they could do a check to see if it will pass by a unassigned micro task and tell the dupe to do that first and then it's original task.

Okay it certainly is possible. It's a bit vague - what is microtask - under a second, half a second, tenth of a second? It will change with increasing skill values. How far off the way can it be? How many can a dupe pick on the way to something bigger? Won't players be upset about dupes doing such microtasks instead of coming to do right away what they planned at high priority? How big will extended pathfinding have on game's performance? And finally, will it be worth the effort spent on programming the function?

Link to comment
Share on other sites

31 minutes ago, Kasuha said:

Okay it certainly is possible. It's a bit vague - what is microtask - under a second, half a second, tenth of a second? It will change with increasing skill values. How far off the way can it be? How many can a dupe pick on the way to something bigger? Won't players be upset about dupes doing such microtasks instead of coming to do right away what they planned at high priority? How big will extended pathfinding have on game's performance? And finally, will it be worth the effort spent on programming the function?

Most of those we won't be able to answer since it would have to be implemented to find out. If it only allows micro tasks directly in the path then increase in pathfinding time should be negligible since we can do the check at the final stage of A* where it constructs the path and since we are iterating over the nodes anyway the increase would be the time it takes to check the list on each node. They could even just check when a dupe is in a new square if there is a micro task in it. 

If the queue system is what I expect it to be then it shouldn't be too long a dev time, prob longer for testing and fine tuning of the numbers.

31 minutes ago, Kasuha said:

Won't players be upset about dupes doing such microtasks instead of coming to do right away what they planned at high priority?

This is the most important question and the only one we can definitely answer, but I think we need more people giving their opinions. For me I think it makes sense for things that take up almost no time at all. But maybe they could ignore it for priority 9 so we have a emergency priority where even stopping for half a second is too long.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...