Latest Posts

Topic: suggestions for improving the economy

Tibor

Joined: 2009-03-23, 22:24
Posts: 1377
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-04-07, 21:44

Hi,

the map is only 1/10 of job. Other requirements might be:

Each field should store following information:

- owner
- if owned by someone else - is the owner an enemy or ally
- id of economy - if ours
- is impassable?

AI also needs fast way to get (calculate) for each field

- 'walking' distance to enemy
- distance to nearest border

Everything can be calculated/get directly from widelands 'engine', but it is slow.

Also the question is whether separate map will be maintained for every AI player, or there will be one used by everyone.

So far it might work as a fast cache above actual widelands map - it is not neccessary to be actual within a second or so, now if AI has like 3000 buildable fields it takes minutes till the info about individual field is refreshed again..., so a field in your map should have a timestamp when last time it was recalculated... But this is suposed to be only a small part of what AI will needs to know, so it might be updated faster...

it all is really not a trivial job...


Top Quote