I was thinking about having it go over every square, adding a resource based on a random chance of how far it is away from water, and how many neighboring resources it has. This should naturally put resources in clumps around water.
On 12/22/05, Nuage <[EMAIL PROTECTED]> wrote: > That's true, the ressources are badly placed, and I did not worked on it > really. > Then it's a good idea to fix it. > > The files are: > MapGenerationDescriptor.cpp > MapGenerationDescriptor.h > MapGenerator.cpp > > The process is roughly like this: > 1-create a random map, but only the ground: water, sand or grass. > 2-find a place for each team > 3-put a 9x9 square of each ressources near each team. > > The current main method where the ressources are added is into > MapGenerator.cpp, > line 778 now: > void Map::addRessourcesRandomMap(MapGenerationDescriptor &descriptor) > > So what I would suggest is that you change this addRessourcesRandomMap() > method > until you'r happy. > > Have fun! > > Nuage > > > Bradley Arsenault wrote: > > I've been looking at the random map generator, it produces very nice > > maps when the ratios turned to 0 and its set to maximum smoothing. But > > there is one exception: It doesn't place resources well. I've been > > trying to pluck through the code and see if I could get it to place > > more resources and in more variety of places, but i'm unsure where in > > MapGenerator.cpp the resources are actually placed. > > > > So just to ask nuage about how I should go about this task. > > > > > > _______________________________________________ > > glob2-devel mailing list > > [email protected] > > http://lists.nongnu.org/mailman/listinfo/glob2-devel > > > > > > _______________________________________________ > glob2-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/glob2-devel > _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
