Jump to content

[INDEV]-[1.4.3] - To Boldly Go | An external application designed to procedurally generate an entire galaxy for KSP.


daniel l.

Recommended Posts

On 12/26/2017 at 8:27 AM, Thomas P. said:

I would like to chime it on the topic of generating custom bodies.

Some of you might know that some time ago, I started a project called "Stellarator" (Even before TBG was released IIRC). While TBG started with generating a whole galaxy, Stellarator focused on generating an actual planetary system.

Stellarator solved the problem of generating an actual surface by having a set of PQS configuration templates. Theese templates contain a set of PQSMods that can generate terrain using noise and other methods (VertexPlanet for example). These template configs are special, since their values can contain variables and calculations (unlike regular Kopernicus configs). For example, the seed values of the PQSMods are dynamic and depend on the seed the user entered when running the program. Another feature was, that it generated a random color for the planet, that could be used together with different manipulation methods (For example to generate a brighter or darker color). And you had a way of generating a new random number using the seed, and either calculate with it or just assign it to the respective value. While loading the configs these expressions were evaluated, so every PQS template could produce an infinite amount of actual planets. The intention behind this was, that a human could create a planet that looks good, and then figure out which values could be changed, and which ones were neccessary to produce a result that has the same look and feel - as opposed to just throwing together noise functions and getting planets that might be totally wonky. Also, by using the PQS the program can simply rely on the tools and the API KSP and Kopernicus expose anyway, and not invent something totally new.

The problem with this approach, as with probably any approach, is that you have to generate the ScaledSpace textures. They are always static, and there is no good way to generate them ingame without lagging the users PC to death. In Stellarator I solved this problem by rewriting the PQSMods and the Unity and KSP classes they need independent from KSP. Stellarator then used the Kopernicus Loader to convert the PQS configuration that was generated into a stack of PQSMods, just like they would exist in the game, and used this data to pregenerate the textures. That took a bit of time, but in the end you had a completely procedural solar system.

But since Stellarator never took off, and I am a noob at actualy planet making, I never had the time to write the PQS database. I made three example configs, but thats it. Since TBG took off and got reasonably popular, I would like to propose that the planet generation concepts could be merged into TBG and developed further (I would totally like to help with that as soon as I got the time - I also have some magic for gas planets lying around, lol). I think it's just sad that my old code is lying around with me having no motivation to work on it, while it could help somewhere. And I simply like the idea of procedural generating a solar system that actually works and is not just a proof of concept. :)

The only problem with that is, that every type of terrain generator would make the current code completely unreadable. The planet generation, and also the difficulty to work with it that daniel mentioned, would really benefit from rewriting it in a different language, probably Python (easy to read and write) or C# (most stuff for the planet generator could be taken from Stellarator).

But of course thats your decision. If you are interested in my proposal, feel free to leave me a message, either on the forums or on the Kopernicus Discord. :)

I also support this awesomeness.

If  the Boldly Go creator wants this, is there anything I can do beyond making a few short posts ?  If it matters, I have a strong background in C#, but most of the experience is in a banking and finance environment - also did fractal 3D programming back in the Amiga 2000 days.

Actually, I'm thinking even bigger to combine the Boldly Go, popular mods to fill the Community Tech Tree (so you can reach stars),  multi-player rumored in KSP 2.0, and BDArmory. This = ULTIMATE Galactic Civilizations.  I got the idea when I confused SpaceDock with StarDock.

I also personally like Kerbal Star Systems,  but each star/planet is hand made. So while attractive and custom made, this may need too much manpower for a huge galaxies.  A KSS dev guy hinted at possible KSS compatibility with Boldly Go.

And I like the Real Star System, but I'm concerned the rockets are made for a Kerbal size planet and the missions are made for the Kerbol system - so a major change in KSP may be needed to work with RSS.  Anyway, I can ask about this on the RSS thread and I think I'll enjoy the challenge.

my 2 cents worth.

Edited by enewmen
Link to comment
Share on other sites

I've been sick over the holidays and am getting back on my feet, but wanted to put a list out there outlining where I'd like to see TBG go in the coming months.

