megaglest-source icon indicating copy to clipboard operation
megaglest-source copied to clipboard

Make command queuing behave more like other RTS games

Open Banestorm opened this issue 2 years ago • 10 comments

...by removing the command priority system

The command priority system was resulting in non-intuitive and surprising behaviour when queuing commands. Removing this system results in Megaglest behaving more like other RTS games.

For instance, the following are now possible and weren't previously:

  • Queuing multiple attack ground commands to move along a specific path attacking all enemies on the way.
  • Queuing attack ground followed by hold position, which is a sensible thing to do if you want a unit to guard a specific area.
  • Queuing a move command followed by a produce command, if you want to have your summoner summon a daemon at a specific location.

The behaviour of queuing the stop command is unchanged, and commands that must be the last in the queue, such as morphing, are still properly replaced when something else is queued.

Banestorm avatar Jul 17 '22 05:07 Banestorm

Maybe it would be nice to keep this under a configuration option?

Rampoina avatar Jul 20 '22 05:07 Rampoina

I don't see the point of using a configuration option for this. Most users are unlikely to notice that anything has changed, unless users were for some reason depending on the behavior of shift-queuing some commands cancelling other commands in queue. I'd expect that most users wanting to cancel commands however, wouldn't do shift-queuing to do so, but just issue an order without shift to remove the entire queue at once, or that they would use the stop command.

Banestorm avatar Jul 28 '22 02:07 Banestorm

I definitely don't care for the old behavior but maybe somebody expects/wants it. You're probably right but I'll let somebody else chime in if they care.

Rampoina avatar Jul 30 '22 15:07 Rampoina

The behaviour of queuing the stop command is unchanged, and commands that must be the last in the queue, such as morphing, are still properly replaced when something

@Banestorm why should morphing be last? I think that you should be able to queue commands after morphing, such as commanding your battlemages to attack-move after morphing, etc

I'd rather fix https://github.com/MegaGlest/megaglest-source/issues/236 here, since it's an easy fix.

Rampoina avatar Aug 07 '22 11:08 Rampoina

Just removing this to fix #236

https://github.com/MegaGlest/megaglest-source/blob/b957edcc744868afe37dba5caa4c7849b4070bb0/source/glest_game/types/command_type.h#L428

actually, no, with this the unit doesn't get replaced with the morphed unit until it stops

Rampoina avatar Aug 07 '22 13:08 Rampoina

Queuing anything after morph is not an easy task because you have to know which unit type will be the morph result and only allow commands of the new unit type. And I don't think this is possible with the current GUI where you only see the commands/skills, not the ones of the future unit type. My serious opinion: don't queue anything after morph commands. For queuing attack commands to ground ... Those willl never end if there are any units in range. So queuing anything after this will quite likely not have the wanted/expected result in many cases.

titiger avatar Aug 24 '22 21:08 titiger

For queuing attack commands to ground ... Those willl never end if there are any units in range. So queuing anything after this will quite likely not have the wanted/expected result in many cases.

My understanding is that this is how other major RTS games work as well. Sometimes the use case is to do multiple queued attack to grounds, to say, clear out a full enemy base.

Banestorm avatar Aug 24 '22 21:08 Banestorm

And I don't think this is possible with the current GUI where you only see the commands/skills, not the ones of the future unit type.

@titiger, @Banestorm I send new PR #257 based on this, which allowing to queue command after morphs

pavanvo avatar Aug 24 '22 22:08 pavanvo

Queuing anything after morph is not an easy task because you have to know which unit type will be the morph result and only allow commands of the new unit type. And I don't think this is possible with the current GUI where you only see the commands/skills, not the ones of the future unit type.

I already saw it's not as simple as I thought, this can be left to another PR/issue.

My understanding is that this is how other major RTS games work as well. Sometimes the use case is to do multiple queued attack to grounds, to say, clear out a full enemy base

Yes, this is how it works in most other RTS games I know.

Another thing this allows is a poor man's patrol (which MG lacks)

Rampoina avatar Aug 25 '22 15:08 Rampoina

Another thing this allows is a poor man's patrol (which MG lacks)

@titiger Forum post related to patrolling

andy5995 avatar Aug 25 '22 15:08 andy5995