Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Split: Re-scaling experiment

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2657
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Split: Re-scaling experiment

Post by Redspear »

Nearly there but I'm going to be very busy for the new few days.

I'll do what I can and may even manage to get all of the code posted within the next 24 hrs...
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

Cool.. I've now gotten my Windoze build environment set up, in anticipation..
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
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2657
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Split: Re-scaling experiment

Post by Redspear »

OK, all of the code/info (I think) is now on the previous page.

If anyone wants to try it for themself then I'm afraid there's quite a bit of shipdata.plist editing to do but it's just time-consuming rather than difficult.

Not included are any changes to ShipEntityAI.m
From line 380 for example

Code: Select all

if (behaviour != BEHAVIOUR_EVASIVE_ACTION)
	{
		behaviour = BEHAVIOUR_ATTACK_TARGET;
		desired_range = 1250 * randf() + 750; // 750 til 2000
		frustration = 0.0;	
	}
In cases such as this it may be a good idea to edit the numbers but as nothing seemed to be broken I've avoided interfering with them so far.

There are a few more tweaks that I'm considering but the code I've provided appears to be quite robust as far as my limited testing has shown.

It's by no means a realistic attempt at scaling but it is a little closer to realism.
I really like it and I hope it proves at least an interesting alternative for some.

Some of the main changes:

  • Planets now dwarf stations
  • Freighters now dwarf fighters
  • System space is much bigger
  • Asteroids are much more variable in size
  • Mass-lock times are reduced
  • Combat is a little more up close and personal

Please remember that any oxp ships or shipsets will need to be speed (and possibly size) adjusted unless they are using like_ship references to the core shipset

Feedback would be very much appreciated :)
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

Thanks mate!
Redspear wrote: Sat Mar 25, 2017 5:23 pm
If anyone wants to try it for themself then I'm afraid there's quite a bit of shipdata.plist editing to do but it's just time-consuming rather than difficult.
Any chance you could put your shipdata.plist in a dropbox and post the link here?
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
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2657
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Split: Re-scaling experiment

Post by Redspear »

Not likely for the next day or two I'm afraid (little access to the 'puter). Besides, I may still have som other experimental stuff going on in there (can't recall if it's still in that particular file or moved to oxp...)

I suppose you could add them to shipdata-overrides.plist instead (might save a little time). If I wasn't in such a rush I'd have listed all the adjusted speed and thrust figures.

Come to think of it, if you try it with the old rescaling.oxp (and edit in the asteroids stuff) then that should be almist tge same - remove the equipment.plist from it though. At your own risk :-)...
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

Redspear wrote: Sat Mar 25, 2017 11:14 pm
Come to think of it, if you try it with the old rescaling.oxp (and edit in the asteroids stuff) then that should be almist tge same - remove the equipment.plist from it though. At your own risk :-)...
Done.. anyone who wants a copy can download the 1.2 version of the rescaling.oxp here:
<removed - outdated>

(Please note this is only a temporary measure until all the code gets added to the rescaling branch at Github, and the current trunk code gets merged with the rescaling branch. After that, this oxp will no longer be required, as with version 2 of this experiment.)
Last edited by Diziet Sma on Tue Mar 28, 2017 11:31 am, edited 1 time in total.
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
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

Redspear wrote: Fri Mar 24, 2017 12:32 am
Apologies if it isn't yet up to date with the latest source but listing it here will help me to fix that should it be necessary.
For those line numbers that have changed in the current source, here's an updated list of only those line numbers that have changed.

This listing also includes the necessary locations [shown inside square brackets] to insert new lines into shipdata.plist. (Note that where "All" is specified in front of a particular ship or object, the line number referenced is to the base template definition, to which all other instances of that object are like_ship'd, so adding the line at that one location will affect all the others to which it applies.)


Part I: System Rescaling


Increase torus drive decelleration
PlayerEntity.m line 2968

Code: Select all

float deceleration = (speed_delta * delta_t * HYPERSPEED_FACTOR * 8);
Reduce mass-lock radius for planets and suns
PlayerEntity.m line 3234

Code: Select all

double factor = ([stellar isSun]) ? 1.4 : 1.0;
Adjust sun-skimming parameters for non-player ships
ShipEntity.m line 742 untested but necessary due to larger suns and lack of torus drive

Code: Select all

[self setHeatInsulation:[shipDict oo_floatForKey:@"heat_insulation" defaultValue:[self hasHeatShield] ? 6.6 : 3.3]];

Part II: System Rearrangement


Double (approx.) planet distance from witchpoint
Universe.m line 895

Code: Select all

planet_zpos *= [planetDict oo_floatForKey:@"planet_distance_multiplier" defaultValue:5.0];
Halve orbit of station
Universe.m line 1155

Code: Select all

stationPos = HPvector_subtract(stationPos, vectorToHPVector(vector_multiply_scalar(vf, 1.5 * planet_radius)));
Bring nav beacon closer to station
oolite-populator.js line 119

Code: Select all

coordinates: system.mainStation.position.add(system.mainStation.vectorForward.multiply(5E3)),
Adjust the space-lane
Universe.m line 1465

Code: Select all

result = OORandomPositionInCylinder(kZeroHPVector,SCANNER_MAX_RANGE,[planet position],[planet radius]*1.1,LANE_WIDTH);
Universe.m line 1473

Code: Select all

result = OORandomPositionInCylinder([planet position],[planet radius]*1.1,[sun position],[sun radius]*3,LANE_WIDTH);
Add asteroids of variable size
shipdata.plist Line 554 (Asteroid & Asteroid Alt)

Code: Select all

name = "Medium Asteroid";

Part III: Ship Rescaling


Reduce the scanner Radius
Entity.h line 51

Code: Select all

#define SCANNER_MAX_RANGE			12800.0
Entity.h line 52

Code: Select all

#define SCANNER_MAX_RANGE2			163840000.0
Reduce thargoid scanner range
shipdata.plist Line 3662 (Thargoid)

Code: Select all

scanner_range = 16666;
Rescale some ship models
shipdata.plist (Adder [149], All Alloys [200], All Barrels [756], All Missiles [2677], Escape Capsule [2123], Gecko [2314], QBomb [3167], Sidewinder [3518], All Splinters [3578], Thargon [3623], Worm [4085], All Wreckage [4137])

Code: Select all

model_scale_factor = 0.33;
shipdata.plist (Mamba [2615], Viper [3792])

Code: Select all

model_scale_factor = 0.365;
shipdata.plist (Asp [488], Constrictor [1698], Krait [2542], Moray [2812], Viper Interceptor [3934])

Code: Select all

model_scale_factor = 0.4;
shipdata.plist (All Boulders [1102], All Buoys [1141], Cobra3 [1386], Cobramk1 [1584], Ferdelance [2256], Thargoid [3679])

Code: Select all

model_scale_factor = 0.5;
Adjust ship behaviour to new ranges
ShipEntity.m line 4712

Code: Select all

if (getWeaponRangeFromType(forward_weapon_real_type) > 3750 && range > 3750)
ShipEntity.m line 5051

Code: Select all

if (range < 3750)
ShipEntity.m line 5288

Code: Select all

if (range < 500)
ShipEntity.m line 13915

Code: Select all

double range2, nearest2 = SCANNER_MAX_RANGE2 * 10000000.0;
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
User avatar
pleiadian
Deadly
Deadly
Posts: 143
Joined: Mon Feb 20, 2017 2:14 pm

Re: Split: Re-scaling experiment

Post by pleiadian »

So in other words, if I pull the current 1.85 code, perform all these changes in the code files and rebuild, I have a Rescale build, yes?

If so, I'd build that for Windows, offer prebuild binaries and place it on my GitHub
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

pleiadian wrote: Sun Mar 26, 2017 6:53 am
So in other words, if I pull the current 1.85 code, perform all these changes in the code files and rebuild, I have a Rescale build, yes?
Correct.
pleiadian wrote: Sun Mar 26, 2017 6:53 am
If so, I'd build that for Windows, offer prebuild binaries and place it on my GitHub
Heh.. I'm about to do the same.. with a little more. Redspear is a bit uncertain as to how to fork the 1.85 code, so I've done that and am about to add him as a collaborator. I'm about to commit the changes to it, so he'll have an up-to-date copy to work on/from.

You should note that it's not enough to just offer the binaries.. four of the resource files have changes applied to them as well.. I'm about to bundle them up as an OXP, along with a fresh re-scale build that I've just now compiled, so that people can download the binaries, swap them into their current trunk build, and add the OXP to supply the updated resources.
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
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2657
Joined: Thu Jun 20, 2013 10:22 pm
Location: On the moon Thought, orbiting the planet Ignorance.

Re: Split: Re-scaling experiment

Post by Redspear »

Thanks Dizzy! :-)

