Jump to content

Recommended Posts

I now have some grip on map analysis and play around with village layout. This is the current status:

post-16051-0-57211000-1424023385_thumb.ppost-16051-0-38004300-1424023452_thumb.p

Each centre has a no-build here zone with a radius of 40m. Also Hannibals trys to detect possible streets. It selects 48 points from an inner circle and 48 points on an outer circle and runs the pathfinder on each of these pairs:

post-16051-0-91883500-1424024017.png

Cells visited by the pathfinder multiple times qualify as street-cells and block buildings. Hannibal launches 4 builder groups for houses. The groups build the next house near the last one, but may start from different points, hence the "clumps" in the maur village. The find-a-free-place algo allows to define a border with of size 0, 1, 2, 3. A border of 0 doesn't work with random building angle. In the villages above the maur build houses facing north and a border of 0, all other face centre with border 1. The spart have always face centre and border 1. Also interesting on small maps is facing map centre.

In mind a have an agora for the greek cultures, may have a monument or a tower in the middle. Also, idle units can met here or healer do their stuff.

I think, a few simple rules might be enough to layout a complex looking village.

Ideas, proposals below :)

  • Like 6
Link to post
Share on other sites

I've been thinking a while but I wondered what you call 'rules' in this case. Could you elude a bit on that?

It sounds most logic to place buildings that have a relationship close to each other (so farms and corrals close to a farmstead, blacksmith and barracks near each other. etc.)

Another idea to came to my mind would be the implementation of satellite villages. These are tiny villages with a set task that can function independent (to a certain extend) from the others. They could share some services like repairing/building groups.

An example of a stone mining village that provides work and space for 10 gatherers:

ImjdJyi.jpg

An example of a farming village that provides work and space for 10 gatherers:

I6uziVW.jpg
Edited by niektb
  • Like 2
Link to post
Share on other sites

> range placement

???

> rules

I want the cities look organic, like they have grown over decades and somehow blended with the environment. Mostly to avoid all look the same and to give opponents more challenges. Running a real constraints based layout procedure (some algos exist, there are great js libs for axis parallel boxes) would cost to much time or don't work with rotated rectangles, so I'll stick with a tiny set of fake rules, so far I have as input: civ and building size and as output angle and border.

Currently I'm looking into building blocks of 4 houses with no border for the heles. So they occupy as much space as a fortress and provide some barrier. I've never seen real street fight with 0AD and I want the bot to hold and defend positions inside the city. The API's obstruction map is extremely important to detect positions worth to defend.

> satellite villages

I like them, especially because houses are not only build near the centre, but appear everywhere on the map. However, there is a bigger concept behind: Lion's last exit dock, military satellites, fortified miner villages, etc. all fit in this category. Sometimes a bot is forced to build a new one (centre lost), sometimes it has economical sense, sometimes it is just to fortify a claim. For sure these satellites have a main building and Hannibal is prepared to work with multiple main buildings, but still I have the satellites not really thought through...

When is it time to give them up, when to defend at all cost? What are the criteria?

PS: > blacksmith and barracks

Have a logical relationship, but a bot doesn't profit if they are close.

Edited by agentx
Link to post
Share on other sites

@niektb, I'm thinking about settlements. Only a few templates:

templates/structures/brit_crannog.xml
templates/structures/cart_super_dock.xml
templates/structures/merc_camp_egyptian.xml
templates/structures/ptol_lighthouse.xml
templates/structures/ptol_mercenary_camp.xml
templates/structures/ptol_military_colony.xml
templates/structures/rome_army_camp.xml
templates/structures/rome_siege_wall_gate.xml
templates/structures/rome_siege_wall_long.xml
templates/structures/rome_siege_wall_medium.xml
templates/structures/rome_siege_wall_short.xml
templates/structures/rome_siege_wall_tower.xml
templates/structures/rome_tent.xml
templates/structures/rome_wallset_siege.xml
templates/structures/sele_military_colony.xml
templates/template_structure_civic_civil_centre.xml
templates/template_structure_defense_outpost.xml
templates/template_structure_military_dock.xml

allow buildings in neutral area. They are kinda seeds of a settlements. Dropsites fit in this list too - not the elephant. And they need support infrastructure like houses or towers for shelter. Also, that spends a clear bot start command: Build a settlement, if there is none, repeat if resources low.

Link to post
Share on other sites

