agentx Posted February 15, 2015 Report Share Posted February 15, 2015 I now have some grip on map analysis and play around with village layout. This is the current status: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: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 6 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted February 15, 2015 Report Share Posted February 15, 2015 Use houses as city walls in early game, use barrack to expand influence to resources use docks as new settlement to start collecting resources thar are far to CC or storehouse. Quote Link to comment Share on other sites More sharing options...
agentx Posted February 16, 2015 Author Report Share Posted February 16, 2015 Lion, good tips, ..... for humans. Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 16, 2015 Report Share Posted February 16, 2015 Any particular reasons to make it a range placement ? Quote Link to comment Share on other sites More sharing options...
niektb Posted February 17, 2015 Report Share Posted February 17, 2015 (edited) 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: Reveal hidden contents An example of a farming village that provides work and space for 10 gatherers: Reveal hidden contents Edited February 17, 2015 by niektb 2 Quote Link to comment Share on other sites More sharing options...
agentx Posted February 17, 2015 Author Report Share Posted February 17, 2015 (edited) > range placement???> rulesI 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 villagesI 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 barracksHave a logical relationship, but a bot doesn't profit if they are close. Edited February 17, 2015 by agentx Quote Link to comment Share on other sites More sharing options...
thamlett Posted February 17, 2015 Report Share Posted February 17, 2015 I like the "streets" concept Quote Link to comment Share on other sites More sharing options...
agentx Posted February 17, 2015 Author Report Share Posted February 17, 2015 > I like the "streets" conceptThanks, I wish the bot could pave them. Quote Link to comment Share on other sites More sharing options...
agentx Posted February 22, 2015 Author Report Share Posted February 22, 2015 @niektb, I'm thinking about settlements. Only a few templates: Reveal hidden contents templates/structures/brit_crannog.xmltemplates/structures/cart_super_dock.xmltemplates/structures/merc_camp_egyptian.xmltemplates/structures/ptol_lighthouse.xmltemplates/structures/ptol_mercenary_camp.xmltemplates/structures/ptol_military_colony.xmltemplates/structures/rome_army_camp.xmltemplates/structures/rome_siege_wall_gate.xmltemplates/structures/rome_siege_wall_long.xmltemplates/structures/rome_siege_wall_medium.xmltemplates/structures/rome_siege_wall_short.xmltemplates/structures/rome_siege_wall_tower.xmltemplates/structures/rome_tent.xmltemplates/structures/rome_wallset_siege.xmltemplates/structures/sele_military_colony.xmltemplates/template_structure_civic_civil_centre.xmltemplates/template_structure_defense_outpost.xmltemplates/template_structure_military_dock.xmlallow 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. Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 22, 2015 Report Share Posted February 22, 2015 On 17/02/2015 at 10:02 PM, agentx said: > I like the "streets" conceptThanks, 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. On 17/02/2015 at 8:22 PM, agentx said: > range placement???I meant "in a circle", why not square cities ? Quote Link to comment Share on other sites More sharing options...
auron2401 Posted February 23, 2015 Report Share Posted February 23, 2015 Circular cities are more realistic than square ones. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 23, 2015 Report Share Posted February 23, 2015 Could do square citiies for Successors and Romans. 1 Quote Link to comment Share on other sites More sharing options...
auron2401 Posted February 23, 2015 Report Share Posted February 23, 2015 They didn't do square cities. Ever.rome was a huge sprawl, and i highly doubt any of the cities the seleucids built were square either. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 23, 2015 Report Share Posted February 23, 2015 On 23/02/2015 at 2:52 AM, auron2401 said: They didn't do square cities. Ever.rome was a huge sprawl, and i highly doubt any of the cities the seleucids built were square either.you do not know what you are talking about Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted February 23, 2015 Report Share Posted February 23, 2015 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 2 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 23, 2015 Report Share Posted February 23, 2015 (edited) 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:There are many examples. Even Piraeus in Athens of 5th and 4th century BC was laid in grid pattern.Miletus of Ionia is other example. Edited February 23, 2015 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted February 23, 2015 Report Share Posted February 23, 2015 (edited) Dura Europus ( Seleucid) Edited February 23, 2015 by Lion.Kanzen Quote Link to comment Share on other sites More sharing options...
agentx Posted February 23, 2015 Author Report Share Posted February 23, 2015 > Well provided with some decals you could.The API expects a template name, any proposals? Quote Link to comment Share on other sites More sharing options...
niektb Posted February 23, 2015 Report Share Posted February 23, 2015 On 22/02/2015 at 10:18 PM, agentx said: @niektb, I'm thinking about settlements. Only a few templates: Reveal hidden contents templates/structures/brit_crannog.xmltemplates/structures/cart_super_dock.xmltemplates/structures/merc_camp_egyptian.xmltemplates/structures/ptol_lighthouse.xmltemplates/structures/ptol_mercenary_camp.xmltemplates/structures/ptol_military_colony.xmltemplates/structures/rome_army_camp.xmltemplates/structures/rome_siege_wall_gate.xmltemplates/structures/rome_siege_wall_long.xmltemplates/structures/rome_siege_wall_medium.xmltemplates/structures/rome_siege_wall_short.xmltemplates/structures/rome_siege_wall_tower.xmltemplates/structures/rome_tent.xmltemplates/structures/rome_wallset_siege.xmltemplates/structures/sele_military_colony.xmltemplates/template_structure_civic_civil_centre.xmltemplates/template_structure_defense_outpost.xmltemplates/template_structure_military_dock.xmlallow 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. 1 Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted February 23, 2015 Report Share Posted February 23, 2015 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. 1 Quote Link to comment Share on other sites More sharing options...
agentx Posted February 23, 2015 Author Report Share Posted February 23, 2015 > 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. Quote Link to comment Share on other sites More sharing options...
agentx Posted February 23, 2015 Author Report Share Posted February 23, 2015 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? Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 23, 2015 Report Share Posted February 23, 2015 On 23/02/2015 at 10:11 PM, agentx said: 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 Quote Link to comment Share on other sites More sharing options...
agentx Posted February 24, 2015 Author Report Share Posted February 24, 2015 It's not the speed, it's how units avoid collisions. Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 24, 2015 Report Share Posted February 24, 2015 Well Afaik nothing changed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.