> Yes, i've been thinking about that too, but how? How could i > guestimate avaialble resources? Maybe if i kept track of chunks of > ressources, but then how do i decide which are mine and which are my > enemies?
Here is an idea, it's an approximation and I don't know if it works well in practice. If you divide the maps in swaure of, let say 16x16. You consider a square "belonging to you" if there is a building in it. You then compute the density of food in all the square belonging to you. This is not very precise, perhaps the algorithm should be more intelligent, by taking into account ressources blobs connected to those squares or by taking into account every ressource that is up to a certain distance to a building. You can compute a mask of position to take into account and update the mask only on building creation/destruction. Furthermore, updating this information is not very frequent as globally ressources do not disappear in one tick. Have a nice day, Steph _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
