glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] teleporters


From: Kai Antweiler
Subject: Re: [glob2-devel] teleporters
Date: Wed, 07 Feb 2007 11:09:17 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux)

> Kai Antweiler wrote:
>> Idea:
>> Globs need to sign in a waiting queue to use the teleporter.
>> When they don't get one of the first places of the queue, they will
>> walk to the tp.  In front of the tp they have to wait intelligently.
>> This would demand a special glob2 behaviour-in-front-of-tp-algorithm
>> that forces them to leave enough space between each other.
>
> that is not a tp-problem. all buildings should act like that. it is annoying 
> that inns hold free places for globs that die on their way to the inn 
> anyways. hungry globs should tend to walk near inns that get free soon, too.


I think you don't understand what I mean.
Tps are different, because they are bottlenecks.
Imagine your planning an attack and want to get 50 warriors near
your enemy quickly.

You don't want:
1. When you don't enforce good behaviour:
   That your warriors run to the tp.  The first warriors get hungry
   and want to get to an inn, but can't get back because of the others.
   Real big mess.
2. When you don't enforce good behaviour:
   In case of a two way tp.  Workers coming back through the tp.
   And again, no one can move, big mess.
3. When you don't enforce good behaviour, or queue place switching:
   Your warriors are in a queue but the warriors with good places
   in the queue, can't get to the teleporter, because there are
   so many warriors with bad places in front of them.
4. In case you don't tree the first n places in the queue differently:
   Your warriors can't get to tp, because the good behaviour algorithm
   doesn't allow them to move nearer, since there are not enough free
   fields around.
5. In case of too small queues:
   Most warriors walk the long way.  But then, queue gets new free
   places when first globs are teleported, and some warriors walk back
   to the tp.  And this repeatedly.  Doesn't look good.
6. In case of no queues:
   Most globs will be running in forth and back repeatedly.  It would
   be quicker to use no tp at all.


And I forgot:
Globs should only sign in the queue, when they expect to get faster
through the tp than they would need by foot.  This demands estimation
of the waiting time.
We should not simply put globs at the end of the queue, but calculate
a "queue place" based on their relative distance to the tp compaired
to the other travelers.  So we don't have a queue stricktly speaking.
Then waiting time should be approximately:
(number of globs that use the tp prior to me) * (number of turns one 
transportation takes)


>>       stay where you are
>
> "stay" is no option in glob2 so far

Yes, it is.  For example globs that get stuck between (not in) forbidden
fields or overgrown by resources or warriors that fight.
I think the globs are just turning round and round when they stay.
-- 
Kai Antweiler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]