Saturday, 12 April 2008

Mountain Village - heavy geo tweaking and such

With heavy hacking put into Boundaries, TreeLocator ( a kind of speed up locator for positioned objects [economic, boundaries or whatever we need] like OctTree in 3D scenarios) GroupedBoundaries, Population and Residence plus the EconomyTemplate is ready.

GroupedBoundaries is for grouping smaller boundaries into a bigger pool which uses TreeLocator to quickly return the boundaries covering a given coordinate range. It is used in Population (towns and villages will be based on that class) to contain the boundaries of Residencies (houses, castles etc. will be based on that class) which build up a Population.

Each humanoid EntityInstance (=a group of humanoid beings) can have a Population. The Instance's HumanoidEntityDescription contains the EconomyTemplate which describes what Population class and Residence class the given entity can own in a given Geography (e.g. Plain, Forest or Mountain). Thus upon generating ecology, the humanoids settle their village around their HomeBoundaries' coordinate. :-)

With tweaking Geography getPointHeight adding exceptions for parts of the geography with humanoid economy it became possible even that the sloped Mountains can contain Residences (houses). Where a house takes place Geography point heights are made similar on each coordinate of the house covered part. Check the screenshots, how a population's houses override the mountain slope's default height. I will review the codes in the next few time-slots I'll have and then roll out a test release.


Paul said...

Forgot to mention that all this is in the SVN with the new fix I've made for save/load which was rendered unusable by economy (now population residences are transient, not saved and onLoad they are added) and an error in ecology generation (entity description was instantiated unnecessarily). also TreeLocators are rebuilt onLoad to make the saved XML even smaller. I've cut down the erroneous 15MBytes of xml to the norma 2-2,5 MB.

Anonymous said...

Go go go! Dont stop now mate!!!! :-)