In no particular order, the pressing :

  • Fix the star lighting problem. This is the largest outstanding problem. Changed to Kopernicus changed how stars light objects, which has led to problems in TBG. Unfortunately, I am a modeling guy, so if anyone wants to volunteer to help out with this aspect, it would let me work on adding new features such as...
  • Tidally locked bodies. I can implement tidally locked moons and bodies using real-world calculations--I just need the time to implement it.
  • Habitable-zones. I finally understand how to model this, and can put it into game. This means TBG would be able to realistically place water worlds around stars.
  • Custom bodies. @daniel l. wrote the code to implement this some time ago, but it hasn't worked it's way in. I'm told that making too many custom bodies using PQSMods can make the game lag.
  • Integrate other planet/star packs. An undocumented feature of TBG is the ability to take stars and planets from other Kopernicus packs and use them in the generated universe. It still needs testing and streamlining, but the basics are in place.

Lower priorities:

  • Warp drives. I have messed around with some ideas about how warp drives could be used along along with TBG. Seems pretty straight forward.
  • Integrate more ideas from Stellarator. I've looked at Stellarator off and on to understand some parts of Kopernicus, but maybe it's time to more aggressively borrow code.
  • Python version? I'm much more comfortable with python than the current TBG language. I'd like to keep TBG as a separate application--not a in-game mod written in C#. Maybe use a browser as the UI for it? For now, it makes sense to keep it in its current language.
  • A story! I have some thoughts about a storyline that could go with TBG and give players a tech tree path AND reason to go to other stars. Think 2001 meets Engines of God meets Contact meets Defying Gravity. Ancient, alien tech? Following bread crumbs in the Kerbin system? Breakthroughs that allow travel to other stars? I'm imagining something that would use Kerbin Side and RemoteTech for a lot of the story elements. My priority is actual TBG features, but if you find the vague hints here interesting, ping me.
Link to comment
Share on other sites

54 minutes ago, seanth said:
  • Custom bodies. @daniel l. wrote the code to implement this some time ago, but it hasn't worked it's way in. I'm told that making too many custom bodies using PQSMods can make the game lag.

That's exactly the problem that is solved by the Scaled Space - at a certain distance the PQS fades out and gets disabled so only a handful of spheres are active at the same time.

And since PQSMods are the only way to shape planets in KSP (heightmaps are also just PQSMods), there is no alternative anyways

55 minutes ago, seanth said:
  • Python version? I'm much more comfortable with python than the current TBG language. I'd like to keep TBG as a separate application--not a in-game mod written in C#. Maybe use a browser as the UI for it? For now, it makes sense to keep it in its current language.

What is your opinion about a C# version instead of a Python version if I may ask? This would make this:

58 minutes ago, seanth said:
  • Integrate more ideas from Stellarator. I've looked at Stellarator off and on to understand some parts of Kopernicus, but maybe it's time to more aggressively borrow code.

 

way easier since Stellarator (and it's dependencies, namely the reimplemented PQSMods and parts of the Kopernicus code) is already written in C#.

Link to comment
Share on other sites

4 hours ago, Thomas P. said:

What is your opinion about a C# version instead of a Python version if I may ask? This would make this:

I might have to walk away from TBG if there was a compelling reason to move it to C#. It's not a language I know, and I'm not ready to pick up a new one right now.

Having said that, the current TBG code is written in a very straight forward way and should be easily ported to basically any language. There are a few code blocks that are imho clunky (for example: my attempt at implementing a python-like string replacement method), but most of it is very simple and uses templates where ever possible.

Link to comment
Share on other sites

On 1/2/2018 at 11:17 AM, seanth said:

Fix the star lighting problem. This is the largest outstanding problem. Changed to Kopernicus changed how stars light objects, which has led to problems in TBG. Unfortunately, I am a modeling guy, so if anyone wants to volunteer to help out with this aspect, it would let me work on adding new features such as...

I wouldn't think this would be so hard, what kind of person are you looking for to help you with this? 

(I am almost on a hiatus of ksp because I refuse to play with the normal system knowing this mod is close to existing :sticktongue:)

Edited by Not Sure
Link to comment
Share on other sites

Wait, thomas mentioned Stellarator as a project he used to work on, but he is currently maintaining another randomly generated mod called Planetary diversity. He definitely knows better than I, but i wonder if the random elements of that could be applied to TBG without having to update Stellarator.

Uncharted Lands also uses some random planets.

Oh hey would you look at that, the developers of those two mods are the devs of Kopernicus

Edited by Not Sure
Link to comment
Share on other sites

PD uses concepts from stellarator, but it isn't suited for generating new planets. It's goal is to take planets that are already unique on their own and change them on a per-savegame basis, so every save ends up with a slightly different planetary system. And it has to generate everything at runtime, which isn't the best idea if you have a procedural galaxy generator (GN with all installed planet packs took me 3 hours with multiple crashes due to being out of RAM).

If you apply PD to a TBG system, you would end up with different planets, but they would still look and feel like Kerbin or Duna for example, just with a slightly different terrain.

And an external program allows for optimisations that aren't possible inside of KSP (the PQS is a hellhole, especially in combination with Unitys memory management). And pregenerating everything doesn't slow down your game loading significantly.

@seanth The problem with the starlight occurs, because your IntensityCurves are wrong. They worked in previous versions of Kopernicus because the system was broken. In 1.3.1-3 this was fixed, so your IntensityCurve and IVAIntensity curve need to be in localspace distance (meters) while your ScaledIntensityCurve (which should be kept since it was the only one working previously) remains in scaledspace distance (meters / 6000).

Edited by Thomas P.
Link to comment
Share on other sites

  • 3 weeks later...
On 1/2/2018 at 1:17 PM, seanth said:

A story! I have some thoughts about a storyline that could go with TBG and give players a tech tree path AND reason to go to other stars. Think 2001 meets Engines of God meets Contact meets Defying Gravity. Ancient, alien tech? Following bread crumbs in the Kerbin system? Breakthroughs that allow travel to other stars? I'm imagining something that would use Kerbin Side and RemoteTech for a lot of the story elements. My priority is actual TBG features, but if you find the vague hints here interesting, ping me.

One idea I've had rattling around in my head for a greater Kerbal storyline could be useful here.

The Kerbals have a profound enthusiasm for and understanding of rocketry and space travel without much other apparent infrastructure on their world... and two really big, really obvious impact craters on the surface of Kerbin.

What if the current Kerbal Space Program is not the first time they've ventured into space? What if they've done it before, and still remember that at a fundamental level... but were bombed back into the stone age by some unknown hostile, and are only just now getting back to where they once were?

Link to comment
Share on other sites

8 hours ago, Jim Starluck said:

One idea I've had rattling around in my head for a greater Kerbal storyline could be useful here.

The Kerbals have a profound enthusiasm for and understanding of rocketry and space travel without much other apparent infrastructure on their world... and two really big, really obvious impact craters on the surface of Kerbin.

What if the current Kerbal Space Program is not the first time they've ventured into space? What if they've done it before, and still remember that at a fundamental level... but were bombed back into the stone age by some unknown hostile, and are only just now getting back to where they once were?

Now that gives me chills... 

Would make for an amazing story though, but mods adding stories? Just seems a little too ambitious imo.

A game with a good story, multiplayer, randomly generated galaxies, and the exploration elements of KSP would be possibly the greatest game of all time. 

Link to comment
Share on other sites

So, there has been a hold up. I do all my dev on Apple hardware, and my upgrade to mac os 10.13.3 broke all the winewrappers I have, including the QB64 build that lets me make the .exes for all you Windows users out there.

I'm working on it....

Link to comment
Share on other sites

Just now, seanth said:

So, there has been a hold up. I do all my dev on Apple hardware, and my upgrade to mac os 10.13.3 broke all the winewrappers I have, including the QB64 build that lets me make the .exes for all you Windows users out there.

I'm working on it....

:((
Is that the most recent update? Im on one and haven't seen an update for quite a while, still on 10.12

Link to comment
Share on other sites

  • 2 weeks later...

I've Tried the mod, But unfortunately when i load a game save i get an endless loading screen. The Kopernicus log is below...

Problem: Failed to load minmus body...

 

 

 

 

 

//===============================================================================================================//
//=====  Kopernicus 1.3.1-6 - (BuildDate: 14.02.2018 13:55:16; AssemblyHash: j+NdjLg83IpEe/I/G3+oTQLf2Sc=)  =====//
//===============================================================================================================//
[LOG 01:10:45]: Logger "Kopernicus" was created
[LOG 01:10:45]: Injector.Awake(): Begin
[LOG 01:10:45]: Parsing Target name in (Kopernicus.Configuration.Loader) as (System.String)
[LOG 01:10:45]: Parsing Target timeScale in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Double])
[LOG 01:10:45]: Parsing Target scale in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Double])
[LOG 01:10:45]: Parsing Target Epoch in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Double])
[LOG 01:10:45]: Parsing Target useOnDemand in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Boolean])
[LOG 01:10:45]: Parsing Target onDemandLoadOnMissing in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Boolean])
[LOG 01:10:45]: Parsing Target onDemandLogOnMissing in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Boolean])
[LOG 01:10:45]: Parsing Target onDemandUnloadDelay in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Int32])
[LOG 01:10:45]: Parsing Target useManualMemoryManagement in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Boolean])
[LOG 01:10:45]: Parsing Target mainMenuBody in (Kopernicus.Configuration.Loader) as (System.String)
[LOG 01:10:45]: Parsing Target maxViewingDistance in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Double])
[LOG 01:10:45]: Parsing Target scaledSpaceFaderMult in (Kopernicus.Configuration.Loader) as (Kopernicus.NumericParser`1[System.Double])
[LOG 01:10:47]: [Kopernicus]: Configuration.Loader: Loaded Body: Karkua
[LOG 01:10:50]: [Kopernicus]: Configuration.Loader: Loaded Body: Kereksus
[LOG 01:10:51]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerlanes
[LOG 01:10:54]: [Kopernicus]: Configuration.Loader: Loaded Body: KermansStar
[LOG 01:10:55]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerulum
[LOG 01:10:57]: [Kopernicus]: Configuration.Loader: Loaded Body: Kilise
[LOG 01:10:57]: [Kopernicus]: Configuration.Loader: Loaded Body: Kirimo
[LOG 01:10:59]: [Kopernicus]: Configuration.Loader: Loaded Body: Kiro
[LOG 01:10:59]: [Kopernicus]: Configuration.Loader: Loaded Body: KelarI
[LOG 01:11:01]: [Kopernicus]: Configuration.Loader: Loaded Body: KelarII
[LOG 01:11:02]: [Kopernicus]: Configuration.Loader: Loaded Body: KelarIII
[LOG 01:11:03]: [Kopernicus]: Configuration.Loader: Loaded Body: KelarIV
[LOG 01:11:04]: [Kopernicus]: Configuration.Loader: Loaded Body: Kelaris
[LOG 01:11:05]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerbos
[LOG 01:11:06]: [Kopernicus]: Configuration.Loader: Loaded Body: Kirlim
[LOG 01:11:07]: [Kopernicus]: Configuration.Loader: Loaded Body: Kelnis
[LOG 01:11:08]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerbol
[LOG 01:11:09]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerilim
[LOG 01:11:10]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerolon
[LOG 01:11:11]: [Kopernicus]: Configuration.Loader: Loaded Body: Korlon
[LOG 01:11:12]: [Kopernicus]: Configuration.Loader: Loaded Body: Kormin
[LOG 01:11:13]: [Kopernicus]: Configuration.Loader: Loaded Body: Kelin
[LOG 01:11:14]: [Kopernicus]: Configuration.Loader: Loaded Body: Kernim
[LOG 01:11:15]: [Kopernicus]: Configuration.Loader: Loaded Body: Kirb
[LOG 01:11:18]: [Kopernicus]: Configuration.Loader: Loaded Body: TheCreator
[LOG 01:11:24]: [Kopernicus]: Configuration.Loader: Loaded Body: Dres
[LOG 01:11:27]: [Kopernicus]: Configuration.Loader: Loaded Body: Bop
[LOG 01:11:36]: [Kopernicus]: Configuration.Loader: Loaded Body: Duna
[LOG 01:11:39]: [Kopernicus]: Configuration.Loader: Loaded Body: Gilly
[LOG 01:11:46]: [Kopernicus]: Configuration.Loader: Loaded Body: Eve
[LOG 01:11:48]: [Kopernicus]: Configuration.Loader: Loaded Body: Jool
[LOG 01:11:55]: [Kopernicus]: Configuration.Loader: Loaded Body: Laythe
[LOG 01:12:01]: [Kopernicus]: Configuration.Loader: Loaded Body: Pol
[LOG 01:12:07]: [Kopernicus]: Configuration.Loader: Loaded Body: Tylo
[LOG 01:12:12]: [Kopernicus]: Configuration.Loader: Loaded Body: Vall
[LOG 01:12:20]: [Kopernicus]: Configuration.Loader: Loaded Body: Kerbin
[LOG 01:12:21]: [Kopernicus]: Configuration.Loader: Failed to load Body: Minmus
[LOG 01:12:45]: [Kopernicus] RuntimeUtility Started
[LOG 01:12:45]: StarLightSwitcher.Awake(): Begin
[LOG 02:51:34]: Injector.OnDestroy(): Complete
 

Link to comment
Share on other sites

10 hours ago, GreaterSpaceProgram96 said:

I've Tried the mod, But unfortunately when i load a game save i get an endless loading screen. The Kopernicus log is below...

Problem: Failed to load minmus body...

Your log makes me think you are using mods that add other planets and stars to the game "TheCreator" isn't a body name that TBG would generate.

Link to comment
Share on other sites

  • 2 weeks later...
On 2/4/2018 at 1:03 PM, seanth said:

So, there has been a hold up. I do all my dev on Apple hardware, and my upgrade to mac os 10.13.3 broke all the winewrappers I have, including the QB64 build that lets me make the .exes for all you Windows users out there.

I'm working on it....

If I'm on a Mac, how do I generate galaxies?

Link to comment
Share on other sites

52 minutes ago, Quanto said:

If I'm on a Mac, how do I generate galaxies?

Im on mac and it just requires a pretty handy program called "winebottler" to turn the EXE into an app. Download it and go to the advanced or custom thingy and create it as a new item, when its done make sure its still in the TBG folder, should work just fine. 

Link to comment
Share on other sites

13 minutes ago, Not Sure said:

Im on mac and it just requires a pretty handy program called "winebottler" to turn the EXE into an app. Download it and go to the advanced or custom thingy and create it as a new item, when its done make sure its still in the TBG folder, should work just fine. 

Doesn't work. I downloaded wine and had it create a Mac app. The app is created but it won't open.

Link to comment
Share on other sites

6 minutes ago, Quanto said:

Doesn't work. I downloaded wine and had it create a Mac app. The app is created but it won't open.

You have to have it set to execute file (installer) in the installation mode

just loaded it up for myself, lighting still isn't fixed, wich is a bummer, so you may just be disappointed

lxiSjzQ.png7HPOuA9.png

Lighting still isn't fixed, sad, but ill always be keeping an eye on this mod because its just so cool.
(second picture i like, dont fix that pls)

Edited by Not Sure
Link to comment
Share on other sites

4 minutes ago, Not Sure said:

You have to have it set to execute file (installer) in the installation mode

just loaded it up for myself, lighting still isn't fixed, wic is a bummer, so you may just be disappointed

Application starts then immediately crashes

Are you on HighSierra?

Edited by Quanto
Link to comment
Share on other sites

4 minutes ago, Quanto said:

Application starts then immediately crashes

Are you on HighSierra?

Version 10.12.6, seanth has stopped development because his mac updated and wine didnt work anymore. Its been a while though, not sure why it hasnt been fixed.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...