Advertisement

How can you secure terrain? [RTS]

Started by May 12, 2003 09:55 AM
40 comments, last by Sandman 21 years, 7 months ago
quote: Original post by Argus
Yeah, I'm a bit confused on that issue myself, just didn't have time to post on it.

I mean, Sandman doesn't seem to be talking about a UI enhancement here (although I did get that drift in one post).

But if "The actual advantage of being on higher ground or in a building should arise implicitly from the basic game rules concerning visibility, shooting, movement etc" (my italics), then why add an explicit advantage which equates to : 'you need to do this to win the game' ?


I think I've already answered this: If we wanted to define control of territory as a goal of the game, do we not need some way of determining whether that goal has been met? Or do we wait until one player realises he can't get anywhere and gives up?

The advantages of being on higher ground or whatever is that it (potentially) lets you control more terrain with fewer units.

quote: Original post by PouyaCat
Wow. I think I finally might have found a use for Voronoi diagrams ^_^ With these, you could determine for any given point on the map, what unit is closest to it. Grab the closest units, get their distances, see who is most effective, that one has the control.


Cool, I'll have to look them up. Might need a bit of tweaking though: after all, it isn't necessarily the nearest units that exert the most influence: player 1 might have a couple of units nearer a given spot, but player 2 might have hundreds of long range artillery covering it from the other side of the map. Player 2 has more influence over it, even though player 1 is nearer.

[edited by - Sandman on May 14, 2003 6:25:35 AM]
Okay, I''m working on a Voronoi-diagram theory now, and I think I might be on to something.

First, I decide on all the points that will make up the "centers". These are basicly all the units. Then I draw lines between units (both friendly and enemy and neutral) to connect them to each other; making sure that no lines cross each other, and there are no "open routes" between two points (where if you would draw a line, it crosses no other lines. if you can draw a line, draw it). The basic start of a Voronoi diagram. However, for each line, I would also store the distance between the start and the end, and it''s direction (in 3D).

For a normal Voronoi diagram, one would look up the middle of these lines, and connect these to each other. However, this would assume that every unit is equally important. This is not the case. Thus, for every line we need to look at the two units that it connects, find out how "strong" both are, and from that data determine where on the line you create your connection point. This would be dependant on the type of units, their altitudes, the general area they are in, etc. etc. It would be quite possible for their area''s of controls to overlap; just average them out to get the point. Or it''s possible for them to not even reach each other, requiring two points on the line, with the center piece belonging to neither player.

This leaves us with one problem; what if the area of influence of a unit spans beyond a friendly unit? This might be the case with a soldier standing between a friendly artillery unit, and an enemy tank that is far away. The soldier would be connected to the tank, and because it is weak it would not control the area in between itself and the tank. And the artillery would normally reach out there as well, but now it can''t control it because it''s influence stops at the soldier. Therefor, when the area-of-influence of a unit might go past a friendly unit, you would have to calculate past that second unit. Calculate how much "strenght" the unit (artillery in this case) has left, and see if that would be stronger than the unit there (soldier in this case) with regard to the specific opponent for that line (tank in that case). If that is true; recalculate the value for that line based on the strenght of the artillery. This might even span several infantry units in densely populated area''s.

Because of this, the best way to generate this step of the diagram, would be to iterate through all the units, instead of through all the lines. It would probably be dead slow though. Once you have all these points on the lines, it''s time to connect them. Trace a route from that point to the unit the line belongs to, find the next line, find that point, draw the line between the two points, and color it in, perhaps shading it according to distance to the center unit (if you decide to map this to a 2d bitmap for graphical feedback that is). Repeat for all the points you have created. Then look at the 2d bitmap to see who has most control.

What do you think...?
Advertisement
sounds like a good approach, but I think you´re getting too technical before the basics are covered....

back to the control issue... I think that it shouldn´t (only) be an explicitly stated goal of the game, but also a logical result of the game mechanics.

here´s a few ideas:

-) since a uniform control priority distribution probably won´t do it in the long run there´ll have to be some specific points of interest. some strategic, some economic.

-) strategic points would be bridges, passes etc. here the control aspect is equal to the chokepoint issue in traditional RTS.

-) economic points would be mines, towns or factory complexes, supply lines... since these all closely relate to the whole resource issue they probably can´t be decided before that topic is addressed.

