bugGlobulation 2 - Bugs: bug #16242, improvement-idea for pathfinding...

 
 

bug #16242: improvement-idea for pathfinding concerning idle units

Submitted by:  Leo Wandersleb <giszmo>
Submitted on:  Sat 01 Apr 2006 12:00:23 PM UTC  
 
Severity: 1 - WishStatus: None
Assigned to: NoneOpen/Closed: Open
Release: NoneOperating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 01 Apr 2006 10:50:17 PM UTC, comment #1:

I'm not sure whether this is needed.

Since walking diagonal is as fast as horizontal or vertical,
I'd expect that idle globs would be eluded without increasing
the distance in most cases.
In the other cases the idle glob must be on an direct diagonal line
between the worker and a resource or an obstacle which it must pass.
(Well, and then, there are a few pathological cases which depend on
opening or closing of paths.)

If the movements of the idle glob (when inside a forbidden-area) would
be deterministic, we might get a funny situation. The idle glob might
be pushed by the worker's forbidden-area in the same direction as the
worker is heading - all the way. Might look funny, if we see globs
running around in pairs.
If the glob is pushed into a bottleneck it will block the path.

If idle globs have a bad effect on pathfinding, I would propose
another idea to deal with it. It's not better than yours - in
fact, it is worse when it comes to warriors, but it leads to
meassure the usefulness:

Before a worker makes its move, we check if on the neighbouring
fields is an idle glob. If there is one, we check if it is nearer
than the worker itself. If it is, the worker passes its job and (if
present) the resource it carries.
Might look good, but as I said - this won't help warriors.
(There would be a theoretical possibilty of a resource being transfered
a long distance in an instant.)
I have omited that different globs have different speed, because I
think this would average out.

The same idea provides a way to messure, if it would be beneficial at
all. Each time the worker (before its move) is adjacent to at least
one idle glob which is at least two fields nearer than the worker, we
increase a counter. At the end of the game we look at the counter, the
number of overall movements and their ratio.
This is a way to test the need to change the code at all. So it would
fit both ideas.

Kai Antweiler <snth>
Project Administrator
Sat 01 Apr 2006 12:00:23 PM UTC, original submission:

let working units carry 5x5-forbidden-for-idle-units-areas with them. that would push idle units quickly out of town freeing the ways for working ones.

if that technique works well (and fast) it would be also possible to have a switch at flags telling assigned units to be prioritized over units having "normal" jobs. that way warriors would rush to their flags much faster if they have to cross crowded areas to get there.

Leo Wandersleb <giszmo>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup