Split: Re-scaling experiment

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

Astrobe wrote: Looks fun indeed. I wonder what happens when one combines my "shaky drives" with this.
I haven't tried that yet but it shouldn't be incompatible. The situation I've described is a result of 3 things :
  • greater distance (accuracy of compass 'aim')
  • greater speeds (adjustment time)
  • smaller scanner (catchment area)

The last one is at 33% size but when it was at 50% for example (as in the previous builds) the situation described didn't really exist because the station would nearly always be caught on the edge of the scanner.

Astrobe wrote:Since I can compile from source now, I'd like to give it a try but it seems that the rescaling experiment branches in the oolite github are not up to date?
Correct, the github stuff is at version 2. The oxp file that pleiadian mentioned earlier is not required for that version (IIRC) but is a relic from version 1. I could start posting my code alterations as I go but Dizzy has the first post of this thread and they soon get buried...

That reminds me. Does anyone know where buoy distance from station is set? This was something I couldn't find for version 2 but it was hardly critical. Now that the scanner is smaller again however, it would be nice to bring it in a bit.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5530
Joined: Wed Feb 28, 2007 7:54 am

Re: Split: Re-scaling experiment

Post by another_commander »

Redspear wrote:
Sun Mar 19, 2017 7:15 am
I could start posting my code alterations as I go but Dizzy has the first post of this thread and they soon get buried...
I would suggest doing a personal fork of the project on github. You may have to make an account there first and maybe read a bit about how it works, but it's worth it for the following reasons:
- It will enable you to be always up to date with the current source.
- It will be much, much easier to maintain. The reason it's only v2 on github right now is that we simply don't have resources to keep it level with master, especially since you are actively developing it and changing things and experimenting.
- It will be extremely easy and simple to bring it into the main Oolite branch when you are satisfied that it is ready and complete. At that time you will only need to do a pull request to the master branch so that your changes get a final review and then we are good to go.

If you do decide to go for github, you can always ask for help if needed and we are here to help.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

another_commander wrote: I would suggest doing a personal fork of the project on github.
Yeah, that's probably good advice. Maybe it's time I learned more about it.
Probably something for when I next need to make a significant code alteration.

another_commander wrote:If you do decide to go for github, you can always ask for help if needed and we are here to help.
Good to know and may well be necessary :D

Thanks.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
pleiadian
Deadly
Deadly
Posts: 143
Joined: Mon Feb 20, 2017 2:14 pm

Re: Split: Re-scaling experiment

Post by pleiadian »

OK so... how playable is the Rescale branch? Can one use it for "normal" gameplay already? If so, is it based on the 1.84 tree, or does it also use the current branch with the planet shaders? I'd really like to try it out.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5530
Joined: Wed Feb 28, 2007 7:54 am

Re: Split: Re-scaling experiment

Post by another_commander »

pleiadian wrote:
Mon Mar 20, 2017 10:20 am
OK so... how playable is the Rescale branch? Can one use it for "normal" gameplay already? If so, is it based on the 1.84 tree, or does it also use the current branch with the planet shaders? I'd really like to try it out.
The rescaling branch contains a pre-1.84 snapshot of master at that time, with Redspear's proposed changes at that time (some of those have changed since then). The branch should be playable but it will be missing a lot of bug fixes and features that were added between then and now. Definitely no new planet stuff in there.

However, I would recommend waiting for a little while before you try it out. There is a pending pull request by kanthoney right now on github for bringing the entire rescaling branch up to date with master. I would suggest giving it a go once the pull request has been reviewed and merged, which should most likely happen very soon.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

another_commander wrote:
Mon Mar 20, 2017 2:30 pm
I would suggest giving it a go once the pull request has been reviewed and merged, which should most likely happen very soon.
Gulp! Work to do... :)
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

Early sun-skimming results...

The test conditions:

  • Cobra Mk III, no heat shielding, no injectors, no remaining fuel
  • Torus approach to sun, once mass-locked continue until scoops activate
  • Once scoops are active pitch approx 90 degrees (using compass) to continue scooping but avoid getting any closer to star
  • Once tanks are full pitch another 90 degrees to have star directly behind the ship and attempt to escape at full speed

The results:

Isinor (large planet): filled tanks and managed to get altitude meter to green whilst escaping but contined to heat up catastrophically

Tionisle (small planet): once again managed to fill up the tanks but this time could barely escape past the half mark on the altitude meter

Ontiat (even bigger planet): did a little better than at Isinor but still got burned

Although in a fast ship I was without the benefit of both injectors and heat shielding so I would not have wanted sun-skimming to be too easy. Despite a considered approach, there was insufficient time to escape, even from the larger planets (= larger stars, IIRC)

