MegaGlest / megaglest-source

MegaGlest real-time strategy game engine (cross-platform, 3-d)
http://megaglest.org/
349 stars 89 forks source link

Make command queuing behave more like other RTS games #215

Open Banestorm opened 2 years ago

Banestorm commented 2 years ago

...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:

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.

Rampoina commented 2 years ago

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

Banestorm commented 2 years ago

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.

Rampoina commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

titiger commented 2 years ago

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.

Banestorm commented 2 years ago

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.

pavanvo commented 2 years ago

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

Rampoina commented 2 years ago

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)

andy5995 commented 2 years ago

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

@titiger Forum post related to patrolling