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

System exploration #3201

Merged
merged 8 commits into from Sep 30, 2014
Merged

Conversation

lwho
Copy link
Contributor

@lwho lwho commented Sep 29, 2014

This was how it all began: I already had a version of this feature about a year ago, but it felt hacky. So, in January I started thinking about a galaxy generation rewrite. Now, nine months later the new galaxy generation infrastructure is mostly there. So, I thought I would port the system exploration feature to the new infrastructure. Here it is!

This PR consists of four parts:

  • Load/Save support for GalaxyGenerator
  • Allowing to change explored state of systems (Sector::System and StarSystem)
  • Persisting the changed systems (without breaking savegame-compatibility)
  • Exposing system exploration to Lua

The persisting of changed systems is a proof-of-concept implementation for the new GalaxyGeneration versioning. Save-games before the change are loadable and automatically promoted to the current galaxy generator version (older pioneers can not load the savegames anymore).

The ingame-exploration of a system is triggered from Lua. Currently there is a module included, that automatically explores an unexplored system when it is entered. Maybe, someone at the Lua front will soon invent a new ship component that will be required to explore a system...

@fluffyfreak
Copy link
Contributor

Spooky, I just started work on exploration probes :)

My idea was that you don't get any info about unexplored systems except for the presence & number of gas giants. Then when you arrive in the system you get some more info, like the number of rocky planets but no actual details about them.

Then you can either visit each world in turn or as you head off to one world you send probes to the others. You get money for different types of planets found, has life or not, whether it's a moon etc.

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

Okay, so instead of an explored flag (or the three values eUNEXPLORED, eEXPLORED_BY_PLAYER , eEXPLORED_AT_START) you could probably have explore levels, or an exploration bitmap like

enum ExplorationState {
    eUNEXPLORED = 0,
    eVISIBLE_GASGIANTS = 1 << 0,
    eVISIBLE_ROCK_PLANETS = 1 << 1,
    eVISIBLE_MINOR_BODIES = 1 << 2,
    eVISIBLE_KBOS = 1 << 3
    eVISIBLE_ORBITAL_SPACE_STATIONS = 1 << 4,
    eVISIBLE_GROUND_STATIONS = 1 << 5,
    // ...
};

That would be a natural and not so complex extension to what I'm doing here and seems to be the first part of what you describe above.

You seem to imagine something more complex though: Selectively filtering information on bodies. This is something we don't have in the architecture at all currently. Probably, we should discuss how this could work in the dev forum first.

@fluffyfreak
Copy link
Contributor

Lets discuss this in the forums, and keep this PR clean and ready to merge as-is :)

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

Yes, I wasn't suggesting to do anything in the context of this PR. It's already large enough.

Did you try compiling it with VS2013? I used constructor-delegation somewhere, which I think is supported, but you never know ;)

@fluffyfreak
Copy link
Contributor

Nah of course it doesn't ;) but as usual it's a minor tweak.
Did a PR for it to your PR... if that makes sense :)

@fluffyfreak
Copy link
Contributor

Just been testing it, damn it is a LOOOOONG way out from inhabited space before you hit some unexplored systems. I have a feeling we should really reign that in one day... discuss on the forums I guess.

Anyway yes it works well, I actually like looking at a system and being told that we know nothing about it :) it makes me want to go there and see it!

Merge that VS2013 compile fix in and then merge away I say.

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

Pulled/pushed your commit.

Just been testing it, damn it is a LOOOOONG way out from inhabited space

8,66,46,1,31 should work as a starting location. Have it in my MainMenu.lua for testing

@impaktor
Copy link
Member

Just been testing it, damn it is a LOOOOONG way out from inhabited space before you hit some unexplored systems.

You are using Shift+arrow in sector view right? Otherwise it is not only a long distance but a very long and tedious scroll experience.

Great work by the way. A very interesting addition.

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

You are using Shift+arrow in sector view right?

Ohh, this was actually new to me. I originally used zoom-out into far view to get scrolled to the outskirts fast.

@fluffyfreak
Copy link
Contributor

Ok so you reckon this is ready for merge?

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

Yes, if you like ;)

fluffyfreak added a commit that referenced this pull request Sep 30, 2014
@fluffyfreak fluffyfreak merged commit 636fc6e into pioneerspacesim:master Sep 30, 2014
@fluffyfreak
Copy link
Contributor

I like ;)

@lwho
Copy link
Contributor Author

lwho commented Sep 30, 2014

Ohh no there is an error: The Lua API says it is available from October 2014, but we still have September ;)

Phew, at least in Australia it's October.

@lwho lwho deleted the system_exploration branch October 1, 2014 16:31
@impaktor impaktor mentioned this pull request Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants