Archived

This topic is now archived and is closed to further replies.

Sandman

Keeping pace with events (RTS)

Recommended Posts

(digression from Damage Model thread) One of the problems with RTS''s is that the player is too busy reacting to have time to act . Events often happen very quickly, and since the game is in real time, the player does not have time to mull over his options. Turn based games do not suffer from this, each player has all the time in the world to examine his opponents moves and try to second guess his intentions. How can we bring RTS''s into line with their turn-based cousins? Some of my thoughts: 1. Visibility The standard "Fog of war" model is very flawed in my opinion. Units cannot react to enemy units until they are right on top of them, meaning that the player only has a small amount of time in which to prepare a response. Also, knowledge of the terrain is important too - I think that should be known from the start. Finally, player notification of events - typically the player is not told he is under attack until he starts taking damage. Usually by then it is too late, the attackers have either done their damage or they have been annihilated by my defences. I want to be told as soon as the enemy is detected . Plus I want more realistic lines of sight, so I can see the enemy long before they are in range (unless they are being suitably sneaky) 2. UI simplicity vs detailed orders. This is a tricky one. On the one hand, you really dont have time to deal with a complex interface. On the other hand, if you could specify more detailed orders then there would be less need to "babysit" your units - I personally hate having to flip between 10 different units to make sure they are doing something useful. AoK offered an "extra" interface which had more advanced options, giving you more control - I think something like this is ideal. The complexity is there for people who want to use it, but it is not mandatory for the player to wrestle with it. (having said that, despite AoK''s extra controls, I still lost count of the times my bombard cannons wandered off on their own after some enemy unit, despite being told to stand their ground) 3. Units doing 2 things at once Has anyone else noticed how annoyingly static units in RTS''s are? Is there some unwritten law that states "Though shalt not move and fight at the same time"? While for some units it is understandable, I still see no reason why my heavy cavalry has to bring its full on charge to a halt just to slay a peon that gets in its way. This would also result in less babysitting of units - I would have to tell my units to attack some enemies that intercept them, they would just do it automaticallywithout stopping. As usual, your ideas and feedback are welcome.

Share this post


Link to post
Share on other sites
well...

1. remember the good old dune 2? "ordos unit approaching from the north"
and only then "our base is under attacked". if they could do that
ten years ago, they can do that now.
or, a better idea, watch towers. finally those
c&c buildings have use, if you put them, you can
see for distance - thus giving you a fair timed warning.

2&3. well, thats not the user interface fault.
well, maybe, but it should be looked over a different
view:

you suppose to be the leader controlling the forces,
if you tell then to retreat, or to move, no matter
what youll tell them - they will always try to protect
themselves. even by moving or retreating there are
units that are sopposed to cover the others.

what i mean? even that they are units for you to control
they are certainly not brainless.

Share this post


Link to post
Share on other sites
1) Knowledge of terrain
This is where scouting becomes an issue.
I''ve always favored the idea of having two armies send out scouts to survey the terrain a few minutes before the actual battle. (you can do all kinds of fancy-smancy stuff with these scouts -better scouts will relay better information faster- but even keeping it simple works) You as the commander won''t get to know EVERY detail of the terrain (unless the scout is some elite expert scout that can survey the entire battlefield in a glance and remember every detail) but you''ll be able to make tactical choices based on your knowledge of the terrain, limited as it may be.

1a) Unit line of sight & co
I guess it depends on what position the player is in. Is he a godlike creature that can be at all places at once, see everything his forces see (command & conquer style), or does he actually have a physical location on the battleground (ala... hmm, don''t know if that''s been done) which would mean, you as the player can only see what he sees, but you can give orders based on incoming messages (you''d be more of a general in a hut, listening to transmissions, putting flags onto a big map to indicate battle progress).
In the first scenario, you CAN have your forces tell you ''we''re under attack'' or something. You can also automatically (optional) zoom to the location of battle or something. If you''re a Godlike creature anything is possible. But I think you should make it a choice to the player. You should think of EVERY possible option the player might want to have and give him the ability to choose which one he wants.
a) just an audio report: ''sir, our northern front is under heavy attack
b) zoom automatically to point of battle: ''sir, our northern...'' ZOOMmmmm ''Ah, there you are, sir. As you can see, we''re under heavy attack.''
c) use multiple windows. The player can edit size and location of each window and keep his eye on as many locations as he wants. Switching between windows could be done with hotkeys.

