Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed grouping #3880

Open
Mailaender opened this issue Sep 26, 2013 · 11 comments
Open

Speed grouping #3880

Mailaender opened this issue Sep 26, 2013 · 11 comments

Comments

@Mailaender
Copy link
Member

Mailaender commented Sep 26, 2013

All units stick together as they don't move faster than the slowest unit in the selected group. Original RA95.exe shortcut was F. http://ra.afraid.org/html/ra/hotkeys.html

The original implementation had an exploitable bug as it did speed up slow moving units when grouped together with fast ones. http://ra.afraid.org/html/extra/cheats.html Obviously this should be avoided.

Wished at:

@pchote
Copy link
Member

pchote commented Sep 26, 2013

This would be helpful for the AI too.

Most of the plumbing already exists (see the ActorGroupProxy trait and CreateGroup order) - it just needs some simple code to calculate the group speed and pass it on to the IMove trait on each actor.

@ghost ghost assigned Mailaender Nov 29, 2013
@phrohdoh
Copy link
Member

It feels that if unit A B and C are escorting unit D, but D is the fastest... unit D should slow down to stay with the units guarding it.
This is especially present and would be useful for an MCV. It is faster than most ground units and will speed ahead of those trying to defend it.

@Mailaender
Copy link
Member Author

Note to myself: glue a new GroupSpeed and OpenRA.Mods.RA/Player/ActorGroupProxy.cs together.

@Mailaender
Copy link
Member Author

See also #3866 where this seems to fail. Need to make sure it works well with the AI as we want to win some performance back here.

@Mailaender Mailaender removed their assignment Feb 15, 2014
@ghost ghost changed the title Formations Formations [$10] Apr 5, 2015
@ghost ghost added the Bounty label Apr 5, 2015
@ghost ghost changed the title Formations [$10] Formations [$20] Oct 4, 2015
@Mailaender
Copy link
Member Author

If we want to expand on that, we might want to go with a Age of Empires like formations system which automatically sorts the units with most hit points up front. http://www.gamasutra.com/view/feature/131844/postmortem_ensemble_studios_age_.php?page=2

@whi7ed3vil
Copy link

Referencing #10495, The question is raised as to whether formations should be a default style of movement, notwithstanding formations that would remain so during motion. It is somewhat sensible to maintain an ordered formation with simple selection in many cases rather than bunching into a single point. Perhaps a first-order, second-order system would allow a user to move units while remaining in formation for the first click, but break formation on the second order?

@Mailaender Mailaender removed the Bounty label Nov 10, 2016
@Mailaender Mailaender changed the title Formations [$20] Formations Nov 10, 2016
@Mailaender Mailaender self-assigned this Aug 21, 2017
@xan2622
Copy link
Contributor

xan2622 commented Aug 22, 2017

I have asked 0 A.D. developers, their code to manage formations is contained in these files:

https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/components/Formation.js

https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/simulation/components/UnitAI.js

https://github.com/0ad/0ad/blob/9eb6d217da92ef5f8f25a2138b5a77d1a0e13d0e/source/simulation2/components/CCmpUnitMotion.cpp

Dunno if that helps... (I know it's not C# but maybe it could inspire you to find the way to add RA95 formations).

Btw, I wonder how (visually) you'd like to implement the different formations?
Something like that? (dots on another bar, or on the command bar maybe?)

image0adfomations

@pchote
Copy link
Member

pchote commented Aug 22, 2017

In the C&C games formations duplicate the layout of the units at the start instead of having fixed layouts like 0 A.D.

@Mailaender
Copy link
Member Author

I suggest a new ticket for actual gen2/gen3 formations. This is about the original speed grouping.

@pchote
Copy link
Member

pchote commented Aug 22, 2017

This ticket is called "formations" and links to a web site that explicitly describes

Units in formation will try to maintain their order as you had them when you made the formation

It might be more appropriate to create a new ticket for speed grouping 😄

@jg00dman
Copy link

I think the value of the original implementation was significant. It was possible to shield rocketeers behind tanks for example.

@Mailaender Mailaender changed the title Formations Speed grouping Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants