Jump to content

Territories


Recommended Posts

  • Replies 197
  • Created
  • Last Reply

Top Posters In This Topic

Follow-up to the how-should-territories-look question: How can we implement something like that? (In particular the input is a grid where each cell (tile) is assigned some territory ID, and cells with the same ID are always fully connected via adjacencies (horizontal/vertical/diagonal), and for each territory we somehow need to compute a smooth line that closely follows the boundary cells, then offset it inwards to get a thick band and some separation between adjacent territories. Currently I have no idea how to do that.)

I committed the current work-in-progress version - the easiest way to test it is to open Atlas and create 2 or more gaia/special_settlement entities, and it should render the boundaries (it just reuses the minimap rendering on top of the terrain, which is ugly and needs replacing), and you can drag the settlements around and suchlike. Also there's special/territory_block and special/territory_pull which sort of influence the territory computation in a not hugely intuitive fashion.

Link to comment
Share on other sites

i like it, but i prefer a version with a large gradient: it can be helpful in maps with many objects.

How about gaia? it has a border?

Personally I believe a large gradient would be distracting and hurts immersion.

I think Gaia (unclaimed territory) would have a white border.

BTW: Philip's initial implementation works as advertised! I like how the borders try to follow rivers. One thing I would try to do is have the border either disappear under the waves (not sure how to do this) or float on the top of the water. Either all visible or not visible at all. Seeing it through the water like it is now would look ugly I think.

Also, the player colors aren't correct, but it's only an initial implementation.

Link to comment
Share on other sites

DOUBLE POST, sorry. ;)

So, Kieran and I had a little chat at the behest of Philip. We've pretty much hashed out a territory design that replaces the current "settlement" based design. We recognize that the settlement-based paradigm is very well thought out, since we've been mulling over its implementation for years now, and anything that replaces it must be very well thought out itself. Why replace something that works with something half-assed? In the case of resource shuttling, not only did it make cities look busier and bring about some Age of Empires nostalgia, but it also solved quite a few problems with the old "gathering auras" design, while reintroducing military and economic strategy elements missing from the old design.

Our new territory idea solves no issues with the settlement-based design. It's basically a lateral move, as far as the game design goes. However, I think fans will be more happy with it, which makes it a worthwhile direction. It is a mixture of ideas from Rise of Nations and Battle for Middle Earth II (sorry Brian, no Battle for Middle Earth I). To wit...

Dynamic Territory

Territories are dynamic and change throughout the game based upon the structures built by the players. Each structure has a "weight" given to them and a radius within which this weight has an effect based on importance that building. These values affect borders proportionally. So, a Fortress expands a nearby border more than a House would. Understand? Civic Centres expand borders the most, while Mills expands them the least, and Docks not at all. This is pretty much standard Rise of Nations fare. All buildings, except Civic Centres and Docks (and Roman special siege buildings), must be built within territory owned by the player. If one of a player's buildings falls into enemy territory due to shifting borders, then that building slowly loses Loyalty until finally converting over to the enemy's side. This can be stopped and reversed (slowly gains Loyalty) if the border shifts and the building comes back to the player's side. Of course, the enemy could speed up the capturing process by using his infantry troops to capture it.

Civic Centres cannot be built within range of each other. This is where ideas from Battle for Middle Earth II come into play: Each Civic Centre has a radius that cannot overlap the radius of another Civic Centre. This radius can be used for other things too. The initial idea was to make this radius the "Curtain Wall" idea I proposed. You click a button in the Civic Centre UI that lays down a curtain of city wall foundations at this radius that you can then task your units to build. The curtain wall system is the most unique idea, but another idea would be to use click-drag walls that can only be built within this radius. The click-drag-radius idea gives the player more freedom to place the walls, but the curtain walls are easier for the player and let's them focus on more important things. Other radius ideas include requiring farms to be built outside the radius (making raiding more effective), among others.

Now, the radius restrictions aren't important to the overall idea, so don't get hung up on the wall details and other ideas I presented. The only thing important about the Civ Centre radius is its prevention of overlapping radii, forcing the player to expand, which was one of the benefits of the old "settlement" design.

F.A.Q.

Q. Will the game start out with the map completely divided amongst the players?

A. No. There is a maximum range by which buildings affect the player's territorial border. If the player starts with only a Civic Centre, then the player's initial territory only encompasses the above mentioned radius. The rest of the map is "neutral" territory.

Q. Neutral territory?

A. Yeah, no one can construct buildings in neutral territory except Docks and Civic Centres. Docks, because frequently water courses are not equally accessible to all players and to encourage water battles, and Civic Centres to encourage expansion.

Q. So, all buildings have a "weight"?

A. Yeah, and an aura around them within which the border must lie for the building to have an effect upon it. The "weight" is how MUCH the building can expand the border, while the "aura" is the max DISTANCE of this effect.

Q. "Aura"?

A. The weight of a building gradually diminishes the farther away you get. Say a Barracks has a "weight" of 100, and an "aura" of 10 tiles, then every tile distant from the Barracks the affect it has on the border is reduced by roughly 10% (in this example). The closer the Barracks lies to the border, the greater effect it has on expanding the border.

Q. Are these border effects also affected by the presence of nearby enemy buildings?

A. Absolutely. If both buildings have the same weight and are equidistant from the border, then the net effect will be nil. If your building's effect (weight/distance from the border) is, say, 12 and the enemy building's effect is 6, then your building splits the difference. You'll have 66%, and they get 33%. This can be tweaked, but it is a simple concept.

Q. So if two opposing buildings always split the difference, then how can a building ever fall into enemy territory?

A. If any building, besides a Civic Centre or Special Building, is ever cut off completely from adjacent territory (imagine a solitary Blue Barracks with a Blue ring around it, totally surrounded by Red's territory), then that building (and its surrounding territory) falls into enemy territory. Now, this does not mean the building automatically falls into enemy hands, but its Loyalty does start to drain immediately, albeit slowly. It still functions under the original player's control, but will convert to the enemy player once all its Loyalty is gone (similar to infantry capturing a building, but slower).

Q. Can I upgrade my buildings to have greater Weight?

A. We can tie it directly to the city phase. Researching Town Phase* could increase the Weight of all buildings +X%, while researching City Phase* could increase the Weight further. We can also have technologies that increase Weight.

Q. What happens if the whole map gets covered in player territory and there is no more room in my territory for me to build a Civic Centre (with its radius).

A. You may be out of luck (the map is tapped out). The only options would be to destroy some enemy buildings to open up some neutral territory for you to build on or to capture more enemy territory for you to build on. Or perhaps an allied player will be gracious enough to deconstruct some of their buildings along your mutual border in order to gift some territory to you.

END NOTES: The entire concept doesn't need to be implemented in one go. Conversion/Loyalty and Walls come to mind. A placeholder effect of a building being trapped in enemy territory can be that its Health drains.

*If we go by this new territory paradigm we could (should?) rename the phases to correlate to "expansion" of a province rather than that of a city. Perhaps I - Colony Phase, II - Hegemony Phase, III - Imperial Phase. This is a small detail, however, and should not reflect upon the worthiness of the entire concept.

Link to comment
Share on other sites

Nicely written Michael. I think the dynamic boundaries will make the gameplay more exciting than static settlements.

@Philip: You'll know better, but to me, implementation wise, each tile would store the weights of each player in the tile data. And the player with the greatest weight for that tile is the one who "owns" it, and the border runs along the tiles edge. In the case of a tied weight, the tile is shared and the border runs through the tile.

e.g

A 1 2 3 B

A and B are opposing player buildings, 1 2 and 3 are tiles between the buildings

Simple Case:

If A and B have the same weight and aura, then A gets tile 1 and half of tile 2, B gets tile 3 and half of tile 2.

Complex Case:

If A has weight 100 and aura of 2, then tile 1 is weighted at 100, tile 2 is weighted at 50, tile 3 is weighted at 0.

If B has weight 300 and aura of 3, then tile 3 is weighted at 300, tile 2 is weighted at 200, tile 1 is weighted at 100, tile A is weighted at 0.

With those values, A owns half of 1, and B owns the other half of 1 and the whole of 2 and 3.

So: Tile weight = ( ( aura_size + 1 ) - distance_in_tiles) * (building_weight / aura_size)

Note: The (aura_size + 1) offsets the tiles so the first is the one next to the building, not the one it's on.

(note: bad math? Tell me a better way :-) ).

Make sense?

Link to comment
Share on other sites

All hail to the new terriorries. They really make nice borders, suprisingly historically accurate, too, if settlements are placed on the Peloponnese Map.

O1imz.jpg

Mythos' new border graphics look amazing, too!

EDIT: Oh, we are having dynamic borders now? Even better, 'cause more immersive, in my opinion!

Edited by SMST
Link to comment
Share on other sites

Hmm, reminds me a bit of metaballs. I guess it should be implementable.

How do foundations affect territories? If they have no effect, I can probably build a dozen civ center foundations right next to each other in neutral territory and then finish constructing them all. If they do affect territories, I can probably capture enemy buildings by placing loads of foundations around them and then later I can destroy all those foundations and get all my resources back, so they're effectively free.

Maybe it'd work if they had the same range as completed buildings, but weight is proportional to construction progress? So they'd start with about 0 weight, which would still be enough to claim any neutral territory within range (so you couldn't build two adjacent civ centers), but wouldn't push back any enemy borders at all (so you couldn't cheat to capture enemy buildings for free); then their weight would increase up to maximum at build completion.

Link to comment
Share on other sites

Foundations do not contribute to weight. Weight only applies to completed buildings, else as you described, you'll get cheating tactics. Ideally too there would be a system based on the aura size which prevents people from placing foundations for civ centers too close together. You cannot have two civ centers having an overlapping aura, so a system needs to be put in place to stop placing of foundations if its too close, but that system can wait until the rest of the territories functionality is in place.

So I like your idea of building the weight up to maximal level (which covers the edge cases). But what if a building is damaged? Does it's weight decrease? If so, could this be tied to health? Maybe weight is 1/5 of the health of something. So a civ center with 1000 health would have 200 weight... or would it be too problematic? Having it's own <Weight> value would increase flexibility I guess, so maybe it's pay not to tie it to health?

Either way, do you have enough to go with and get something working?

Link to comment
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.

 Share


×
×
  • Create New...