glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Pheramonal-Directional Algorithm


From: Andrii Zvorygin
Subject: Re: [glob2-devel] Pheramonal-Directional Algorithm
Date: Mon, 7 Nov 2005 04:06:41 -0500

yea i think i really screwed up the RAM estimations,


Your details are mostly right, except you don't need to store
information about type explicitly - it's reasonable to assume that the
pheromone trail associated with your defence tower leads to the defence
tower ;)

well i dono how there would be association, but anyways, with types out have to havea type going towards a resources and one going back to the building from the resource

Also, why use two bytes for the amount pheromone?  Surely you don't need
more than 256 levels of scent?

now that I thought about it you're probably right and i don't need as many as two bytes to show pheramones one should be sufficient

oky turns out I was doing all pheramone calculation before in bits :| i don't know why but for some reason that is how i was doinng it, so now i'll make the revised ones in bytes

now directional pheramones are only required for getting to resources and back, atm the only resources we need are wheat,algea, wood and stone(though wheat and stone are by far the most important) and to get back from these locations to buildings.
vectorOfTeams<vectorOfTypes<pheramone>> directionalPheramoneVector
anyways if i do it in the following way

(12*2)*128^2+(2*4*9)*(128^2/2)
we have a result of 983 040
1.0 MB

the first half of that equation states that every square on the map will use 24 bytes for the two empty vectors
the second half showing that half the map would be covered in four types of pheramones by two players (probably more then will realistically occur)

now if we decide to have non-directional pheramones as well (to indicate danger zones and length of time since last viewing) then we can have that in the following way
vectorOfTeams<type[2]> nonDirectionalPheramones
so if it's initalized it will have both types put there
so
12*128^2+1*128^2
which is 212 992
so 0.2 MB

anyways well added together these make 1.2 MB.
approx 15 mb for a 512x512 map

anyways I NEED SOMEONE TO CHECK and see if my logic is correct, as that's what i assume is going to happen in terms of ram usage, especially with the vectors with directional pheramones
so if you have ANY questions please ask, btw _andrew said that his tests on empty vectors took 12 bytes and that is what i used for my calculations

Sincerly, Lokadin

reply via email to

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