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

Feat(enhancement): Departure angle #8102

Closed
wants to merge 5 commits into from
Closed

Feat(enhancement): Departure angle #8102

wants to merge 5 commits into from

Conversation

RisingLeaf
Copy link
Member

@RisingLeaf RisingLeaf commented Jan 12, 2023

Feature Details

Adds a definable "departure angle" per system. This angle specifies the maximum offset the ship can have from the direction to the destination system

UI Screenshots

Screen.Recording.2023-01-11.at.4.06.51.PM.mov

Usage Examples

system
    "departure angle" [angle]
        [link] [angle]
        [jump] [angle]

you can define a different angle for jump drives and hyperdrives using the link/jump argument

angles in degrees, meaning from 0> to 180

an angle of zero means, that there is no departure angle

Testing Done

see screen recording

Performance Impact

Some extra calculations when jumping, should not be too much

Note

This will be especially useful for ringworlds departure, where the AI navigates you out of the ringworld, but you still jump through it 😆

@RisingLeaf RisingLeaf added the enhancement Issues asking for or PRs making code changes that add new capabilities to the engine label Jan 12, 2023
@RisingLeaf RisingLeaf requested a review from a team January 12, 2023 00:11
@warp-core
Copy link
Contributor

> system
>     "departure angle" [angle]
>         [link] [angle]
>         [jump] [angle]

Gonna need some more explanation of what the children mean/do.

angles in degrees, meaning from 0 to 360

I'm not sure anything outside the range [0, 180] makes sense. Unless the angle actually corresponds to the size of the allowed arc, and not the difference between the current position vector and the target direction.

This angle specifies the maximum offset the ship can have from the direction to the destination system

Suggests it is the latter, though.

@RisingLeaf
Copy link
Member Author

RisingLeaf commented Jan 12, 2023

> system
>     "departure angle" [angle]
>         [link] [angle]
>         [jump] [angle]

Gonna need some more explanation of what the children mean/do.

hmm, thought it would be obvious, one specifies when using hyperdrive/scramdrive the other one when using jump drive

angles in degrees, meaning from 0 to 360

I'm not sure anything outside the range [0, 180] makes sense. Unless the angle actually corresponds to the size of the allowed arc, and not the difference between the current position vector and the target direction.

This angle specifies the maximum offset the ship can have from the direction to the destination system

Suggests it is the latter, though.

It is the difference

@RisingLeaf
Copy link
Member Author

Also, only angles from 0 to 180 make sense yes, everything else gets handled the same, while negative angles make it impossible to jump out of the system.

@petervdmeer
Copy link
Member

Is this PR related to endless-sky/rfcs#1 ?

@RisingLeaf
Copy link
Member Author

Is this PR related to endless-sky/rfcs#1 ?

I did not even know this exists, but now that you point on it, should I follow the proposed syntax?

@petervdmeer
Copy link
Member

I did not even know this exists, but now that you point on it, should I follow the proposed syntax?

Providing review-comments on the RFC (on why another syntax is better) is also an option.
But if the proposed syntax works for you, then I suggest we follow it here. (And if you review that RFC and don't have comments, then I'll also merge it.)

@RisingLeaf
Copy link
Member Author

I left a review comment on the rfc

@Hecter94 Hecter94 added the waiting on reviewer A Reviewer/Asignee needs to do something, e.g. reviewing, making suggestions, etc. label Feb 6, 2023
@RisingLeaf RisingLeaf closed this Mar 2, 2023
@Amazinite Amazinite removed the waiting on reviewer A Reviewer/Asignee needs to do something, e.g. reviewing, making suggestions, etc. label Mar 2, 2023
@Zitchas Zitchas added the orphaned Things that are no longer being maintained by their original author label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues asking for or PRs making code changes that add new capabilities to the engine orphaned Things that are no longer being maintained by their original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants