More/ larger galaxies

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

Moderators: winston, another_commander

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
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:
Once I changed it to 0x1FF it works fine:

Image

As you can see, it's now an overcrowded galaxy!
Woohoo! That would be handy on cargo contracts! There are almost no long jumps left!

Although I suppose the code would recalculate delivery times accordingly..
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 »

Keeping an eye on this while trying to clone Oolite git repo...
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: More/ larger galaxies

Post by spara »

Pleb wrote:
The next test will be to see if its possible to enlarge the galaxy and spread out these systems a bit.
How about halving the internal jump distance? The trick would be to show the max jump limit to the player as 7 LY while internally using 3.5 LY.
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 »

spara wrote:
show the max jump limit to the player as 7 LY while internally using 3.5 LY.
And report doubled distances in js for OXPs. I think both way is possible and both have its own fixable problems but I do not know which is the easier.

Either we use 512x512 maps or doubled distance displays we get 4 times larger space so for the same density we need to place 1024 systems (0x3FF).


I thinked a bit on the seamless integration: how can these arrive into the main game?
Maybe we need a configuration screen before new games where player can choose from normal, denser, larger, denser+larger and from 8 or 16 galaxies.

Plus can be some more historical option to leave the first galaxy as is and change others, or leave the first 8 and make another 8 using mixed denser/larger settings.
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 »

I thinked a bit on the seamless integration: how can these arrive into the main game?
Maybe we need a configuration screen before new games where player can choose from normal, denser, larger, denser+larger and from 8 or 16 galaxies.

Plus can be some more historical option to leave the first galaxy as is and change others, or leave the first 8 and make another 8 using mixed denser/larger settings.
That would be probably quite difficult to code. I can already see all those if/elses required :/

My suggestion is to stuff all the constants required in the planetinfo.plist. One constant for the number of galaxies, one constant for the number of systems in a galaxy, one constant for galaxy map size.

That's three lines in planetinfo total and the only modifications required in the core are de-hardcoding 256, 255 & 0xFF in Universe.m and GuiDisplayGen.m functions.

EDIT: Successfully cloned the repo. Patch coming today or tomorrow.
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 »

spara wrote:
How about halving the internal jump distance? The trick would be to show the max jump limit to the player as 7 LY while internally using 3.5 LY.
This is an idea, but I fear that it would just create more isolated systems as although there a big groups of close together systems, some are still more than 3.5 LY away from the next nearest system. But I will have a look at this an post up an image of the galaxy chart it creates.
Norby wrote:
Either we use 512x512 maps or doubled distance displays we get 4 times larger space so for the same density we need to place 1024 systems (0x3FF).


I thinked a bit on the seamless integration: how can these arrive into the main game?
Maybe we need a configuration screen before new games where player can choose from normal, denser, larger, denser+larger and from 8 or 16 galaxies.

Plus can be some more historical option to leave the first galaxy as is and change others, or leave the first 8 and make another 8 using mixed denser/larger settings.
Making the grid larger would probably require increasing the number of systems to 1024, I will have a go at this as well and post up another chart.

I also agree that the first 8 galaxies should not be touched and should remain as they are, for obvious reasons. I only posted examples from galaxy 1 and 7 as it is easier to see the differences as we know these galaxies well already.
Zireael wrote:
My suggestion is to stuff all the constants required in the planetinfo.plist. One constant for the number of galaxies, one constant for the number of systems in a galaxy, one constant for galaxy map size.

That's three lines in planetinfo total and the only modifications required in the core are de-hardcoding 256, 255 & 0xFF in Universe.m and GuiDisplayGen.m functions.
I think making it customisable through the planetinfo.plist file (or a new .plist file) would be easier than having it as options at the beginning of the game. I've already shown how you have turn on and off having 16 galaxies and selecting the initial seed to use for the ninth galaxy. However, making the actual number of galaxies, systems and size a user-selected value might not work as they really do need to follow a pattern, such as 8 galaxies in a turn/sequence and sizes and system numbers divisible by 256. Having too many galaxies would be pointless, but if you could have the eight original galaxies, and then options for customising the next 8 galaxies, such as whether you even wanted them and how big they are, would be a better way of going about it. Of course a lot of what has been suggested may not be feasible, as to change one aspect changes everything at the moment. It would require some coding to make the game realise the difference between one set of galaxies (the originals)_ and a new set...

It should be noted that these suggestions would also change the fundamentals of Oolite. Implementing new features is always a good idea, so long as the core ideals are upheld. Too much change to the game would effectively replace Oolite with a different kind of game altogether. Not that I'm opposed to change, but obviously I wouldn't want to change the game too much or at the very least keep an option available to be able to play just the core features (8 galaxies, 256 systems, 256x256 grid, etc...). Everything I've suggested in this thread is hypothetical and more brainstorming than an outright demand for new features! :)
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
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 »