2) UI simplicity vs detailed orders
I still think it''s best to give users the option to predesign unit bevahiour patterns BEFORE the battle even begins. Put them in groups (as any general would do), tell them what to do during the battle. Give them lots of IF-->THEN commands.
Then during battle, you can see the flow of battle and adjust your plans with simple, big commands. And yes, you should let players play with minimal difficulty but also give players the option to control units in a different, more difficult, but eventually more efficient way.

3) Units doing 2 things at once
I guess it''s all about AI here. I''m really not in a place to make any comments about this. But yes, I HAVE noticed it. And I don''t like it. I just don''t know if there''s a good alternative (without using too much processing power).

Share this post


Link to post
Share on other sites
As for the driving&firing think, it is easy to do. Just make the tank two entities, the turret and the chassis. When you tell it to move somewhere, the chassis moves there, and turret ''tags along'' (technicly that is). However, the Turret AI will always scan for possible enemies. And will turn to fire at them. But since the turret can only turn, not move, the tank will still head in the same direction.

Only tricky thing is to tell a unit to attack someone. That gwould imply 2 messages: The Chassis has to follow, and the Turret has to track the same enemy. Still, it should be easy to implement.

Share this post


Link to post
Share on other sites
I agree with Ronin, it shouldnt require much of the computer to enable units to do two things at once. It doesnt even have to be complicated interface-wise - all I really want is for my units to defend themselves sensibly while they are on a mission. So if my tanks are attacked on their way to blow up the bridge, they shoot back at their attackers without hindering their progress towards their real mission. With the current state of affairs the unit either stops and has a fight (annoying because you might need it elsewhere in a hurry, or it might be outmatched and bound to lose) or it just carries on going, whilst getting the crap shot out of it. This is particularly annoying when you are trying to attack a unit and you ''miss'' it with the mouse - your unit stops attacking and trundles happily straight into the enemies guns (and usually dies)

Of course, certain units eg artillery, may need a more stable platform from which to fire, and would need to be stationary. Ideally, these should be protected by other units, but even in isolation they would have some light arms which could be fired whilst on the move. Even if it is just a case of the gunner popping his head out of the top and cracking off a few shots with a pistol.

I think I might be getting slightly OT... the point of it is, I dont want to have to babysit every unit in the game. I want it to do what I tell it to do, when I tell it to do it, and deal with unexpected events in a vaguely sensible and realistic manner.

Share this post


Link to post
Share on other sites
The only requirement for getting a unit to both path a long distance and attack anything sensible on the way is how much of the CPU you want to use.

If the game just tells the units to move from point a to point b and leaves them alone, it''s a lot less work than having to continually check and recheck the unit line of sight as the units move.

This is the basic difference between the standard move, and the attack stance / patrol in Age of Empires II.

There''s certainly also a gameplay issue of what''s "sensible to attack" because the player might be relying on those heavy cav to get to the battle ASAP.

http://www.ensemblestudios.com

Share this post


Link to post
Share on other sites
How about this? Let the player create plans =). Basically, you have a window of some sort, your "planning window". You get a great big map, and you can place units into groups, etc. When this window is open, the game is paused. Allow the player to set paths for units (waypoints, etc), allow the player to either a) predict enemy locations, or b) reveal enemy locations as shown by scouts. This would allow the player to create VERY detailed plans, that could be executed with a click of a button. Perfect pincer strikes, etc.

