Split: Re-scaling experiment
Moderators: winston, another_commander
- Redspear
- ---- E L I T E ----
- Posts: 2687
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Split: Re-scaling experiment
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...
I'll do what I can and may even manage to get all of the code posted within the next 24 hrs...
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
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
- Redspear
- ---- E L I T E ----
- Posts: 2687
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Split: Re-scaling experiment
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
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:
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
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;
}
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
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
Thanks mate!
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
- Redspear
- ---- E L I T E ----
- Posts: 2687
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Split: Re-scaling experiment
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 ...
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 ...
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
<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
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
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);
PlayerEntity.m line 3234
Code: Select all
double factor = ([stellar isSun]) ? 1.4 : 1.0;
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];
Universe.m line 1155
Code: Select all
stationPos = HPvector_subtract(stationPos, vectorToHPVector(vector_multiply_scalar(vf, 1.5 * planet_radius)));
oolite-populator.js line 119
Code: Select all
coordinates: system.mainStation.position.add(system.mainStation.vectorForward.multiply(5E3)),
Universe.m line 1465
Code: Select all
result = OORandomPositionInCylinder(kZeroHPVector,SCANNER_MAX_RANGE,[planet position],[planet radius]*1.1,LANE_WIDTH);
Code: Select all
result = OORandomPositionInCylinder([planet position],[planet radius]*1.1,[sun position],[sun radius]*3,LANE_WIDTH);
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
Code: Select all
#define SCANNER_MAX_RANGE2 163840000.0
shipdata.plist Line 3662 (Thargoid)
Code: Select all
scanner_range = 16666;
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;
Code: Select all
model_scale_factor = 0.365;
Code: Select all
model_scale_factor = 0.4;
Code: Select all
model_scale_factor = 0.5;
ShipEntity.m line 4712
Code: Select all
if (getWeaponRangeFromType(forward_weapon_real_type) > 3750 && range > 3750)
Code: Select all
if (range < 3750)
Code: Select all
if (range < 500)
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
Re: Split: Re-scaling experiment
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
If so, I'd build that for Windows, offer prebuild binaries and place it on my GitHub
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
Correct.
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
- Redspear
- ---- E L I T E ----
- Posts: 2687
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: Split: Re-scaling experiment
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.
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.
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.
Charitably put Sir Redspear hasn't got a ****ing clue how to use github yet might be nearer the markDiziet Sma wrote: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.
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.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
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
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Split: Re-scaling experiment
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.
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.
Re: Split: Re-scaling experiment
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.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Split: Re-scaling experiment
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...
Edit to add: And for the actual diff between the fork and current master, check here. Having everything on github makes patching so easy...
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Split: Re-scaling experiment
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";
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";
(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