keep an option available to be able to play just the core features (8 galaxies, 256 systems, 256x256 grid, etc...)
Those would be the defaults.
I think making it customisable through the planetinfo.plist file (or a new .plist file) would be easier than having it as options at the beginning of the game.
My thoughts exactly.
they really do need to follow a pattern, such as 8 galaxies in a turn/sequence and sizes and system numbers divisible by 256.
Noted.
the eight original galaxies, and then options for customising the next 8 galaxies
A good idea but more difficult to code.
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 »

Okay so the 3.5 jump limit wouldn't work:

Image

There would be too many isolated systems. I will have a look at making the grid larger and adding more systems to compensate for the extra room (although because the grid/coordinate systems are based on the 0-255 range this will require some more re-coding).

I will also post up later code that allows you to define the system numbers by the planetinfo.plist file (like I did before with galaxy sizes) as I know Zireael has tried to replicate this on Github without success.
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
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:
Okay so the 3.5 jump limit wouldn't work:
If you double the number of systems, then to keep the systems in jump range relatively consistent, you need to halve the jump area, not the jump radius. That would give a 4.94 limit (which because of the way witchspace distances are rounded actually is a 5.15 limit) which looks like it would be enough to join up most of those clusters.
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 »

cim wrote:
Pleb wrote:
Okay so the 3.5 jump limit wouldn't work:
If you double the number of systems, then to keep the systems in jump range relatively consistent, you need to halve the jump area, not the jump radius.
Or use 4 times more (1024) systems with the 3.5 limit to fill up the relatively 4 times more space. I think both connection map can be interesting and different.
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 »

The problem you might get with 4x is that the RNG for system placement is the old 8-bit one, so it'll give even more clumping than normal. Even with 2x there's that big cluster near Orrere which is getting unreadably dense on the long-range chart.

I also suspect the 7LY limit is in so many places in the code that it might be easier to make the chart bigger than change that limit...

Possibly what's needed long-term is the ability to scroll and zoom the galactic chart, or maybe even to merge F6 and F6 F6 into a single scroll + zoom (+rotate??) chart (and while you're there, perhaps implement 3D galaxies and switch to real distance rather than the 8-bit rounding method for jump distances). That's a much bigger piece of work, of course!
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 »

Okay, increasing the grid size is doable, but the way I did it was long and stupidly I didn't back up what I was doing or take any screenshots. 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. I also had to play around with how the chart was laid out, and even in the end (before I screwed the code up beyond fixing) there were issues, such as the route finder not working and the cursor co-ordinates being doubled to line up properly, but always starting off screen. However these may have been fixable so I will have to look at this again (and this time take screenshots and back up everything up!).

For now, I will post up how to enable extra systems. Note that this code will allow you to have an extra 8 galaxies and decide the seed used for galaxy 9, and whether to enable the extra 256 systems (but only for galaxies 9-16). Also they can be turned off. This way the core game is left intact, but there is a way to enable these features through the planetinfo.plist file.

As the code changes are too long to explain on here, I have uploaded the 10 files I have modified in the source to my box.com account. You will need to replace them with the ones currently in the source. Also you will need to add the following to the planetinfo.plist file:

Code: Select all

// Set to yes if you want to enable extra 8 galaxies (default is no):
extra_galaxies_enabled = yes;
// Seed used for galaxy 9 and for subsequent 7 turns to generate galaxies 10-16:
galaxy_9_seed = "177 86 161 69 177 103";
// Set to yes if you want to enable an extra 256 systems for galaxies 9-16: (default is no):
extra_systems_enabled = yes;
There is code in the source that makes sure that if these values are not set they will default to no, so that the core game is not affected.

https://app.box.com/s/acghol1pbiktpsgtic2p
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
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: More/ larger galaxies

Post by Cody »

Pleb wrote:
Note that this code will allow you to have an extra 8 galaxies and decide the seed used for galaxy 9, and whether to enable the extra 256 systems (but only for galaxies 9-16). Also they can be turned off. This way the core game is left intact, but there is a way to enable these features through the planetinfo.plist file.
<ponders extra galaxies> Could the 'extra eight' be made to use a different system name seed/string? One that includes the missing letters?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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 »

Cody wrote:
<ponders extra galaxies> Could the 'extra eight' be made to use a different system name seed/string? One that includes the missing letters?
I used to think this wouldn't be possible, but I think this may actually be possible after all. The only issue is the digrams. At present, the following entry in description.plist controls names in Oolite:

Code: Select all

digrams = "ABOUSEITILETSTONLONUTHNOALLEXEGEZACEBISOUSESARMAINDIREA’ERATENBERALAVETIEDORQUANTEISRION";
If you could devise a new set of 87 letters to replace this then it could be added as a seperate entry in the descriptions.plist file and some code added so that the systems in galaxy 9-16 use this new set to generate names.
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
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 »

Okay I've managed to recover some of the code used to produce the expanded grid. First, this is galaxy 9 with the standard grid size:

Image

And this is galaxy 9 with the expanded grid size:

Image

I've also made sure that the grid and the chart screen display size only change when in galaxies 9-16 with extra systems enabled. However I haven't finished the fine tuning, and seeing as the chart would be unconnected I'm not sure this is viable or worth me releasing the code for this part just yet. I tried adding 1024 systems but it wouldn't load the game... :(
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
Post Reply