-) then there´s the issue what the player can gain by controlling "empty" land. every controlled area would have to affect something in order to have a justification, this can either be the items nearby (increasing factory performance or the efficiency of a supply line) or some more general aspect (even if its just counting points for every minute a certain area is held).

-) have bonuses to untits operating within controlled areas. movement, defense, special abilities such as digging in or building fortifications.

quote: Original post by Hase
sounds like a good approach, but I think you´re getting too technical before the basics are covered....

back to the control issue... I think that it shouldn´t (only) be an explicitly stated goal of the game, but also a logical result of the game mechanics.


I see what you are getting at. However, I'm tending towards leaving these considerations to the campaign mode (the war), rather than the individual skirmish games (the battles)

I envisage a campaign mode in which a player is presented with a large scale map (world, continent, whatever) broken up into different regions. Some regions might be resource rich regions, others might be economically valuable, others might be tactical. Others might not give any concrete benefit whatsoever, but might be needed in order to maintain logistics, or to act as a staging point for another area which does offer a clear benefit. The player would choose a region to attack, and then fight a skirmish game for control over that region. The resources in a given region are not available for use while you are fighting over it: you won't have access to them until you've secured the region, and even then it might take several campaign turns before you get to see any real benefit.

[edited by - Sandman on May 14, 2003 8:00:33 AM]
quote: Original post by Sandman
I''m a bit concerned there seems to be a misunderstanding here. The control thing is not intended to replace the combat system in any way, but to serve purely as an indicator of who controls what.


The problem (which I tried to express in my first post, but failed dismally at), is that control is abstract anyway. If two equal units stand at opposite sides of the battle field, who controls the patch of grass in the middle? Now what if you move 1 step closer to the first unit? Now what about if the 2nd unit potentially has air power as backup and the 1st unit does not? How much of the map do I control if I have tanks everywhere, but the opponent has invisible stealth tanks? (And how do you relay that to the player without giving the game away? Although that''s purely an implementational problem.)

The idea of control is so abstract that you either have to embrace the abstraction wholly, or abandon it, in my opinion. No amount of complex algorithms for calculating the area encased by a given set of units will take into account all future events.


[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
quote: Original post by Kylotan
The problem (which I tried to express in my first post, but failed dismally at), is that control is abstract anyway. If two equal units stand at opposite sides of the battle field, who controls the patch of grass in the middle? Now what if you move 1 step closer to the first unit? Now what about if the 2nd unit potentially has air power as backup and the 1st unit does not? How much of the map do I control if I have tanks everywhere, but the opponent has invisible stealth tanks? (And how do you relay that to the player without giving the game away? Although that''s purely an implementational problem.)


I''ll grant you that it''s not necessarily a clear black and white issue: but I''m not so sure that it is totally abstract. For any region of the map you can ask yourself these questions: If I parked a non-combatant unit in this spot, would you expect it to survive? If my opponent did the same, would his survive?

If the answer to both of these is NO, then that spot is no-man''s land. If the answer to both of these is YES, then that spot is essentially uncontrolled, undisputed territory. Otherwise, it should be fairly obvious who controls that spot.

Of course, certain units like Air units and long range artillery have huge regions of influence, and have the potential to render large areas as being ''no man''s land'', and make it difficult to control more than a few percent of the map for either player. Is this a problem? Or does this result in a situation not unlike real life, in which gaining air superiority and taking out enemy artillery are both key concerns?
Advertisement
Someone may have already metioned this, but i''d imagine that after you''ve worked out your preliminary areas of control (due to influence of units etc.) you''d need some sort of flood-fill method to work out the final amount of control. After all, a couple of units, well placed at choke points can exert much more influence this way. I assume you''d let influence bleed around obstacles, but gradually falloff. How you manage this when you''ve got non-encosed areas i''m not sure (say, only control of 2 of 3 choke points). Probably you could fill from every unit (or every position controlled by a unit?), and if theres a certain amount of overlap, then this could be considered controlled.

Sounds like an expensive amount of computation, but thats a whole other problem
Hi !

It''s just a suggestion, but do you know the game called "go" ?
The goal of the game is controling the most part of the board, which is what you want.

----
David Sporn AKA Sporniket
I''ve been working more things out on paper, and I think that the calculation of "control" is important indeed.

The situation I''m working from, is sort of simulated long-term war (as we are probably all are ^_^ so not really real-time RTS). What is an important strategy? To cut off enemy troops from their supplies. What is the result of that strategy? Enemy troops will loose morale, they can''t heal themselves, tanks run out of fuel, units run out of ammunition. How do we want to simulate this?

Personally, I think that actual resupplying would be tedious (too many freight trucks moving around), and not be important anyway since it''s not really real-time. So what I''m thinking about, is automaticly "regenerating" fuel, ammo, and some health. However, only if the unit is in friendly territory, or has access through no-mans land to friendly territory (if the second is the case, regenerate slower). Also, if you DON''T have access to a resupply node through friendly or no-man land, meaning you are surrounded by enemy territory, these values will deteriorate. Fuel and ammo can run out completely, health will stay at a bare minimum. Add to this, that you can''t build tanks on the battlefield (silly concept in my mind), and that your troops are at the beginning about as strong as your enemies, and that you need as many of your troops to survive as possible, and you have to make new tactics.

Rushing your enemy means that two armies of equal strenght duke it out, potentially knocking both armies out, and at least crippling the victor. So you need to weaken your enemy first. If you can tactically surround him, or position artillery in such a way that you can close off (or bottleneck) his access to resupply points, you weaken his units overtime. You can then make guerilla attacks at his troops, do some damage, and retreat before any real casualties (mostly tanks :D ) occur. Your troops can repair and resupply, his can''t.

I''m looking at a World War 1 technical level btw In any case, knowing who controls what area is important for the computer itself. Perhaps it''s less important for the player to know, but it''s essential for an AI to create a working tactic against a player. Oh, and I''m also toying with the idea of having communication lines... meaning that if your troops are caught in enemy territory, and they have no radio man nearby, you can''t give them orders (forcing their AI to duke it out for themselves; something you don''t want to happen). This would also make it dramatic if one of your towns gets surrounded, and there is no radio station inside. You would no longer be able to give new orders to your troops, meaning you would have to force a small group through the enemy lines to get a radioman there. Just a small idea ^_^
quote:
Original post by Hase

back to the control issue... I think that it shouldn´t (only) be an explicitly stated goal of the game, but also a logical result of the game mechanics.


Exactly. In fact, I don''t think the importance of ground control is even affected much by the game goals. Z has a capture the base goal for instance. It could just as well have a "destroy the enemy" goal, with little gameplay changes. Speaking of Z, did you refer to the 10 years old dos game or the new one?


quote:
-) since a uniform control priority distribution probably won´t do it in the long run there´ll have to be some specific points of interest. some strategic, some economic.

-) strategic points would be bridges, passes etc. here the control aspect is equal to the chokepoint issue in traditional RTS.

-) economic points would be mines, towns or factory complexes, supply lines... since these all closely relate to the whole resource issue they probably can´t be decided before that topic is addressed.

-) then there´s the issue what the player can gain by controlling "empty" land. every controlled area would have to affect something in order to have a justification, this can either be the items nearby (increasing factory performance or the efficiency of a supply line) or some more general aspect (even if its just counting points for every minute a certain area is held).

-) have bonuses to units operating within controlled areas. movement, defense, special abilities such as digging in or building fortifications.


I''ll add to the list:

-) fighting retreats, trading space for time should be effective defense strategies. This can happen if the effective force of fighing units is rapidly diminshed, but it can be restored through a retreat. Panzer General excells at this, Age of Empires doesn''t. While in both games it is cheaper to restore units than to build others, the difference is that in PG units survive a lot longer, so it is much more feasible to retreat them behind the front lines. This also makes encircling strategies an effective means of destroying enemy forces by denying the advantage of retreating.

-) players should have the choice of a tradeof between casualties, consumption of ammo, and advance speed. The choice between a rout, a fighting retreat, a determined defense, a careful attack or an all-out attack.

-) players should have means to pin down enemy movements, at least temporarily. Moving under an artillery barage for instance should be hazardous, more so for rushing troops, more so for unarmored troops.

-) flanking should be an effective strategy. Attacking from multiple directions should yield an advantage. Close combat does this using a complicated and realistic fog of war system. Directional fortifications are another idea.

This topic is closed to new replies.

Advertisement