More/ larger galaxies

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

Post Reply
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: More/ larger galaxies

Post by Pleb »

Yay! I've added 1024 systems to galaxies 9-16. Here's what it looks like with the expanded grid:

Image

But I've noticed it takes a second or two longer to load the chart, and even jump into galaxy 9 from galaxy 8, and I'm running this on a 64 bit version of Windows on a i5 core laptop with 8GB RAM and a 1GB dedicated Nvidia graphics card... But still, here is a bigger galaxy with more planets, as promised. Once I tweak a few things I will upload the code for this as well. :D
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6310
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: More/ larger galaxies

Post by Diziet Sma »

Pleb wrote:
What I did was find every mention of the system seed in the code, and modified it so it would double the value of .d and .b of the system seed (the two values used for the co-ordinates). Then I doubled the size of the chart display so that it could fit this all in. Effectively the galaxy was more spaced out, but with 512 systems the 7 light year range wasn't far enough and it looked a lot like the screenshot I uploaded of the 3.5 light year jump range.
This is because when you "doubled" the size of the chart display, by making it 512x512 instead of 256x256, you actually quadrupled the area of the chart.. and as you found, you eventually had to quadruple the number of systems as well, to make 7LY viable.
Pleb wrote:
Yay! I've added 1024 systems to galaxies 9-16. Here's what it looks like with the expanded grid:

But I've noticed it takes a second or two longer to load the chart, and even jump into galaxy 9 from galaxy 8, and I'm running this on a 64 bit version of Windows on a i5 core laptop with 8GB RAM and a 1GB dedicated Nvidia graphics card...
See, now what would probably work better is if you only double the number of systems from 256 to 512, and then only double the area of the chart display, instead of the dimensions.. To double the area, you need to multiply the dimensions by 1.414 instead of by 2. In round figures, this means a chart that is 362x362 rather than 512x512. You should find that 512 systems will fit comfortably with a 7LY range at those dimensions.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: More/ larger galaxies

Post by Zireael »

Loving this. Pleb, do you have a GitHub account? I could close my PR (as it fails to compile :twisted: ) and you'd open a new one with all those juicy changes...

Grabbing the box files soonish.

Actually, I suggest options (via planetinfo.plist or straight from Game Options):
* standard
* 512 systems on standard grid
* 512 systems on double area grid
* 1024 systems on double area grid

And while we're at it, after I get your box downloaded, I will look at enabling more seeds and/or de-hardcoding the 7 LY limit as mentioned in this thread.
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: More/ larger galaxies

Post by Pleb »

Diziet Sma wrote:
This is because when you "doubled" the size of the chart display, by making it 512x512 instead of 256x256, you actually quadrupled the area of the chart.. and as you found, you eventually had to quadruple the number of systems as well, to make 7LY viable.
Ah I made this mistake before! I should have remembered what cim said before about not doubling the value but the area...
Diziet Sma wrote:
See, now what would probably work better is if you only double the number of systems from 256 to 512, and then only double the area of the chart display, instead of the dimensions.. To double the area, you need to multiply the dimensions by 1.414 instead of by 2. In round figures, this means a chart that is 362x362 rather than 512x512. You should find that 512 systems will fit comfortably with a 7LY range at those dimensions.
I will have a go at this later, as although 1024 systems load on my computer, I am testing this without OXPs. I can imagine this taking it's toll if I added in all the OXPs I normally run!
Zireael wrote:
Loving this. Pleb, do you have a GitHub account? I could close my PR (as it fails to compile :twisted: ) and you'd open a new one with all those juicy changes...

Grabbing the box files soonish.

Actually, I suggest options (via planetinfo.plist or straight from Game Options):
* standard
* 512 systems on standard grid
* 512 systems on double area grid
* 1024 systems on double area grid

And while we're at it, after I get your box downloaded, I will look at enabling more seeds and/or de-hardcoding the 7 LY limit as mentioned in this thread.
This isn't nearly ready for any kind of submission to go into the game I'm afraid, as there are still small bugs that need fixing (like the route finder and the short range chart). Also the coding I do is probably quite messy compared to what's already in the source, so it would need tidying up!

The options you describe above are indeed possible, they would require a small amount of re-coding but it's perfectly possible. Once I fix the bugs mentioned above and tweak the 512 systems to fit on a smaller grid I will upload my code for others to view and explore for their own enjoyment.

Enabling more seeds isn't a problem, but the more galaxies you have the harder it will be to return to galaxy 1! I have posted up on the forums before code that allows for a reversible galactic hyperdrive (where instead of pressing g you press shift-g) to enable you to travel backwards instead of forwards. If you were going to have more than 16 galaxies this might be handy, but this would break some missions/OXPs that assume you have to go clockwise round and not the other way. Changing the 7 LY limit is not hard but it not advisable. There is a reason the 7 LY limit is in place and it would be best to leave it as it is (although I have found it mildly amusing to remove it before to enable instantaneous travel to all systems!).
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: More/ larger galaxies

Post by Norby »

Zireael wrote:
* standard
* 512 systems on standard grid
* 512 systems on double area grid
* 1024 systems on double area grid
Please do not left out the already made 1024 systems on quadrupled area, I like the inserted chart regardless of the slowdown.

I think one of the 16 galaxies can be even more large, up to an 1024x1024 map with 4096 systems due to players who found it too slow can jump forward to a smaller one but the whole Ooniverse will be more colorful if there is a really large galaxy.

I think better if combinations of system numbers and areas is not equal in the new 8 galaxies but varies to make as much different ones as possible. If the .plist can contain separated lines for all new galaxies then different combinations can be set easily. If a number must be divisible by 256 then put into the multiplier only (1 mean 256, 2 mean 512, etc.).
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: More/ larger galaxies

Post by Zireael »

Didn't think of the multiplier, that's a really good idea!
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: More/ larger galaxies

Post by Pleb »

Norby wrote:
Please do not left out the already made 1024 systems on quadrupled area, I like the inserted chart regardless of the slowdown.

I think one of the 16 galaxies can be even more large, up to an 1024x1024 map with 4096 systems due to players who found it too slow can jump forward to a smaller one but the whole Ooniverse will be more colorful if there is a really large galaxy.

I think better if combinations of system numbers and areas is not equal in the new 8 galaxies but varies to make as much different ones as possible. If the .plist can contain separated lines for all new galaxies then different combinations can be set easily. If a number must be divisible by 256 then put into the multiplier only (1 mean 256, 2 mean 512, etc.).
4096 systems is definitely too much I'm afraid, even 1024 is pushing it as the lag it creates once jumping into the new galaxy and using the long range chart is already a few seconds long. I like the idea of customizing each galaxy in terms of what's in it though. You could have the following:
  • General Settings:
  • Enable extra 16 galaxies (yes/no)
  • Extra galaxy initial seed for galaxy 9 (6 integer values 0-255)
  • Number of systems for galaxies 9-16 (3 options, 1st-256 systems/normal area grid, 2nd-512 systems/double area grid, 3rd-1024 systems/quadrupled area grid)
  • Enable individual galaxy seeds (yes/no)
  • Enable individual system numbers (yes/no)
  • Individual Galaxy Settings:
  • Galaxy seed (6 integer values 0-255 / if not defined then will be next turn of initial seed)
  • Number of systems (3 options, 1st-256 systems/normal area grid, 2nd-512 systems/double area grid, 3rd-1024 systems/quadrupled area grid - if not defined then default value from above used instead)
More options could be added depending on future ideas/possibilities...
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: More/ larger galaxies

Post by Norby »

Pleb wrote:
2nd-512 systems/double area grid, 3rd-1024 systems/quadrupled area grid
Two more large galaxy type is possible if can set 3x and 5x area also with 768 and 1280 systems.

In this case all of the 8 new galaxies can be large if the same sizes used two times, for example in order of galaxies using 2-2-3-3-4-4-5-5 times more area (or any random order of these).
Last edited by Norby on Tue Jan 07, 2014 10:02 pm, edited 1 time in total.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: More/ larger galaxies

Post by cim »

Pleb wrote:
4096 systems is definitely too much I'm afraid, even 1024 is pushing it as the lag it creates once jumping into the new galaxy and using the long range chart is already a few seconds long.
The problem is that a lot of things are O(n^2) - e.g. determining which systems are connected to which other systems - so 4 times the system is 16 times the processing time; 16 times the systems would be 256 times the processing time.

There are ways to cache the expensive data, of course, and much of it could even be pre-generated in a side thread, but that's obviously more work on top of getting it to work at all.
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: More/ larger galaxies

Post by Pleb »

Norby wrote:
Two more large galaxy type is possible if can set 3x and 5x area also with 768 and 1280 systems.