> I like the "streets" concept

Thanks, I wish the bot could pave them.

Well provided with some decals you could. :) Now not sure the AI can't make buildings that are not in the unit list.

> range placement

???

I meant "in a circle", why not square cities ?

Link to post
Share on other sites

He is quite right the square city idea was the result of 17th and 18th century surveying technology before that laying out a straight line over long distances was just not done as people built just about anywhere they wanted no zoning laws apart from don't aggravate the nobility ;) And no ancient city had regular street grids with the possible exception of Chinese ones as they made defence of the city during a siege and probable defeat at the walls quite problematic random streets helped in the defence.

Enjoy the Choice :)

  • Like 2
Link to post
Share on other sites

I am sorry Loki, but urban design upon grid pattern was pioneer by Greeks in Hellenistic time, then taken further by Romans as seen here:

1368418370_dege-utopias-roman-city.jpg

There are many examples. Even Piraeus in Athens of 5th and 4th century BC was laid in grid pattern.

ancient-lg.jpg

Miletus of Ionia is other example.

6f9605e297ed0134f9bf39a311ceccd2.jpg

Edited by wowgetoffyourcellphone
Link to post
Share on other sites

@niektb, I'm thinking about settlements. Only a few templates:

templates/structures/brit_crannog.xml

templates/structures/cart_super_dock.xml

templates/structures/merc_camp_egyptian.xml

templates/structures/ptol_lighthouse.xml

templates/structures/ptol_mercenary_camp.xml

templates/structures/ptol_military_colony.xml

templates/structures/rome_army_camp.xml

templates/structures/rome_siege_wall_gate.xml

templates/structures/rome_siege_wall_long.xml

templates/structures/rome_siege_wall_medium.xml

templates/structures/rome_siege_wall_short.xml

templates/structures/rome_siege_wall_tower.xml

templates/structures/rome_tent.xml

templates/structures/rome_wallset_siege.xml

templates/structures/sele_military_colony.xml

templates/template_structure_civic_civil_centre.xml

templates/template_structure_defense_outpost.xml

templates/template_structure_military_dock.xml

allow buildings in neutral area. They are kinda seeds of a settlements. Dropsites fit in this list too - not the elephant. And they need support infrastructure like houses or towers for shelter. Also, that spends a clear bot start command: Build a settlement, if there is none, repeat if resources low.

Problematic part of these are that most do not have a territorial influence (meaning that they would decay over time and do not have an area around them where you can build other buildings.

the CC is rather expensive I think to use for a starting position of a settlement (unless you make them larger but then we're back with the problem stated in the TS). The dock would be the most ideal center if it weren't for it's restriction to the shore.

  • Like 1
Link to post
Share on other sites

Planned cities were often square, organic cities were often star-shaped. It doesn't depend a lot on the age or civilisation (though some civs tend to plan more, and others tend to have a more organic structure).

I do think that star-shaped layouts would fit better with 0 A.D., just because the territories are more or less a circle around the base. So starting the first circular territory with civil buildings, and the subsequent with more millitary buildings, you'll automatically get some sort of star-shaped layout. So it's a good evolution.

However, I do think about one modification. Normally, in star-shaped layouts, the buildings face the road or path leading to the centre, they don't face the centre directly (apart from the buildings in the inner circle around the centre). So if you know where your virtual roads are, you could rotate the buildings to that side.

And a major problem with star-shaped layouts is that you always have those pointy buildings at the end. They're impossible to simulate in 0 A.D. But I guess the result would look good enough even without those pointy buildings.

  • Like 1
Link to post
Share on other sites

> So if you know where your virtual roads are, you could rotate the buildings to that side.

Nice one. On top the first house in an open area can't know on which side a street will emerge, all following have a better clue. I'd bet that'll look organic. Now I want to rotate houses to the tangent of a street and make them prefer streets to open area. That way houses + streets could even grow out-of-territory if placed close enough.

I think square cities are an option for 2 player games on a 512x512 map called Metropolis with 20 stone mines per player. :shocking:

Link to post
Share on other sites

Just want to mention I've just seen hundreds of units running through streets to one forest and back to dropsite. Looks amazingly real. If this is the new pathfinder at work, congrats. How does this looking ahead in time thing works?

There is nothing new on the pathfinder for this release, the only speed increase you see are due to either sm31 or some optimizations :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...