Escape was possible via hyperspace, so sun-skimming was viable but not easy for the unprepared. In a slower ship it might even be difficult.

Conclusions:

  • Heat shielding and injectors were not essential but certainly would have helped, and been essential if I had wished to remain within the same system.
  • Sun-skimming remained useful but dangerous without either of these two items, even in a fast ship.
  • It was a little harder than I recall in the earlier versions of the experiment (scanner size perhaps???) but I see that as a good thing.
  • Without either proper equipment or sufficient caution/experience sun-skimming can be dangerous, without both it could likely be deadly - I'd consider that to be a desirable state of affairs.

So, not too bad. Perhaps I can move on to the asteroids...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5530
Joined: Wed Feb 28, 2007 7:54 am

Re: Split: Re-scaling experiment

Post by another_commander »

@Redspear. We are ready to merge kanthoney's pull request for the rescaling experiment branch and bring it up to speed with current master. Is that OK with you? The branch will still not contain any of your recent changes, but if you clone it right after we merge, you could apply your later patches and then continue being up to speed by simply doing an occasional merge with master on your own.

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: Split: Re-scaling experiment

Post by Diziet Sma »

OK!

I've just spent several hours re-reading this entire thread to get my head back up to speed with the project, and paying particular attention to everything I've missed in the last year or so..

Congratulations, Redspear, on all the hard work you've been putting in on this whilst I was away.. and a big thanks to another_commander and kanthoney for getting behind the project as well.. thanks also to everyone involved in testing.
Redspear wrote:
Sun Mar 19, 2017 7:15 am
Correct, the github stuff is at version 2. The oxp file that pleiadian mentioned earlier is not required for that version (IIRC) but is a relic from version 1. I could start posting my code alterations as I go but Dizzy has the first post of this thread and they soon get buried...
I'm guessing that with the big merge request about to go through (very exciting news, btw!), it would currently be a bit of a moving target, but as soon as the dust settles, let me know what you'd like to say in the first post, and I'll edit it accordingly.

I'm very much looking forward to building and testing version 3, once the github code is up to date.
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
kanthoney
Commodore
Commodore
Posts: 281
Joined: Thu Nov 07, 2013 10:21 pm

Re: Split: Re-scaling experiment

Post by kanthoney »

It might be best if Redspear merged any work he's done into the branch before the pull request gets merged - it might make it easier to sort out any merge conflicts that occur if we do it that way round.

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

another_commander wrote:
Thu Mar 23, 2017 10:17 am
@Redspear. We are ready to merge kanthoney's pull request for the rescaling experiment branch and bring it up to speed with current master. Is that OK with you?
Yes indeedy!
The last version did have the least favourable laser ranges however (IMHO) and so it would be nice if they could be reduced to at least 33% (as per the first version and with the corresponding shipEntity.m tweaks) rather than the 50% they were set at.

Diziet Sma wrote: OK!

I've just spent several hours re-reading this entire thread to get my head back up to speed with the project
Apologies for my verbosity :oops: :lol:

Diziet Sma wrote: Congratulations, Redspear, on all the hard work you've been putting in on this whilst I was away.. and a big thanks to another_commander and kanthoney for getting behind the project as well.. thanks also to everyone involved in testing.
Thank you Dizzy, it's great to see you around the place once more :)

Diziet Sma wrote: I'm guessing that with the big merge request about to go through (very exciting news, btw!), it would currently be a bit of a moving target, but as soon as the dust settles, let me know what you'd like to say in the first post, and I'll edit it accordingly.

I'm very much looking forward to building and testing version 3, once the github code is up to date.
Thank you kindly, I'll be in touch.

kanthoney wrote: It might be best if Redspear merged any work he's done into the branch before the pull request gets merged - it might make it easier to sort out any merge conflicts that occur if we do it that way round.
Well I'm nearly ready with a version 3 anyway (next few days.. maybe... :mrgreen: ) so, if only for my own sanity, I'll start posting my changes for this version here.
I suppose I'll need to check if they match up with latest trunk and that way if I make a mess of the githubbery later on then at least folks will be able to work out what I intended.

Meanwhile, I've found the code to move the station buoy around.
It hadn't moved anywhere, I'd just stopped looking in the right place for it :P
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

Good news: after a (very) quick test the new asteroids seem to be working well.

There are currently 4 sizes.

  • Small: will appear half size to the mk III; reduced yield and bounty
  • Medium: will appear double size to the mk III; regular yield and bounty
  • Large: will appear 6 times larger to the mk III; yield and bounty increased; destuctable only by missiles or similar
  • Huge: will appear 12 times larger to the mk III; should be indestructable to normal weapons