There's almost certainly a little more tweaking to be done (and I keep getting that awkward feeling of having forgotten something but not being able to recall what it is...) but nothing major I don't think.

Thanks also to another_commander who added some of the lane adjustment code that I've kept from version 2... and to cim who signposted much of the code I was searching for so that I could get started with version 1.

Diziet Sma wrote:
pleiadian wrote: Sun Mar 26, 2017 6:53 am
If so, I'd build that for Windows, offer prebuild binaries and place it on my GitHub
Heh.. I'm about to do the same.. with a little more. Redspear is a bit uncertain as to how to fork the 1.85 code, so I've done that and am about to add him as a collaborator. I'm about to commit the changes to it, so he'll have an up-to-date copy to work on/from.
Charitably put Sir ;-) Redspear hasn't got a ****ing clue how to use github yet might be nearer the mark :lol:
Your return to these boards has proved most timely Dizzy, thanks again.

Thanks also for the kind offer pleiadian, I'm glad you're interested and look forward to hearing what you think of it.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

Redspear wrote: Sun Mar 26, 2017 7:17 am
Thanks Dizzy! :-)

There's almost certainly a little more tweaking to be done (and I keep getting that awkward feeling of having forgotten something but not being able to recall what it is...) but nothing major I don't think.
I'm sure there's more than a little to go.. but at least now, we'll have our very own master of the rescaling experiment stored on Github, which will make it easier to keep it up-to-date with Oolite master, make things easier for anyone who wants to play with it, and make it a whole lot easier for the devs to merge it back into Oolite master when the time comes.
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
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6570
Joined: Wed Feb 28, 2007 7:54 am

Re: Split: Re-scaling experiment

Post by another_commander »

Thanks Dizzy, this is by far the best way to go about it in my opinion. Good job.

Redspear, github seems like a monster when you get started but it's really only a few actions that you need to learn and perform. Once you start working with it you'll wonder why you hadn't done it this way from the very start. Looking forward to seeing the builds from the experiment.
User avatar
pleiadian
Deadly
Deadly
Posts: 143
Joined: Mon Feb 20, 2017 2:14 pm

Re: Split: Re-scaling experiment

Post by pleiadian »

Seems as if Diziet's instruction regarding the changes for shipdata.plist is not applicable. The model scale factor value is nowhere to be found for any ship type. I should mention that I attempted to apply those to the current 1.85 code.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6570
Joined: Wed Feb 28, 2007 7:54 am

Re: Split: Re-scaling experiment

Post by another_commander »

I have updated Dizzy's github fork with the changes required for the rescaling, as per Redspear's latest instructions. You can build from the fork's repository and test it: https://github.com/Garryck/oolite-rescaling-experiment

Edit to add: And for the actual diff between the fork and current master, check here. Having everything on github makes patching so easy...
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Split: Re-scaling experiment

Post by Diziet Sma »

pleiadian wrote: Sun Mar 26, 2017 4:50 pm
Seems as if Diziet's instruction regarding the changes for shipdata.plist is not applicable. The model scale factor value is nowhere to be found for any ship type. I should mention that I attempted to apply those to the current 1.85 code.
Sorry, I should have been clearer.

model_scale_factor is not normally used in the core shipdata.plist. It's a recent addition to the code for OXPers and this project to make use of. That's why I said "This listing also includes the necessary locations [shown inside square brackets] to insert new lines into shipdata.plist."

The line numbers I provided are where you should insert the new line, eg:

Before:

Code: Select all

		max_flight_roll = 2.8;
		max_flight_speed = 240;
		max_missiles = 1;
		missile_launch_position = "0.0 -5.1 19.2374";
		missiles = 1;
		model = "oolite_adder.dat";
		name = "Adder";
		roles = "trader(0.25) trader-courier(0.5) trader-smuggler pirate-light-fighter(0.25) pirate(0.2) scavenger shuttle hermit-ship";
After:

Code: Select all

		max_flight_roll = 2.8;
		max_flight_speed = 120;
		max_missiles = 1;
		missile_launch_position = "0.0 -5.1 19.2374";
		missiles = 1;
		model = "oolite_adder.dat";
		model_scale_factor = 0.33;
		name = "Adder";
		roles = "trader(0.25) trader-courier(0.5) trader-smuggler pirate-light-fighter(0.25) pirate(0.2) scavenger shuttle hermit-ship";
I hope that makes it clearer.

(note that this example also includes the reduction in speed that's mentioned)
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
Post Reply