glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Gradients (again)


From: Stephane Magnenat
Subject: Re: [glob2-devel] Gradients (again)
Date: Thu, 15 Sep 2005 09:34:20 +0200
User-agent: KMail/1.8.1

Hi,

Two remarks:
* I think water is important for game and ambiance feeling. Even if it is not 
very usefull now, let's make it more usefull instead of dropping/downgrading 
it.
* I think it is possible to take into account the displacement speed of a 
terrain for gradient. I don't have much time now, so I'll expose my idea and 
please comment/criticise it:
- First, the idea is to use 16 bits or, if required, even 32 bits gradients,
- Then, the gradient difference between two cases will be the invert of the 
speed between those two cases.
- Then, the gradient is propagated normally but not by decreasing it by one 
for each case, but by setting it to the lowest altitude of all cases around, 
taking into account the difference related to speed.
- Then, globules go to the case with the highest gradient around.
Here is an example (ascii art fixed fonts required):

    A         B       C
  #########################
  #   S   #   W   #   S   #
1 #   N   # N-100 #  N-40 #
  #       #       #       #
  #########################
  #   S   #   S   #   S   #
2 #  N-20 #  N-20 #  N-40 #
  #       #       #       #
  #########################

S = Sand (invert of speed = 20), W = Water (invert of speed = 100) (slower)
Imagine a globule wants to go from C1 to A1. He will go on sand because 
altitude of A2 is N-20 when altitude of B1 is N-100.

I think that this system allows to find the smallest path in time and not in 
distance. Nevertheless, we should also take into account the fact that 
sometimes, it is better to go slower but more direct because food consumption 
is proportional to distance not to time.

What do you think? Was my explanation clear enough?

Thanks,

Steph




reply via email to

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