The huge asteroids should appear no bigger relative to the space-lane than asteroids in the standard game.
12 (huge missile size) /3 (system size factor) = 4 ... 4/2 (space lane length proportionally doubled) = 2 ... 2/2 (mkIII half size) = 1

Should asteroids be throwing sparks? Mine seem to be... :|

So I think that might be everything for now.
Almost certainly there will be something(s) amiss but I haven't found it/them yet.

Code postings to follow, probably in a rather sporadic manner and with several edits of the same post...
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2560
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Split: Re-scaling experiment

Post by Norby »

Redspear wrote:
Thu Mar 23, 2017 10:09 pm
Should asteroids be throwing sparks? Mine seem to be... :|
Even if you set throw_sparks=no ?

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

Norby wrote:
Redspear wrote:
Thu Mar 23, 2017 10:09 pm
Should asteroids be throwing sparks? Mine seem to be... :|
Even if you set throw_sparks=no ?
Thanks Norby, I 'll give that a try.

They are all like_ship references however so I wouldn't have thought they'd behave any differently than the standard asteroids in that regard...

EDIT : To be clear, I mean throwing sparks when near 'death' rather than constantly.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 1484
Joined: Thu Jun 20, 2013 10:22 pm

Re: Split: Re-scaling experiment

Post by Redspear »

So here it is (or at least will be when I've got it all together): version 3 of the rescaling experiment.

Empty areas will be filled in when I get the chance (the work is done, it's just not in an easy cut and paste format) but even empty they are illustrative of some of the changes required.

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.


Part I: System Rescaling

Make planets, suns and moons bigger
OOPlanetEntity.m line 120

Code: Select all

collision_radius = radius_km * 33.0;
Adjust planet size on F7 screen
OOStellarBody.h line 53

Code: Select all

#define PLANET_MINIATURE_FACTOR	0.0005
Increase torus drive multiplier
PlayerEntity.h line 314

Code: Select all

#define MIN_HYPERSPEED_FACTOR			128.0
PlayerEntity.h line 315

Code: Select all

#define MAX_HYPERSPEED_FACTOR			80192.0
PlayerEntity.h line 317

Code: Select all

#define HYPERSPEED_FACTOR			128.0
Increase torus drive decelleration
PlayerEntity.m line 2955

Code: Select all

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

Code: Select all

double factor = ([stellar isSun]) ? 1.4 : 1.0;
Adjust sun-skimming parameters for non-player ships
ShipEntity.m line 730 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 891

Code: Select all

planet_zpos *= [planetDict oo_floatForKey:@"planet_distance_multiplier" defaultValue:5.0];
Increase distance of star
planetinfo.plist (universal)

Code: Select all

sun_distance_multiplier = 6.6;
Halve orbit of station
Universe.m line 1150

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 116

Code: Select all

#define LANE_WIDTH		(4.0 * SCANNER_MAX_RANGE)
Universe.m line 1459

Code: Select all

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

Code: Select all

result = OORandomPositionInCylinder([planet position],[planet radius]*1.1,[sun position],[sun radius]*3,LANE_WIDTH);
Enable large objects to appear at much greater distances
Entity.h line 47

Code: Select all

#define ABSOLUTE_NO_DRAW_DISTANCE2	(25000.0 * 25000.0 * NO_DRAW_DISTANCE_FACTOR * NO_DRAW_DISTANCE_FACTOR)
Add asteroids of variable size
oolite-populator.js line 144

Code: Select all

var clusters = 4*(1+Math.floor(system.scrambledPseudoRandomNumber(51728)*4));
I was using 8* for testing but that's probably too strong and this line could be omitted altogether (it just adds more asteroids but then the space lane is twice as long...).
shipdata.plist (Asteroid & Asteroid Alt)

Code: Select all

name = "Medium Asteroid";
shipdata.plist (New Asteroids)

Code: Select all

"oolite_template_asteroid_small" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 5;
		is_template = 1;
		likely_cargo = 2;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		model = "oolite_asteroid.dat";
		model_scale_factor = 0.33;
		name = "Small Asteroid";
		roles = "asteroid";
	};
	"oolite_template_asteroid_small_alt" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 5;
		is_template = 1;
		likely_cargo = 2;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		model = "oolite_alt_asteroid.dat";
		model_scale_factor = 0.33;
		name = "Small Asteroid";
		roles = "asteroid";
	};
	"oolite_template_asteroid_large" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 30;
		is_template = 1;
		likely_cargo = 12;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		max_energy = 100;
		energy_recharge_rate = 500;
		model = "oolite_asteroid.dat";
		model_scale_factor = 3.3;
		name = "Large Asteroid";
		roles = "asteroid(0.25)";
	};
	"oolite_template_asteroid_large_alt" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 30;
		is_template = 1;
		likely_cargo = 12;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		max_energy = 100;
		energy_recharge_rate = 500;
		model = "oolite_alt_asteroid.dat";
		model_scale_factor = 3.3;
		name = "Large Asteroid";
		roles = "asteroid(0.25)";
	};
	"oolite_template_asteroid_huge" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 100;
		is_template = 1;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		max_energy = 25000;
		energy_recharge_rate = 500;
		model = "oolite_asteroid.dat";
		model_scale_factor = 6.6;
		name = "Huge Asteroid";
		roles = "asteroid(0.05)";
	};
	"oolite_template_asteroid_huge_alt" = 
	{
		like_ship = "oolite_template_asteroid";
		bounty = 100;
		is_template = 1;
		materials =
		{
			"oolite_alt_asteroid_diffuse.png" =
			{
				shininess = 7;
				specular_color = (0.3, 0.3, 0.3, 1.0);
			};
		};
		max_energy = 25000;
		energy_recharge_rate = 500;
		model = "oolite_alt_asteroid.dat";
		model_scale_factor = 6.6;
		name = "Huge Asteroid";
		roles = "asteroid(0.05)";
	};
	
	"asteroid-small" = 
	{
		like_ship = "oolite_template_asteroid_small";
	};
	"asteroid-alternative-small" =
	{
		like_ship = "oolite_template_asteroid_small_alt";
	};
	"asteroid-large" = 
	{
		like_ship = "oolite_template_asteroid_large";
	};
	"asteroid-alternative-large" =
	{
		like_ship = "oolite_template_asteroid_large_alt";
	};
	"asteroid-huge" = 
	{
		like_ship = "oolite_template_asteroid_huge";
	};
	"asteroid-alternative-huge" =
	{
		like_ship = "oolite_template_asteroid_huge_alt";
	};
	