Second, A more efficient method of warning the player, would use a network of guard towers. When a guard tower sees the enemy approaching, it yells "Enemy Approaching", and shoots a laser beam, signal thingie at the tower that is next closest to the main base, if it is within range/sight, etcetera. When that tower gets the laser, it bounces it along the network, all the way back to the base. So, the player hears "Enemy Approaching", hits the "Center On Base" Hotkey, and follows the path. Perhaps the color of the path could change color to indicate urgency. This would give towers a VERY real use, and would encourage players to use better strategy when using them, etc.

Just my thoughts =).

Z.

Share this post


Link to post
Share on other sites
quote:

The only requirement for getting a unit to both path a long distance and attack anything sensible on the way is how much of the CPU you want to use.

If the game just tells the units to move from point a to point b and leaves them alone, it''s a lot less work than having to continually check and recheck the unit line of sight as the units move.



Hmm. I hadnt thought of it like that.... Thats the problem with wishlists, you tend to forget technical issues
There are a few optimisations you could make that might help matters - using some sort of hierchical visibility checking for example, so if you have a big clump of units you save yourself cycles by calculating LOS for the group as a whole rather than doing each individual unit. This could work both ways, so if one of a "group" of enemy units is spotted, the whole lot are. The grouping would probably be based on physical location rather than any player defined grouping... Will have to think about this one....

quote:

This is the basic difference between the standard move, and the attack stance / patrol in Age of Empires II.

There''s certainly also a gameplay issue of what''s "sensible to attack" because the player might be relying on those heavy cav to get to the battle ASAP.



well, anyone who is attacking you is a fair target. This is another possible optimisation, ie. you dont need to recalc the line of sight unless you are being attacked. Close combat only units are a bit of a problem because they wont be able to fight back without being slowed down (most ranged units will be able to shoot on the move) I think a stance based system or urgency setting is the way to go here...

Hmmmm. Ill think some more over the weekend, it''s time to go home...

Share this post


Link to post
Share on other sites
1. Visibility could be enhanced if units would have not only a view range value, but a visibility attribute. IE. a scout can only be seen from very close range, while a castle can be seen from accross the map.


Total Annihilation had a superb visibility system. Best I''ve ever seen anyway. It had very good realistic fog of war, like in others RTSs, but the player had _a lot_ of other options for keeping an eye on the battlefield : sonars, radars, fast scout units (some also had built-in radar ; combine these with patrol orders), radar jammers, commander cloaking. Direct visibility was still a very important bonus, but surprise attacks were never a problem. Cheap defenses with long range allowed for in depth defence : the enemy couldn''t even approach an expensive structure without fighting some non-vital defences first.

And in the skirmish fighting, map could be discovered at game-start. That''s how I always play, I find scouting extremely annoying. I might reluctantly accept a black map, but only if scouting would be automated.

Age of Empires was also pretty nice with scouting. In the Castle Age (when the serious fighting stars) players had access to technologies that allowed the buildings to see _very_ far. By building cheap things like scout towers or houses, a player could oversee a large portion of the map.

Scout units had the ability to patrol too, so a carefull player could hardly be caught off-guard.

2 & 3 TA had exquisite UI too, and the units in TA did things on their own. If you gave a bot/tank the order to go somewhere, his legs/main body started walking there, but his upper body/turret kept firing at the enemy (unless you stoped him from firing by a direct order). The fire options ''fire at will'' ''fire back'' and ''hold fire'' where also very usefull.

Share this post


Link to post
Share on other sites
I think Silvermyst and Zaei have it right. Break the game into a turn/rts mode where you have a pre-planning phase before the real-time begins. As Silver pointed out, a general gives orders to units but these orders also have "standing" orders. These are general guidelines that units follow.

For example, you could set an aggression level that would set what would happen if a unit were to see an enemy unit while it was given a simple "move" order. You would have to set some kind of priority that a unit would follow...i.e, a unit is set to move to a position, but discovers the path it is set on is offering a ton of resistance. Does it keep following orders or find an alternate path?

