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

Exploration missions #144

Merged
merged 177 commits into from
Oct 10, 2024
Merged

Exploration missions #144

merged 177 commits into from
Oct 10, 2024

Conversation

BarthPaleologue
Copy link
Owner

@BarthPaleologue BarthPaleologue commented Sep 3, 2024

This PR is the first step toward actual gameplay in Cosmos Journeyer.

It adds the first exploration missions. They are generated at space stations and change every hour. Rewards are calculated on the distance to travel.

Missions

  • Fly by of neutron stars, black hole and anomalies
  • Landing near atmospheric world's terminator for nice screenshots
  • Flying inside asteroid fields

More will come with new destinations and new gameplay.

Additional changes

  • Added player object that can be saved and loaded from and to the save file
  • Added space station UI to display available missions and station information
  • Added mission infrastructure to create any kind of missions as trees
  • Added system bookmarks to save file and star map
  • Added mission targets to star map
  • Added inertia to camera movements
  • Save current itinerary to save file so that the player can resume its flight right away
  • Update current itinerary when jumping between systems
  • Added some spaceship UI to display the accepted missions
  • Refactor object id system to make it future proof and searchable
  • Reduce habitable worlds frequency
  • Soft shadows for rings
  • Memory leak patching in many places
  • Compatibility with babylonjs' inspector
  • Fix black hole light bending
  • Added new voice lines to spaceship
  • Continue to move all data to model classes
  • Fix incorrect orbital movements

And much more!

so that they can be displayed in the info panel
+ make it much harder to desync player object between starmap, starsystemview and cosmosjourneyer objects.

No reassignment is possible. If the same object is given at creation to the 3, it is then impossible to have a desync
each station can display its potential commercial partners and the interesting space phenomenons in the neighborhood
Jumping to the next system in the itinerary will set the next one as target automatically until the destination is reached
this will be useful to display all possible target systems
they still need to become targetable though
It will display infinity instead
+ make them hoverable
+ remove some old code
This will prevent cursor duplication
do not update the thruster plume when the throttle is zero
(this showed up in the browser's profiler)
- disable plot itinerary button when selected system is current system
- fix shorthand ui not displaying on current system when selected
- fix selection cursor overlapping with current system cursor
- removed dead code
This new version is better as it no longer requires looping over all orbital objects, which will prevent errors if the objects are not always generated in the same sequence.

This will be necessary for quest generation
this will fix invalid state when loading a save
Having multiple mission classes implementing the mission interface would prove challenging for serialization and deserialization. This is also in conflict with deserialization of the mission tree.

To avoid these issues, all missions will be of the same class and deserialization will only rely on deserializing the tree and metadata.
each node describes itself, which simplifies greatly the system
this allows to check equality between 2 mission trees.

States are not taken into account. It the same tasks are required the 2 missions are equal
+ green color when mission is completed
Developping the new universe object id system earlier showed some limits. Systems were identified by their seed.

The issue is that excludes custom star systems from interacting with the engine in the same way as seeded systems.

To fix this issue, star system coordinates are implemented by all types of star system models. It is easy to generate them from a seed and they can be hardcoded for custom systems.

This is future proof for the save file.

Right now, there is no good way to get the system model from the coordinates of a custom system, but a global registry could be used.
As with the previous commit the aim to use seeds only when absolutely necessary

This commit removes almost all checks with SeededStarSystemModel by a getter function that returns the correct model, be it seeded or custom
@BarthPaleologue BarthPaleologue marked this pull request as ready for review October 10, 2024 15:05
@BarthPaleologue BarthPaleologue merged commit 51f2b7e into main Oct 10, 2024
6 checks passed
@BarthPaleologue BarthPaleologue deleted the SpaceStationsV2 branch October 10, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a Space station UI
1 participant