Part III: Ship Rescaling

Reduce the scanner Radius
Entity.h line 50

Code: Select all

#define SCANNER_MAX_RANGE			12800.0
Entity.h line 51

Code: Select all

#define SCANNER_MAX_RANGE2			163840000.0
Prevent 'lollypops' from appearing outside the scanner
HeadUpDisplay.h line 42

Code: Select all

#define SCANNER_SCALE		85.33
Reduce thargoid scanner range
shipdata.plist (Thargoid)

Code: Select all

scanner_range = 16666;
Reduce laser ranges
equipment.plist (Pulse Laser & Beam Laser ranges)

Code: Select all

range = 3750;
equipment.plist (Mining Laser range)

Code: Select all

range = 3125;
equipment.plist (Military Laser range)

Code: Select all

range = 5000;
equipment.plist (Thargoid Laser range)

Code: Select all

range = 4500;
Rescale some ship models
shipdata.plist (Adder, All Alloys, All Barrels, All Missiles, Escape Capsule, Gecko, QBomb, Sidewinder, All Splinters, Thargon, Worm, All Wreckage)

Code: Select all

model_scale_factor = 0.33;
shipdata.plist (Mamba, Viper)

Code: Select all

model_scale_factor = 0.365;
shipdata.plist (Asp, Constrictor, Krait, Moray, Viper Interceptor)

Code: Select all

model_scale_factor = 0.4;
shipdata.plist (All Boulders, All Buoys, Cobra3, Cobramk1, Ferdelance, Thargoid, )

Code: Select all

model_scale_factor = 0.5;
Adjust shipdata and halve speeds
shipdata.plist
All ships and entities to have both speed and thrust divided by two
Adjust turret speed & range (calculated from speed)
ShipEntity.h line 80

Code: Select all

#define TURRET_SHOT_SPEED				500.0f	
Adjust ship behaviour to new ranges
ShipEntity.m line 4703

Code: Select all

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

Code: Select all

if (range < 3750)
ShipEntity.m line 5279

Code: Select all

if (range < 500)
ShipEntity.m line 13906

Code: Select all

double range2, nearest2 = SCANNER_MAX_RANGE2 * 10000000.0;
Last edited by Redspear on Sat Mar 25, 2017 5:24 pm, edited 3 times in total.
"With our thoughts, we make the world" :-) - - - Game too slow for you? Masslock Compensators - - - Trouble getting out of trouble? Indestructible Injectors

Post Reply