glob2-devel
[Top][All Lists]
Advanced

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

[glob2-devel] New overlay map: Fertility


From: Bradley Arsenault
Subject: [glob2-devel] New overlay map: Fertility
Date: Wed, 18 Jul 2007 00:10:09 -0400

I've done a new overlay map, the Fertility map. Bassically, it shows the fertility of a particular area of land, based on the probability grass will grow on that piece of land, which can be quite usefull for positioning Inns and farms on more obscure maps such as Playground. As it turns out, this is a fairly intense computation. So I tried something new with it. When you first request the computation, the program will spawn another thread to do the computation, and will display the result once its done. Thid doesn't take long with full optimizations, but it has a minor, noticable lag.

The result should stay the same throughout the entire game, so it is never re-computed. The algorithm has a simple utility to avoiding calculating the result for islands that ressources will never grow on. Often these tiny islands have very good fertility, so the rest of the overlay scales to them, making the actually important values quite small.

I've added the dependancy boost::threads, but this is no large probem because glob2 already depends on boost as a whole.

--
Really. I'm not lieing. Bradley Arsenault.
reply via email to

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