Here are some examples:

Reconnaissance: scout for enemy units AVOIDING fights
Force Reconnaisance: scout for enemy units, picking fights as opportunity presents itself
Search and Destroy: scout for enemy units, engage when found
Distract: Lead enemy units away from a position
Interdict: Intercept known enemy forcesby whatever means forcing them off their planned course
Harrassment: Hit and run raids
Assault: Full attack on known positions
Fallback: Organized withdrawal, fighting only to preserve unit
Defensive Fallback: Slowly give up ground fighting defensively while falling back.

Also, I think you will need to code some algorithms that let the units decide what their relative "odds" are. For example, if airborne infantry with no AT weapons comes in contact with some Main Battle Tanks and supporting infantry....I don''t think that unit is going to hold it''s ground to the last man. Matter of fact, it probably won''t even hold its ground unless it''s got VERY high morale and/or good leadership.

Finally, orders are issued to groups, not units. If you order units directly, then it becomes more of a tactical game, not a strategic one. So, how do you assign these orders? Via a mroe complex interface or a pre-planning turn? I think it can be a combination of both.

Man-o-war had a pre-plan phase and once you issued your orders, it went into real-time phase. The interface however was non-existent (given the techbnology of the time, it was fair), but I think you could also have an interface that you could "program" your units to follow. I think the key here is having some pretty intelligent Unit and Leader AI.

Share this post


Link to post
Share on other sites
I forgot to add that I too hate having to "babysit" units because they are too stupid to know what''s good for them. That''s why I call RTS''s today, Micromanagers or click fests. There''s really very little strategy involved, since as Sandman pointed out, it becomes REACTING and not acting.

Now, a part of good strategy is forcing your opponent to react to your moves, but that''s not the case with RTS''s. They just require too much hand-holding to implement more sophisticated strategies.

I think one thing that can be done other than a pre-planning turn phase, is to REALLY slow down the pacing of the real-time, ala Starfleet Command. If units move very slowly, then it will give you more time to think about what needs to be done, and you won''t miss a group you created that you had PLANNED on assualting with, but forgot because a base of yours came under attack.

Share this post


Link to post
Share on other sites
Some ideas (that would take up lots of power to run, but this seems to be a wishlist, so here''s to the future!):

Visibility: 2 Screens that can be toggled between one another. One is you basic every single RTS screen; the other toggles to a fullscreen map for quick survellience of the entire map. The coolest part of the idea...if you have mad haxor skills, give the game an option to run these screens on dual monitors with a keyboard toggle interface between the two, for those hardcore gamers running multiple video cards and/or monitors. But definitely keep a single monitor option available to toggle between the two.

Um, about reacting...yes, I hate some aspects. I think that all aspects of the game that do not directly involve attacking or defending enemies should be handled once it is set in motion, i.e. less lame peasant management.

--OctDev

Share this post


Link to post
Share on other sites
The Command and Conquer games (and doubtless many others which I have been too deprived to experience) let you assign units to a quick-key, so that you could quickly jump between about 8 different places on the map. This kind of thing can help with the player''s visibility, especially if you can place these viewpoints in locations rather than just on units, and perhaps have a row of tabs (like the Windows taskbar) along the top or bottom of the screen to flip easily between them. It should be really easy to implement: basically, you just store 8 (or more) sets of x,y camera coordinates rather than 1 set, and another variable to keep track of what the current view is. So there''s little reason why all games can''t support this.

Share this post


Link to post
Share on other sites
Kylotan

Even with hot keys, it''s very diffucult to launch coordinated attacks. And it still means that you can only have one group do as you want at a time. It''s still sort of a "mob" ordering. I want more fine control than that, plus the ability to order groups of groups to different tasks...all simultaneously.

I think the only way to have this level of control is through a pre-plan phase, or issuing order to AI commanders, who in turn order their subordinates. And the only way to do this is to give all the AI leaders a set of guidelines, parameters and protocols if you will, on how to go about their orders. I just wish there was more I in AI. I''m definitely not a strong enough programmer to help out in that respect....

Share this post


Link to post
Share on other sites
I agree with Dauntless: hotkeys are nothing new, and they simply arent enough. I find myself clustering 4 - 5 large groups of similar units together and using the hotkeys to coordinate them - but there is still a lot of babysitting involved. Some units move faster than others for example (it would be nice to be able to group different units and have them move at the pace of the slowest - this would save a lot of babysitting IMHO, since you could be sure that they all arrived at the same time, instead of turning up in dribs and drabs and getting annihilated by the enemy.

I think view distance is very important. I think units need longer lines of sight, and as already mentioned, they need to let you know when they have spotted the enemy. You would then have time to respond to the potential attack. I like the idea of variable visibility of units - it is more realitic to make visibility an attribute of the thing you are looking at rather than the thing that is doing the looking. There would also be a distinct advantage to attacking an opponent with a small group of infantry rather than a tank rush: the swarm of tanks would be spotted a mile off, and bombarded into oblivion before they even got close. The infantry on the other hand, could sneak up close and do their damage before you can react. The time it takes them to get to you would be your planning phase (this is how it worked in shogun - you could see your opponents miles off, you has a few minutes to order your troops and prepare for the battle).

I am still worried about UI complexity though. On the one hand, it is difficult or impossible to manage complex strategies with the one click interface we have now. But if the interface were more complex, would the player be struggling to cope with it all?

Share this post


Link to post
Share on other sites
SANDMAN:

For ''medieval'' rts games, I think the interface should be based on the old ''flag'' system. Generals used flags to signal orders to their troops.

I think that would be an excellent way to design an interface: give the player the ability to preconstruct orders and then have those assigned to hotkeys. The smarter the player''s troops are, the more commands they will be able to understand. The more commands they''re able to understand, the more flexibility you have as a general in your combat strategy.

I think there are two ways to tackle the questions posed in this thread:

1) How do we deal with these issues in games that would work much like existing games?

2) How would we design completely new types of games using the perfect answers we find?

Should we aim for both?

Share this post


Link to post
Share on other sites
Units doing two things at once has already been done, in sudden strike (ww2 rts). If ur units retreat the tanks will still fire while rolling away. or it miht be in sudden strike forever (expansion pack) one of those,

Later

Share this post


Link to post
Share on other sites
I guarantee you I can design (although not yet execute) an excellent set of UI interfaces for multiple different control styles. If you dig around under my profile you will see what many of my ideas are, and a majority of them do focus on the UI (because there''s never enough friggin detail for me!).

Yes, the devil is in the details, like layout, visibility, accesibility, and so forth.

Pathing - Done. Objectivizing - Done. In-game data management w/prioritizing - Done.

--------------
-WarMage
...the impossible problems I solve right away, Miracles take a few minutes.

Share this post


Link to post
Share on other sites
Another game that has some good RTS ideas, even though it isn''t itself an RTS, is Ogre Battle 64.

First of all, visiblity was not an issue, as it was assumed that, since the battlegrounds were not unexplored territory, the player''s forces would already know the layout of the map. (Although in the original Ogre Battle, there were also places that were hidden, so that you would actually have to look for them.) Enemy groups aren''t shown on the map unless they are in the field of view of one of your units. Most units could see enemy units from quite a distance in front of them, but had limited viewing range behind, although flying units had larger fields of view that went the same distance in all directions, making flying units quite useful as scouts.

As for marching orders, you basically told a unit to go to a specific place, and had the option of making them go straight there, or having them seek out or avoid any enemy units they encountered. You could also command a unit to seek and destroy a specific enemy unit, though they would stop if they were unable to see the target for some time. A stationary unit could be ordered to hold it''s ground, attack approaching enemies, or flee if enemies drew near.

