[Top][All Lists]
[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: |
Tue, 06 Feb 2007 23:41:50 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux) |
> to ease teleporter use i would do pathfinding like:
> if(wheat_gradient > 240)
> use old algo
> else
> if(teleporter_gradient && teleporters_wheat_level
> walk the teleporters gradient
or, when computation is not crucial:
if (gradient mix using tp > n + gradien without tp)
use tp
else
don't use tp
But attention:
This would need type conversion.
Gradient values are unsigned bytes.
Also using longer teleportion times, and controling (maybe by the user?)
which units/gradients the teleporter should consider, can help.
Making tps too small will have the same effect, as having too small paths.
And remember: tps will be placed in a way that many globs want to use it.
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.
Something like this:
if (glob is in tp queue place > n)
if (new field has two free fields in each direction [except where I came
from] && is nearer [or equal] to the tp)
go to new field
else
stay where you are
Also Changing queue places with globs that are nearer to the tp.
And if the queue is full. No further glob can sign in.
--
Kai Antweiler
- Re: [glob2-devel] teleporters, (continued)
Re: [glob2-devel] teleporters, Stéphane Magnenat, 2007/02/06
Re: [glob2-devel] teleporters, Leo Wandersleb, 2007/02/06
- Re: [glob2-devel] teleporters, Stéphane Magnenat, 2007/02/06
- Re: [glob2-devel] teleporters,
Kai Antweiler <=
- Re: [glob2-devel] teleporters, Leo Wandersleb, 2007/02/06
- Re: [glob2-devel] teleporters, Kai Antweiler, 2007/02/07
- Re: [glob2-devel] teleporters, Stéphane Magnenat, 2007/02/07
- Re: [glob2-devel] teleporters, Kai Antweiler, 2007/02/07
Re: [glob2-devel] teleporters [edit], Leo Wandersleb, 2007/02/06