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

Ok, maybe the python version I wrote need some work

SsP_T3w7X6T9kfk1LB0ywvktKpnHhjjx_rzEzg9X

Edit with some edits to the code:

MXroP0uwZSd9xgIsonFqQxSrNSAaN5f04BvXr5dn

12 stars, 39 planets, 89 moons

 @daniel l. Oh man. SO much fun. I used hyperedit to go on a tour of the universe and found a system where the SOI's of planets overlapped, so my poor Kerbal kept getting pulled around by the competing gravity.

Edited by seanth
Link to comment
Share on other sites

3 hours ago, seanth said:

Ok, maybe the python version I wrote need some work

SsP_T3w7X6T9kfk1LB0ywvktKpnHhjjx_rzEzg9X

Edit with some edits to the code:

MXroP0uwZSd9xgIsonFqQxSrNSAaN5f04BvXr5dn

12 stars, 39 planets, 89 moons

 @daniel l. Oh man. SO much fun. I used hyperedit to go on a tour of the universe and found a system where the SOI's of planets overlapped, so my poor Kerbal kept getting pulled around by the competing gravity.

:)

Link to comment
Share on other sites

Disc galaxy, 94 stars, 300 planets, 689 moons

Spoiler

3-N544fIh-SPkLBTKwmcqlNg_iul5g-53DjmLd5c

uKZCbj62q2EotNTunQzN0SZtL42NCtkjRDZTj4O3

Even though Kerbol is on the outer edge, the night sky is way too bright for my taste. I wonder if there is a way to make the stars appear dimmer, or whether the distances between stars just need to be larger.

Spoiler

YPy1tRcbbbLy9w-7IO4QaIjaK6jwjHU-3ALjKa-n

It is really nice that the stars are in the same ecliptic as the skybox galaxy (Milky Way) backdrop.

One of the more interesting star systems:

aO0Tu4OLoUYsuiKnwST_yPVqVnTJnlu6owsljA8M

Python port still isn't making black holes, rogue planets, or astroids, and I haven't tested clusters, but it's mostly working.

 

Link to comment
Share on other sites

9 minutes ago, seanth said:

Disc galaxy, 94 stars, 300 planets, 689 moons

  Reveal hidden contents

3-N544fIh-SPkLBTKwmcqlNg_iul5g-53DjmLd5c

uKZCbj62q2EotNTunQzN0SZtL42NCtkjRDZTj4O3

Even though Kerbol is on the outer edge, the night sky is way too bright for my taste. I wonder if there is a way to make the stars appear dimmer, or whether the distances between stars just need to be larger.

  Reveal hidden contents

YPy1tRcbbbLy9w-7IO4QaIjaK6jwjHU-3ALjKa-n

It is really nice that the stars are in the same ecliptic as the skybox galaxy (Milky Way) backdrop.

One of the more interesting star systems:

aO0Tu4OLoUYsuiKnwST_yPVqVnTJnlu6owsljA8M

Python port still isn't making black holes, rogue planets, or astroids, and I haven't tested clusters, but it's mostly working.

 

Well then... when all this is done I would like to see the source code you've made :wink: if I can learn python myself then I will be able to continue development from there.

Link to comment
Share on other sites

On 03.01.2017. at 7:02 AM, daniel l. said:

I know :) It's an unavoidable glitch that happens when Kerbin is reparented. Just use the side buttons :wink:

 

I believe that Kopernicus has something called PostSpawnOrbit which is designed to workaround reparenting Kerbin. For example:

 @Body[Kerbin]
 {
    PostSpawnOrbit
    {
        referenceBody = Kerbol
    }
 }

I'm using this approach in my game. If you'd like I'll make a PR request to your code, just point me to your repository :)

Link to comment
Share on other sites

21 hours ago, mario-sov said:

I believe that Kopernicus has something called PostSpawnOrbit which is designed to workaround reparenting Kerbin. For example:


 @Body[Kerbin]
 {
    PostSpawnOrbit
    {
        referenceBody = Kerbol
    }
 }

I'm using this approach in my game. If you'd like I'll make a PR request to your code, just point me to your repository :)

I don't think there is a repo yet. I can put that in and test it (and comment in thx to you :) )

Link to comment
Share on other sites

Ok this is by far my new favorite mod. FINALLY, a galaxy! Star system mods where nice but Ive longed for an entire galaxy. Suddenly, KSPIE has real purpose. 

I might make a few suggestions based on observations of modern science. 

1) Most stars probably have at least one planet, probably a gas giant, with or without moons. 

2) Most star systems appear to be binary. 

3) Galaxies have blackholes at their centers holding everything together and recycling matter throughout. 

These are commonly held beliefs in Astronomy today that you may consider working into your mod. I would especially like to see the blackhole. 

 

Last but not least, I need a paypal donate button if you would like to have some outside support to fuel your mad coding sessions. 

Link to comment
Share on other sites

3 hours ago, Aaron Also said:

Ok this is by far my new favorite mod. FINALLY, a galaxy! Star system mods where nice but Ive longed for an entire galaxy. Suddenly, KSPIE has real purpose. 

I might make a few suggestions based on observations of modern science. 

1) Most stars probably have at least one planet, probably a gas giant, with or without moons. 

2) Most star systems appear to be binary. 

3) Galaxies have blackholes at their centers holding everything together and recycling matter throughout. 

These are commonly held beliefs in Astronomy today that you may consider working into your mod. I would especially like to see the blackhole. 

 

Last but not least, I need a paypal donate button if you would like to have some outside support to fuel your mad coding sessions. 

All great ideas but in due time. You see. My gaming desktop which i do all my work on recently "fritzed" :( basically a power outage in my area damaged several critical windows 10 system files and now the damn machine wont boot. I cant afford to restore Windows 10 as it was a free update from 7 and my 7 install disk is currently 800 miles away in my other residence in Washington. (Have you heard of the big storm that hit us? My window frame sprung a leak and now the drywall is damaged.) (I may switch to Linux if i cant fix Windows 10.)

Thanks for offering to donate money. However i don't have a Paypal account. I'll be 17 years old in about a month but as i live a completely isolated life (My parents apparently thought it better to raise their children in the total isolation of the countryside where he would have no social life.) i never found a use for one. However. If i due ever create a Paypal i will add a donate button. :)

Link to comment
Share on other sites

8500 line of BASIC code! Now I feel nostalgic.

A few hints for better structured code:

  • Procedures can help you to avoid duplicated code. Every time you feel like copying and pasting code, make a procedure instead.
  • You can simplify your name generator, by reading the name parts from a file into an array. Then select parts randomly from that array. Bonus point: Users can add new names, without recompiling your code.
  • You don't have to call RANDOMIZE TIMER every time you use RND. Once at the beginning of the program is enough. By replacing TIMER with a seed number, you can recreate the same system. Great for testing.
  • Never use GOTO. Ever!

 

Link to comment
Share on other sites

13 hours ago, Banbury said:

8500 line of BASIC code! Now I feel nostalgic.

A few hints for better structured code:

  • Procedures can help you to avoid duplicated code. Every time you feel like copying and pasting code, make a procedure instead.
  • You can simplify your name generator, by reading the name parts from a file into an array. Then select parts randomly from that array. Bonus point: Users can add new names, without recompiling your code.
  • You don't have to call RANDOMIZE TIMER every time you use RND. Once at the beginning of the program is enough. By replacing TIMER with a seed number, you can recreate the same system. Great for testing.
  • Never use GOTO. Ever!

 

I appreciate your advice :) But my code is working fine, As long as it works i feel i shouldn't need to change it. (If it aint broke dont fix it)

EDIT: Though i must ask. How do i make seeds?

Edited by daniel l.
Link to comment
Share on other sites

11 hours ago, daniel l. said:

I appreciate your advice :) But my code is working fine, As long as it works i feel i shouldn't need to change it. (If it aint broke dont fix it)

EDIT: Though i must ask. How do i make seeds?

Hey Daniel! I'm finally back from my trip and am glad to see that my favorite mod is still well and growing! On the note of his advice, honestly to save yourself work later, it is my advice that you should clean up your code before you add more. It will allow the mod to perform better and be less of a CPU burden. Cleaning up code is no fun believe me, but it will need to be done sooner or later. So you may as well do it now while you have fewer lines of code than you will when it becomes absolutely essential later on. If you can clean up as much as possible now, and keep writing cleaner and more efficient code, then it will be easier later. I certainly understand not wanting to fix it while it still works, but trust me it will pay off.

Link to comment
Share on other sites

What @Mycroft said.

12 hours ago, daniel l. said:

I appreciate your advice :) But my code is working fine, As long as it works i feel i shouldn't need to change it. (If it aint broke dont fix it)

Just wait, until your code is broken. You will wish, you have listened to me :). Finding a bug in unstructured code is a poodle.

12 hours ago, daniel l. said:

EDIT: Though i must ask. How do i make seeds?

A seed is just some number. You use it with RANDOMIZE instead of TIMER.

RANDOMIZE 12345678

That's why you should use RANDOMIZE only once at the beginning of your code. And you'll save 474 lines of code.

Link to comment
Share on other sites

Is it possible to make Kopernicus export mesh automatically? Can that be added?

16 hours ago, Banbury said:

A seed is just some number. You use it with RANDOMIZE instead of TIMER.


RANDOMIZE 12345678

That's why you should use RANDOMIZE only once at the beginning of your code. And you'll save 474 lines of code.

But wouldnt that mean that every single procedural number would be 12345678? Everything. Radius, Semimajoraxis, Inclination? Or is it different?

Link to comment
Share on other sites

7 hours ago, daniel l. said:

But wouldnt that mean that every single procedural number would be 12345678? Everything. Radius, Semimajoraxis, Inclination? Or is it different?

You're misunderstanding how the random number generator works. RANDOMIZE only seeds the generator, which is a kind of initialization. The random numbers are generated by RND. How the seed is used to generate random numbers is based on the implementation. If you use a fixed seed, the same 'random' numbers are generated in the same order. The use of TIME just makes sure, that a different seed is used every time you start the program. But you only need a single seed. Calling RANDOMIZE TIME multiple times in a program is just a waste of space and resources.

If you allow the user to set the seed at the beginning of your program, she can recreate a galaxy another user may have created with the same seed. Or you can create the same galaxy over and over again for testing.

Link to comment
Share on other sites

@daniel l. This looks like a very promising mod. Therefore I added custom support "To Boldly Go"" KSP Interstellar Extended, specifically the most powerful transmitter should be powerful enough to reach the furthers location in the procedural generated galaxy

EDIT: It it now port of KSPI-E config files

Edited by FreeThinker
Link to comment
Share on other sites

8 hours ago, FreeThinker said:

@daniel l. This looks like a very promising mod. Therefore I added custom support "To Boldly Go"" KSP Interstellar Extended, specifically the most powerful transmitter should be powerful enough to reach the furthers location in the procedural generated galaxy

Dude, that is awesome! I'm glad that you see the potential that we all do! Downlaoding IE now.... :)

Link to comment
Share on other sites

I will be trying out KSPI-E as well. With GPP's huge update finally out, my plate is pretty clear to put a lot of effort into other things, like my part for this mod, and KSPI-E resources for GPP (especially, someone has posted an atmosphere scoop problem in GPP's thread).

Link to comment
Share on other sites

On 1/17/2017 at 9:10 AM, Banbury said:

You're misunderstanding how the random number generator works. RANDOMIZE only seeds the generator, which is a kind of initialization. The random numbers are generated by RND. How the seed is used to generate random numbers is based on the implementation. If you use a fixed seed, the same 'random' numbers are generated in the same order. The use of TIME just makes sure, that a different seed is used every time you start the program. But you only need a single seed. Calling RANDOMIZE TIME multiple times in a program is just a waste of space and resources.

If you allow the user to set the seed at the beginning of your program, she can recreate a galaxy another user may have created with the same seed. Or you can create the same galaxy over and over again for testing.

But how do i prevent the randomization from going overboard? For example. What if the game generates a star with a SemiMajorAxis that is too big. Or a planet with a radius too small. How do i enforce limits on seed generation?

Link to comment
Share on other sites

Fine job and idea ye've got here and it seems to be coming off rather well.

I hope ye work out the 'home screen' issue (where it doesn't show KSC or any of the buildings that you can select) because what that also means is you can't upgrade any of the facilities in a campaign game.  I prefer to play it that way, over a true sandbox, meself.

Apart from that and some of the more technical issues that have been mentioned already, by folk who are probably more clever than I (the frequency of rather exotic orbital planes and whatnot)  that i'm sure have more to do with the randomness of a random generator than anything else, it's looking good.  I hope ye keep at it and someday my lil green dudes might actually have someplace to go with their shiny new FTL capable ship.

On a side note, I did notice one more glitch/feature (tho i'm sure i'm not the first)  You can indeed integrate a generated galaxy into an existing save... but any flights that were in progress (including landed bases) will be re-positioned to completely random planets, stars, etc.  Likely because of the program's reuse of existing data to generate the new systems.  It was interesting and provided a quick way to peek at far flung star systems tho. :P

Link to comment
Share on other sites

Good news guys! I just got Seed technology working! Special thanks to @Banbury for walking me through the process. Now you can generate entire galaxies based on a single number which you input at the start. You can also share your galaxies just by telling your friends which number to use! A beta version called 0.2.5 will be released soon.

Link to comment
Share on other sites

2 hours ago, Amus said:

Fine job and idea ye've got here and it seems to be coming off rather well.

I hope ye work out the 'home screen' issue (where it doesn't show KSC or any of the buildings that you can select) because what that also means is you can't upgrade any of the facilities in a campaign game.  I prefer to play it that way, over a true sandbox, meself.

Apart from that and some of the more technical issues that have been mentioned already, by folk who are probably more clever than I (the frequency of rather exotic orbital planes and whatnot)  that i'm sure have more to do with the randomness of a random generator than anything else, it's looking good.  I hope ye keep at it and someday my lil green dudes might actually have someplace to go with their shiny new FTL capable ship.

On a side note, I did notice one more glitch/feature (tho i'm sure i'm not the first)  You can indeed integrate a generated galaxy into an existing save... but any flights that were in progress (including landed bases) will be re-positioned to completely random planets, stars, etc.  Likely because of the program's reuse of existing data to generate the new systems.  It was interesting and provided a quick way to peek at far flung star systems tho. :P

Glad you like it :D The home screen issue is a Kopernicus error. I cant fix it until @Thomas P. find's a solution. The side buttons should do fine for now though. Just remember to make buildings indestructible in the save or you wont be able to repair them.

The issue of integration will be fixed in 0.2.5 so enjoy it while it lasts. :P But don't worry. I'm intending to package a hyperdrive part that will come with 0.3 (probably releasing it in about two months.) It will use @RoverDude's Alcubierre drive mod as a dependancy (You will have to install his mod before the hyperdrive works of course.) But it will be capable of getting you to those far flung stars within a natural human lifespan (I'm quite convinced that sublight travel at maximum timewarp would probably take many months of IRL time.)

Link to comment
Share on other sites

0.2.5 is out! A few new things to see! Now you can just post the seed for the galaxy you like if you want to share it. (Provided you used the Automatic generation system. If you used custom, Please post the "GalaxyGen-*Name*.txt" file)

Link to comment
Share on other sites

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