And best of all, the player could essentially pause the game when scrolling around the map or giving orders.

Share this post


Link to post
Share on other sites
When you think about it, goups of units are given orders, not individual units. Plus, a group of units will carry those orders within different paramters as I suggested from my examples above.

In tabletop wargaming, it''s very common to have different unit orders such as "Hold, fire, Move, Conditional Move, Conditional Fire, Rally, Reorganize, Form....etc". I don''t see why this can''t be done in an RTS.

What I really think needs to be done though is have group variables defined by the orders on which they are given. The most fundamental would be an aggression/caution variable which would dictate how committed to an offense the unit would be. Initiative would be another primary stat, and would determine if the unit would attack a unit of opportunity (i.e. fire at will, fire only in defense, fire only by command, fire only if superior, etc.). Another variable would be pathfinding...the higher the stat the more likely the unit will attempt to find a different path to its objective otherwise it will wait for direct command. Motivation is a little hard to describe, and it''s partially covered by aggression, but it basically covers how willing a unit is to suffer losses. It''s therefore possible to have a high aggression low motivation ordered unit which will make a hard strike at first, then pull out as soon as it takes casualties.

so you could have something like this...

class Orders
{
public
RetrieveOrder( ); /*accessor function for unit object to retrieve order settings (through a virtual function to an array??)*/
InvokeSettings(int, enum, int, int); /* this is important and will be called on alot. It''s how the officer "orders" the unit*/
private
int Agression;
enum Initiative;
int Pathfinding;
int Motivation;
};


So going back to my order list and variables set from 1-10. I''m assuming I''d probably have to set up pointers to these objects on the heap, so you''d do a New Order = SearchDestory, or better yet:

order * pOrder = SearchDestroy

pOrder->SearchDestroy.
Agression = 8, Initiative = "fire at will" (I''d set this up as an ENUM constant), Pathfinding = 7, Motivation = 5

pOrder->Recon.
Agression = 3, Initiative = "fire only at command", Pathfinding = 10, Motivation = 2

And so on and so forth. Here I think is what I''d do with this order class. And the more I think about it, the more I think it should be an array instead. Why? Think about the officers. You the player will access your unit groups via your sub-officers. You pass these "order objects" to your commanders who can call them with the RetrieveOrder function and he in turn passes this as an array to the unit groups that use this array as parameters for their AI behavior.

My programming is very limited, so if anyone here sees flaws in my logic, please point them out to me. Hopefully though you get the idea. You have an order class which in turn would get turned into an array somewhere on the freetore. You pass this order object to your AI commanders who then issue the orders to your unit groupings. I can see you asking why bother with the indirection of going through your sub-commanders instead of ordering the troops directly?

Partially out of realism. In RL, the general doesn''t order squads what to do. Also, it adds a very real possibility to strategy gaming....keeping your officers alive. When an officer gets taken out, how do you pass on orders? Obviously, chain of command gets re-established, but it takes awhile, and during this point, the enemy can seize the initiative.



Share this post


Link to post
Share on other sites
Dauntless: I posted some ideas on orders a while back (here) that seem similar to what you are suggesting. I hadnt thought of the initiative thing, but it had occurred to me that a stealth option may be useful. Stealthy units would obviously take longer to reach their target but would stand a good chance of catching him unawares. I am a little concerned about the complexity of the UI though.

As for units, my basic thinking is that units are automatically formed into squads - the player never has to piddle around with individual soldiers, but just issues a command to a squad of say, 5 soldiers, or 3 tanks or whatever. This is the smallest unit the player gets to control. What about larger groupings? (eg platoons/divisions/companies) It would be nice to group say 30 different units into a single platoon, and give the platoon orders - these orders would form a kind of overall objective - and then give individual units separate orders, on completion of which they could return to the main objective. Thus the player could be reasonably sure that even if his units are being ignored, the chances are they are doing something useful...

Share this post


Link to post
Share on other sites