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

Implement scene switching mechanism #60

Closed
aggregate1166877 opened this issue Oct 11, 2021 · 1 comment
Closed

Implement scene switching mechanism #60

aggregate1166877 opened this issue Oct 11, 2021 · 1 comment
Assignees
Labels
high-level concept pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha

Comments

@aggregate1166877
Copy link
Collaborator

aggregate1166877 commented Oct 11, 2021

Details:
The game currently only has one scene: the one where you're in a space ship.

Technically, it has two scenes; the world where the local star / local planets / far-away stars reside, and the space ship scene. These were separated as part #7 to make large-scale lighting easier. These two scenes still function as one however, and work together to facilitate space travel.

We need a mechanism to allow switching to / from scene groups in a clean way. This will eventually be useful for the galaxy map (or a potential main menu), but has an immediate use-case: testing star catalogs and shaders via free-flying through stars.

(The honest truth is that flying through real stars is really addictive and I just want it kept as a separate game mode.)

Task:

  • Implement a mechanism that allows switching between scene groups.
  • Add the option to switch the star free-flight in the debug menu (which should eventually probably be moved to an astrometrics menu).

This should support:

  • Changing renderers (or changing renderer options). The reason for this is that stars require disabling depth testing, which messes with space ship rendering, so options need to be adjustable during the change.
  • Changing shaders.
  • Changing space ships.
  • Understanding which scenes belong together and which don't.
  • We should have a manifest (or module?) that describes switching functionality. For example, when switching to space ship, we do not want the space ship sent back to 0,0,0. Or, maybe we even want the space scene to keep running, just without having control over rendering. Perhaps separate space ship logic from scene logic entirely so that completely killing the scene and resetting to default during the switch does not impact gameplay.

Some considerations:
Space ships inhabited by the controlling player are seen as levels from the game's point of view. It's possible we'll need some level logic running in the background. However, slow or dangerous logic such as "calculate distance to door to see if it can be opened" would potentially need to be stopped if switching to another scene. Decide if it's within scope during implementation.

@aggregate1166877 aggregate1166877 added pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha high-level concept labels Oct 11, 2021
@aggregate1166877 aggregate1166877 self-assigned this Oct 11, 2021
@aggregate1166877 aggregate1166877 added this to To do in Pre-alpha grind via automation Oct 11, 2021
@aggregate1166877 aggregate1166877 moved this from To do to In progress in Pre-alpha grind Oct 11, 2021
aggregate1166877 pushed a commit that referenced this issue Oct 15, 2021
aggregate1166877 pushed a commit that referenced this issue Oct 27, 2021
aggregate1166877 pushed a commit that referenced this issue Nov 19, 2021
aggregate1166877 pushed a commit that referenced this issue Nov 20, 2021
aggregate1166877 pushed a commit that referenced this issue Nov 20, 2021
@aggregate1166877 aggregate1166877 moved this from In progress to Recently completed in Pre-alpha grind Nov 21, 2021
@aggregate1166877
Copy link
Collaborator Author

Scene switching can be tested by going to Menu -> Debug Tools -> Star free-flight.

This will switch to a scene where you can freely fly through near-Earth stars. In the background, space ship processing will continue even though the ship and its surrounding are no longer being rendered.

aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 pushed a commit that referenced this issue Dec 19, 2021
aggregate1166877 added a commit that referenced this issue Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-level concept pre-alpha grind Pre-alpha MVP task: tasks used as rough indication of what needs to be done to get out of pre-alpha
Projects
Pre-alpha grind
Recently completed
Development

No branches or pull requests

1 participant