In this case all of the 8 new galaxies can be large if the same sizes used two times, for example in order of galaxies using 2-2-3-3-4-4-5-5 times more area (or any random order of these).
The only thing about having larger and larger galaxies is that eventually the game won't run as it's spending too much time trying to generate the many systems. I agree that it can definitely produce more than the standard 256 systems per galaxy it does now, and having varied galaxies would be interesting. But practically speaking 1024 systems per galaxy would be the limit, as even a reasonable machine like mine takes a few seconds to generate this, and this is without OXPs.

For arguments sake, I will test what 1280 systems does and I will post up the results. :)
cim wrote:
There are ways to cache the expensive data, of course, and much of it could even be pre-generated in a side thread, but that's obviously more work on top of getting it to work at all.
Agreed, adding more systems does seem to require adding more and more conditional statements (if commands) into the code, as to keep the original 8 galaxies working the new galaxies & systems cannot affect how the original ones are generated!
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: More/ larger galaxies

Post by Redspear »

Pleb wrote:
Yay! I've added 1024 systems to galaxies 9-16. Here's what it looks like with the expanded grid:
Impressive stuff Pleb :shock:

Might I suggest that galaxies 9-16 could be accessed via a different drive than the current GH one?
Then when you left Galaxy 8 you could still get back to galaxy 1 in one jump.

So instead of a galactic circuit twice as big, there could be two parallel (maybe?) circuits of the same size.
So if you've gone to gal 9 to check out it's impressive size but then you need to get back to gal 8 (or even gal 1) then it's a lot of jumps. Maybe this new drive (I see it as an additional piece of equipment rather than a replacement) could jump to your current galaxy number +8 (or -8 if you're already in galaxy 9-16). So then they could operate together with the original galaxies and have even less disturbance on the transit of the origianl 8...

In any case, well done 8) ...
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: More/ larger galaxies

Post by Pleb »

Redspear wrote:
Impressive stuff Pleb :shock:

Might I suggest that galaxies 9-16 could be accessed via a different drive than the current GH one?
Then when you left Galaxy 8 you could still get back to galaxy 1 in one jump.

So instead of a galactic circuit twice as big, there could be two parallel (maybe?) circuits of the same size.
So if you've gone to gal 9 to check out it's impressive size but then you need to get back to gal 8 (or even gal 1) then it's a lot of jumps. Maybe this new drive (I see it as an additional piece of equipment rather than a replacement) could jump to your current galaxy number +8 (or -8 if you're already in galaxy 9-16). So then they could operate together with the original galaxies and have even less disturbance on the transit of the origianl 8...

In any case, well done 8) ...
The only problem with having to do this to get to the next set of galaxies, is that you would have to be in galaxy 1 to get to galaxy 9, galaxy to get to galaxy 10, etc... This is why I created the off switch in the planetinfo.plist file, so that even if you had saved the game in galaxy 12 for example, closed the game, turned off the extra galaxies, and the relaunched the game, once you use the Galactic Hyperdrive to move onward you would end up in galaxy 1.

Also having extra equipment can be annoying, as when I wrote the code for travelling backwards using the Galactic Hyperdrive (like going from galaxy 1 to galaxy 8 in one jump), I originally designed it so you needed a new piece of equipment. I then tweaked this code so all you had to do was press Shift-G to go backwards. This proved less annoying!
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: More/ larger galaxies

Post by Duggan »

Hello Pleb,

I have downloaded your extra galaxies and systems zip, extracted the 10 sub folders and now I would like to ask where, if anywhere I insert/replace them into my existing trunk build please ? It may be they are exclusively for use in fresh builds , I don't know being technologically challenged as I am. that said I would like to see larger galaxies and the extra galaxies like this (maybe not the real big ones) In my game . :)

As an aside, Thank you for your efforts in making Oolite bigger.
Flying Python Class Cruiser, Chapter & Verse IV
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: More/ larger galaxies

Post by Zireael »

Duggan wrote:
Hello Pleb,

I have downloaded your extra galaxies and systems zip, extracted the 10 sub folders and now I would like to ask where, if anywhere I insert/replace them into my existing trunk build please ? It may be they are exclusively for use in fresh builds , I don't know being technologically challenged as I am. that said I would like to see larger galaxies and the extra galaxies like this (maybe not the real big ones) In my game . :)

As an aside, Thank you for your efforts in making Oolite bigger.
I believe you need to insert them in the source code, and then build said source.
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: More/ larger galaxies

Post by Duggan »

Ah thank you Zireal,

So it's not a question of replacing files in a current intall then :) Oh well, It still seems like a very good idea. :)
Flying Python Class Cruiser, Chapter & Verse IV
Post Reply