Skip to content

doc on Formations#783

Merged
TheJJ merged 9 commits into
SFTtech:masterfrom
heinezen:reverse-engineering
Jun 24, 2017
Merged

doc on Formations#783
TheJJ merged 9 commits into
SFTtech:masterfrom
heinezen:reverse-engineering

Conversation

@heinezen

@heinezen heinezen commented Apr 7, 2017

Copy link
Copy Markdown
Member

This PR aims to summarize all results from #705 which @Piruzzolo and me have discovered. I think nobody wants to read through the lengthy discussion to get something done.

  • Principles used in AoE 2
  • Formation structure
    • Land Units
    • Ships
  • Subformation structure
  • Formation Types
  • Limitations in AoE2
  • Pseudocode/Algorithm proposal

@TheJJ TheJJ added documentation Involves the project documentation nice new thing ☺ A new feature that was not there before labels Apr 7, 2017
@heinezen

heinezen commented Jun 3, 2017

Copy link
Copy Markdown
Member Author

Ugh finally done... This turned out to one hell of a document.

@heinezen heinezen changed the title [WIP] doc on Formations doc on Formations Jun 3, 2017
@heinezen heinezen force-pushed the reverse-engineering branch from 1bf9c1c to aceaf61 Compare June 5, 2017 23:41

@TheJJ TheJJ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a lot of cool info :)

subformation[2].order_units(formation_type)
subformation[3].order_units(formation_type)
subformation[4].order_units(formation_type)
subformation[5].order_units(formation_type)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heh, that is the interesting part :) how does the ordering actually work? and how is it combined with pathfinding? might be something for another pull-request though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be that hard to come up with and algorithm. I'll have a look and write it all down..

Comment thread doc/reverse_engineering/formations.md Outdated
case 912:
case 947: subformation[1].add(u)
break();
case 906: subformation[2].add(u)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you pls do:

for unit u in player_selection do {
    switch (u.GROUP_ID) {
    case 912:
    case 947: subformation[1].add(u);
        break;
    case 906: subformation[2].add(u);
    ....

this is more conformant with our code style then.

Comment thread doc/reverse_engineering/formations.md Outdated
.1.2.3.3.3.2.1.
.1.2.2.2.2.2.1.
.1.1.1.1.1.1.1.
.........

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing ......?

@heinezen heinezen force-pushed the reverse-engineering branch from bcc70e4 to af94283 Compare June 7, 2017 11:34
@heinezen heinezen force-pushed the reverse-engineering branch from af94283 to 58bbceb Compare June 7, 2017 11:35
@heinezen

heinezen commented Jun 7, 2017

Copy link
Copy Markdown
Member Author

I've added pseudocode for the add() and order_units() part of the subformation system but stuck to the behavior already described in the doc. Somebody else has to figure out the pathfinding ;-) The ordering is actually really easy because it basically just iterates through the unit stacks. It's astonishing how simple the implementation seems to be when looked at in detail.

@TheJJ

TheJJ commented Jun 23, 2017

Copy link
Copy Markdown
Member

Ready to merge?

@heinezen

Copy link
Copy Markdown
Member Author

@TheJJ yup :)

@TheJJ TheJJ merged commit db7b0d3 into SFTtech:master Jun 24, 2017
@heinezen heinezen deleted the reverse-engineering branch July 2, 2017 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Involves the project documentation nice new thing ☺ A new feature that was not there before

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants