-
Notifications
You must be signed in to change notification settings - Fork 40
Create CreatingFormations.md #176
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
base: master
Are you sure you want to change the base?
Conversation
TheGiraffe3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add links to this page in Home.md and _Sidebar.md?
typo fix Co-authored-by: Loymdayddaud <[email protected]>
typo fix Co-authored-by: Loymdayddaud <[email protected]>
typo fix Co-authored-by: Loymdayddaud <[email protected]>
Done. |
|
Ideally that would be done in this PR, since this is where the file is added. |
|
I'm guessing you're using GitHub's web editor to make these changes.
Once a file is changed by a PR, making further changes to it is a bit more straightforward, you can find a guide here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request#making-changes-to-files-in-your-pull-request If you are using git or GitHub Desktop on your computer, you can alternatively either merge the branches with the other commits into this one, or cherry-pick those commits onto this branch. |
Apologies, I am very new at using Github. |
|
Yes. |
|
done |
petervdmeer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for documenting this!
I added some remarks based on the implementation and the early/original RFCs.
|
|
||
| `rotatable` specifies a degree of rotational symmetry for the formation, such as 90 for squares, and 1 for circles. | ||
|
|
||
| Both attributes essentially add reference directions for the formation, from only one pointing out the nose to any axis or multiple of degrees thereof. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flippable attribute does not add directions, but allows formations patterns to mirror themselves over an axis if the flagship suddenly changes direction. (For example by revere thrusting.)
| ``` | ||
| Will render the first position at 0,200 and then 0,400; 0,600; etc. | ||
|
|
||
| If no repeat attribute is present, all positions will be filled, and any remaining ships will group at 0,0 underneath the flagship. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description for "remaining ships at 0.0" is correct for the current implementation, but do we want this? We might want to consider such "remaining ships" behavior to be undesirable, and file a feature request to let those ships beyond the end position return to the default "flocking" behavior. What do you think?
| repeat | ||
| ... | ||
| ``` | ||
| `arc` populates an arc around the player. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Around the flagship of the formation. (Formations can also be applied to NPC ships.)
| flippable x y | ||
| rotatable <degree of symmetry> | ||
| arc | ||
| start <x> <y> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An arc also has an anchor point (which defaults to 0,0 relative to the ship around which the formation is formed).
|
|
||
| Blocks can be one of three types: `arc`, `line`, and `position`. | ||
|
|
||
| <degrees> are clockwise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
positive degrees are clockwise, negative degrees are counter-clockwise.
| ... | ||
| ``` | ||
|
|
||
| To make formations scalable to any number of ships, a repeat attribute must be applied to the block. Any attribute that exists in a block can be used as a child attribute in `repeat`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to describe that the attributes in repeat are added on top of the original values, so repeating with a position of 1 will make each repeat iteration one larger than the previous one. While repeating an arc with an non-zero angle in the repeat section will make the repeat sections have larger angles.
|
|
||
| # Symmetry | ||
|
|
||
| If a formation is symmetrical, the definition can include an axis or degree of symmetry. In the event of escorts losing their formation, such as when the flagship rotates faster than the escorts can move, they will re-establish the formation referenced from the nose or one of the symmetry directions, whichever is closer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formation is relative to the flagships movement direction, not to the flagships rotation. (Except when the flagship is not moving at all, then it is relative to its rotation.)
(Choose one heading.)
New feature
(If this PR is to include details on a new feature or a change to a feature, include a link to the PR that makes the corresponding change to Endless Sky.)
endless-sky/endless-sky#4471
Summary
Created a new wiki document called CreatingFormations to cover coding formations into the game. Written by reverse engineering syntax in formations.txt