Ykkrosh Posted July 17, 2011 Report Share Posted July 17, 2011 I started experimenting a bit with territories, in particular how to compute the borders. The old implementation (before the simulation rewrite) did them in a purely geometric way (as Voronoi diagrams), but that seems complex and inflexible, and I think tile-based methods might be better.A simple tile-based territory assigner, with largely similar behaviour to the geometric approach (i.e. each tile is assigned to whichever settlement is closest in straight-line distance), on Death Canyon with six settlements, gives something like:(The edges are a bit wobbly due to an implementation detail which could probably be improved a little). I think it's problematic since it ignores the river entirely, resulting in e.g. a bit of green territory in the bottom-right which is cut off from the rest of that territory by the river and by the magenta.It's more interesting when changed to depend on terrain, so each tile is effectively assigned to whichever settlement is closest in pathfinder distance (not straight-line distance):(This is using the default passability behaviour, so deep water and steep slopes block paths, shallow water doesn't). That results in territory boundaries following the curve of the river, except where they extend over bridges/shallows and spread onto the other side, and the blue/cyan boundary is along the middle of the steep canyon side. I think that gives much more sensible and useful behaviour, though somewhat less predictable (e.g. if you move the yellow settlement a tiny bit closer to the river then suddenly it takes over a big chunk of land between blue and cyan, since cyan is blocked off by the big hole in the middle left).To provide more controllability to map designers, while still allowing most of the behaviour to be automatic (i.e. not requiring them to paint everything by hand), I added some objects that influence the territories by overriding the terrain passability costs:That has some blocker objects along the bridges (so they act more like deep water, and the territory edges align along them), and some un-blocker objects along the steep canyon bits in the cyan area (so that the cyan area can extend more freely). (The idea is that these objects would be visible in the editor but invisible when you play the game, and have no effect on anything except the territory computation. An alternative would be to use a tile-painting mechanism instead of these magic objects to influence territories - I'm not sure which is better, but the objects are easier to implement the UI for since they don't need a special Atlas mode or special painting tools.)There's some other changes that could be implemented, like trying to make all territories to cover an equal number of tiles:(no magic blockers here, so compare to the 2nd image). That should be theoretically fairer (at least if it's implemented properly, not as a quick hack like this), but probably it looks too weird. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 17, 2011 Report Share Posted July 17, 2011 I think the "fairer" (last) approach is a moot point, because the most "fair" solution would include equal amounts of resources, rather than simple number of terrain tiles. And I think one of the challenges (i.e. fun) inherent in a game like ours is figuring out how to overcome being dealt a bad hand. I'm not fond of the Starcraft approach where every single position on the map has the exact same resource and terrain situation. I think we want our game to be more "organic" than that.So, I think the pathfinder approach intrigues me the most, with some method implemented to give the designer some leeway (blocker objects, or a paintbrsh layer in Atlas, something). Some things we also want are objects for Neutral Territory (anyone can build), and No Man's Land (no one can build), that essentially create their own "territories" with special properties. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 17, 2011 Author Report Share Posted July 17, 2011 Some things we also want are objects for Neutral Territory (anyone can build), and No Man's Land (no one can build), that essentially create their own "territories" with special properties.Would those act exactly like normal settlements in terms of territory shape computation? (just with no visible actor, and different build restriction rules) Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 Would those act exactly like normal settlements in terms of territory shape computation? (just with no visible actor, and different build restriction rules)I would say so. It may be useful, but not necessary, for a designer to be able to tweak the "importance" or "weight" of these neutral territories when computing the territory shapes.And yeah, the actor would be invisible in-game, but visible in Atlas. I can make special looking objects for this purpose. Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 18, 2011 Report Share Posted July 18, 2011 I'm not fond of the Starcraft approach where every single position on the map has the exact same resource and terrain situation. I think we want our game to be more "organic" than that.Hmmm, organic to a point, but it needs to be pretty darn close or it is just unfair and people don't think unfair is fun. Small deviations make things interesting, but larger deviations make things not fun.Are territories a game type option? Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 Hmmm, organic to a point, but it needs to be pretty darn close or it is just unfair and people don't think unfair is fun. Small deviations make things interesting, but larger deviations make things not fun.This is true, but I think the Starcraft approach goes too far. Are territories a game type option?I think we want two main types of gameplay, as far as territories are concerned:"Default" gameplay, with territories and settlements, with their corresponding build limits, and..."Classic" gameplay, with no territories, no settlements, and no build limits (which is basically how the game plays right now). Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 18, 2011 Report Share Posted July 18, 2011 Ok Michael, that sounds good to me then.One thing that might be interesting/nice to consider for multiplayer is that the inside positions are much tougher to defend because you can be attacked from three side (as opposed to two). Perhaps they get something to balance that out? Perhaps that is a map makers job, just thinking out load... Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 One thing that might be interesting/nice to consider for multiplayer is that the inside positions are much tougher to defend because you can be attacked from three side (as opposed to two). Perhaps they get something to balance that out? Perhaps that is a map makers job, just thinking out load...Not sure what you mean by the "inside position." Maybe draw a quick diagram for us? Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 18, 2011 Report Share Posted July 18, 2011 Not sure what you mean by the "inside position." Maybe draw a quick diagram for us?Inside positions would be the red and the yellow if you were playing with 6 players. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 Inside positions would be the red and the yellow if you were playing with 6 players.Hmm, that would only be a problem if you were playing Free For All, and only on this map, because of its central valley. In a 3v3 I would hazard to guess each team would start on their own side of the valley. Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 18, 2011 Report Share Posted July 18, 2011 Yep, I think you are right, it tends to balance out. Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted July 18, 2011 Report Share Posted July 18, 2011 I got an idea for territories, although it doesn't affect it per se. Capturable Structures. Something like the Inns and Towers in BME2. These could be towers, farms or fortresses that have a small area within the territory. A player would first have to capture these buildings, but capturing the territory in which they were in would automatically make them yours(provided they were already captured by your opponent before of course). You would also be able to capture these buildings without occupying the territory, thus giving the player a better acquiring the territory. I think this would improve gameplay dynamics a lot, making some territories more valuable than others without giving players a head start. How these structures would differ from buildable ones would be that they are stronger and affect your borders, plus have special bonuses as their own. A farm would increase the gather rate for fields, a quarry would supply a seemingly endless source of metal/stone etc.As to how it is implemented, I agree with Michael. Great to see this happening! Go Philip! Quote Link to comment Share on other sites More sharing options...
feneur Posted July 18, 2011 Report Share Posted July 18, 2011 Great work so far Philip. As usual you take something and make it a lot better than it was before Capturable Structures. Something like the Inns and Towers in BME2. These could be towers, farms or fortresses that have a small area within the territory. A player would first have to capture these buildings, but capturing the territory in which they were in would automatically make them yours(provided they were already captured by your opponent before of course). You would also be able to capture these buildings without occupying the territory, thus giving the player a better acquiring the territory. I think this would improve gameplay dynamics a lot, making some territories more valuable than others without giving players a head start. How these structures would differ from buildable ones would be that they are stronger and affect your borders, plus have special bonuses as their own. A farm would increase the gather rate for fields, a quarry would supply a seemingly endless source of metal/stone etc.To me personally this is a bit too much RPG/Heroes of Might and Magic, but I can see how some people can like it so I'm not totally against it. As long as it's an option it's one thing. Also, I wouldn't say it should be a priority, something for part 2 or if one of the programmers are bored during Beta or something As I said I'm not all against it though Once we have triggers it should be possible to implement fairly easy I'd say, at least apart from the "affect your borders" part. How do you envision that btw? Would they only be on the edge of territories or something or would they just be like miniterritories with a small piece of ground around them that would belong to the owning player? Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted July 18, 2011 Report Share Posted July 18, 2011 Of course its not a priority. I was just suggesting something Well, if its next to your territory it would integrate itself into it. If its too far it would be a miniterritory Quote Link to comment Share on other sites More sharing options...
feneur Posted July 18, 2011 Report Share Posted July 18, 2011 Of course its not a priority. I was just suggesting something Cool I was just making sure we keep our priorities straight.Well, if its next to your territory it would integrate itself into it. If its too far it would be a miniterritory Ah, that would work. Quote Link to comment Share on other sites More sharing options...
Jubalbarca Posted July 18, 2011 Report Share Posted July 18, 2011 This will need some major AI changes I expect - are we looking at some form of territories being in A7? Quote Link to comment Share on other sites More sharing options...
oshron Posted July 18, 2011 Report Share Posted July 18, 2011 I think we want two main types of gameplay, as far as territories are concerned:"Default" gameplay, with territories and settlements, with their corresponding build limits, and..."Classic" gameplay, with no territories, no settlements, and no build limits (which is basically how the game plays right now).personally, i think "classic" gameplay should be more like AOM; after that game, i never really liked how you could just build town centers, etc, wherever you wanted. for that matter, i think that "classic" mode should be the default and "provincial/territories" mode should be the option that has to be enabled insteadoh, and while im here, will single-player random map options be saved between load-ups? because, playing vanilla AOM again, thats one thing i really hate having to do every time i want to load up a new random mapI got an idea for territories, although it doesn't affect it per se. Capturable Structures. Something like the Inns and Towers in BME2. These could be towers, farms or fortresses that have a small area within the territory. A player would first have to capture these buildings, but capturing the territory in which they were in would automatically make them yours(provided they were already captured by your opponent before of course). You would also be able to capture these buildings without occupying the territory, thus giving the player a better acquiring the territory. I think this would improve gameplay dynamics a lot, making some territories more valuable than others without giving players a head start. How these structures would differ from buildable ones would be that they are stronger and affect your borders, plus have special bonuses as their own. A farm would increase the gather rate for fields, a quarry would supply a seemingly endless source of metal/stone etc.As to how it is implemented, I agree with Michael. Great to see this happening! Go Philip! perhaps these buildings could be programmed to be functionally similar to settlements so that, if you wanted, you could just place that building instead of a settlement?for the territories themselves, i get that, at the moment, its more or less planned that theyll be geometric shapes lined up to natural barriers like water and cliffs, but i think that an editor option should be to move the borders of a territory any which way, except in a relatively small radius around the settlement/inn/fortress/other "site of power". this would be good for scenario design in case someone wanted to make a particular region like in actual history, like one territory which encompasses the entire city of rome and other territories for the provinces around it. perhaps there could also be an editor-only option to create neutral territory or no-man's land where a different "site of power" is set down instead of a settlement. for example, an ancient ruin thats supposedly cursed so people are afraid to build anything near it but are willing to travel into the general area to fight. this could also work well for a "king of the hill" type game in which the players have to capture big building at the center of the map and hold it for a while, which could be on no man's land to prevent people from building fortifications around it and increase the gameplay challenge Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 18, 2011 Author Report Share Posted July 18, 2011 This will need some major AI changes I expect - are we looking at some form of territories being in A7?I expect so - I've been meaning to work on it for ages but hadn't got around to doing anything, but I think it's doable now without too much effort, and it'd be good to get it working and integrated for the next release so we can test and see if it's a good design or not Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 personally, i think "classic" gameplay should be more like AOM; after that game, i never really liked how you could just build town centers, etc, wherever you wanted. for that matter, i think that "classic" mode should be the default and "provincial/territories" mode should be the option that has to be enabled insteadI disagree on what should be "default" or not. I think the mode that is most distinct to 0 A.D. should be the default. Just my opinion.Now, about "Classic" mode: If we implemented Curtain Walls as a feature, we could require that no two Civ Centres can have overlapping curtain walls, so that the player is forced to expand if they want to make more Civ Centres. This is similar to Battle for Middle Earth II. That would be the only "constraint."for the territories themselves, i get that, at the moment, its more or less planned that theyll be geometric shapes lined up to natural barriers like water and cliffs, but i think that an editor option should be to move the borders of a territory any which way, except in a relatively small radius around the settlement/inn/fortress/other "site of power". this would be good for scenario design in case someone wanted to make a particular region like in actual history, like one territory which encompasses the entire city of rome and other territories for the provinces around it. perhaps there could also be an editor-only option to create neutral territory or no-man's land where a different "site of power" is set down instead of a settlement. for example, an ancient ruin thats supposedly cursed so people are afraid to build anything near it but are willing to travel into the general area to fight. this could also work well for a "king of the hill" type game in which the players have to capture big building at the center of the map and hold it for a while, which could be on no man's land to prevent people from building fortifications around it and increase the gameplay challengeI think we are also discussing ways we can manipulate the sizes and shapes of territories. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 18, 2011 Report Share Posted July 18, 2011 I also think territory "fairness" should not be enforced by the game. In AoK some of the most challenging and fun maps where those where I had poor defense compared to other players, being "dealt a bad hand" so to speak, it made for some very epic games. This is mostly the case with random maps, ours don't have much variation yet but I hope to change that. In scenarios, it should be the map designer's responsibility to consider resource distribution and territory size.This will need some major AI changes I expect - are we looking at some form of territories being in A7?I don't know if it will be major, but the AI system can be considered very incomplete and subject to change (I didn't realize how much until I saw the Rootbot project and how it progressed). The main effect on AI in the short term would be slightly restricting where they can build, I guess this will be something like terrain passability which the AI already checks before building, only it may be a distinct concept - I'm not sure how many passability classes the pathfinder supports. Then the higher level goals of e.g. conquering territories, building new civil centres, are already a bit beyond our AIs which it seems use a simple attack/defend strategy. We may be adding diplomacy soon as well, and that will require even bigger changes to AI in my opinion: knowing who to attack, responding to diplomatic changes, giving/receiving tribute, etc. Quote Link to comment Share on other sites More sharing options...
Thorfinn the Shallow Minded Posted July 18, 2011 Report Share Posted July 18, 2011 (edited) Do you plan to make people capable of "spooning" AI into friendliness like in some games? Edited July 18, 2011 by Thorfinn the Shallow Minded Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted July 18, 2011 Report Share Posted July 18, 2011 Do you plan to make people capable of "spooning" AI into friendliness like in some games?wat Quote Link to comment Share on other sites More sharing options...
Thorfinn the Shallow Minded Posted July 18, 2011 Report Share Posted July 18, 2011 You receive degrees of favor from them by giving out resources, territories, units etc,... (Please pardon my previous vagueness.) Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 19, 2011 Report Share Posted July 19, 2011 Oh Yea, we want you to be able to ally, betray and trash talk with the AI. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 20, 2011 Author Report Share Posted July 20, 2011 Experimented a little with drawing territories on the minimap. I think the old implementation shaded the whole region in colour and drew boundaries in light grey, but I expect that's bad for readability of the minimap (there's already enough different colours to distinguish and we shouldn't make it worse by shading them all).I tried just drawing the boundaries in colour:but that looks ugly and unclear. It could probably be improved a bit by changing the texture resolution and/or doing antialiasing etc, but I'm not sure how much that'd help.I tried doing a thick alpha-gradient line thing too:which I think works better. (Alpha and thickness etc can be adjusted if desired, and maybe some blurring to improve the sharp edges between colours). Are there any better ideas to try?Separate question: How should territory boundaries be represented in the 3D game view? 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.