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

BGS - The BackgroundSet

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

Moderators: winston, another_commander

User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

@Dizzy and doctorfrog

Please change the first two lines in the switch statement (this.doBGSTimer function).

Code: Select all

switch(this.bgsCurrentSet[i].change){
  case 1: if(cu>this.bgsCurrentSet[i].cmp +1 ) this.changePlay(this.bgsCurrentSet[i],1); break;
  case -1: if(cu<this.bgsCurrentSet[i].cmp -1 ) this.changePlay(this.bgsCurrentSet[i],1); break;
  case 0: if(cu!==this.bgsCurrentSet[i].cmp) this.changePlay(this.bgsCurrentSet[i],1); break;
  case 2: if(cu!==this.bgsCurrentSet[i].cmp) this.changePlay(this.bgsCurrentSet[i],1); break;
}
The +1,-1 is the dampening/threshold. Use higher numbers if it doesn't solve it. If a value is found I'll change BGS .-)
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: BGS - The BackgroundSet

Post by Diziet Sma »

El Viejo wrote:
I just tried using the 'stick throttle, and I don't seem to get any 'jitter'. When I'm stationary, I get no engine sounds at all. Like you, Diz, I spend a fair bit of time loitering around the station aegis, waiting for a lift, and if the engine sound was constantly up and down, I reckon it could get somewhat annoying.
<chuckles> yeah.. 'somewhat annoying' is one term for it! :lol:
Svengali wrote:
The +1,-1 is the dampening/threshold. Use higher numbers if it doesn't solve it. If a value is found I'll change BGS .-)
Thanks.. I'll try it right now. I doubt you'll find a firm value, I suspect it would depend very much on the individual stick, its age, quality of the pots used, etc. If it turns out to be too variable, it may be better to allow the dampening factor to be set via OXPConfig.
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: BGS - The BackgroundSet

Post by Diziet Sma »

@ Svengali.. are you absolutely sure that's the correct snippet of code? I've worked my way, in multiples of 10, all the way to +/- 1000000 with no effect at all.

Just to be sure, we're talking about the case statements in the this.doBGSTimer function, located in the BGS-M.js script, yes?
El Viejo wrote:
I use the keyboard for throttle control, rather than the 'stick throttle.
doctorfrog wrote:
I ended up just using the keyboard for throttle, partly because of the constant "wooshing."
My problem is (dunno if it's a Linux thing) that the joystick throttle overrides/locks out the keyboard throttle controls. With the 'stick plugged in, "w" & "s" do nothing. :evil:
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
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Diziet Sma wrote:
@ Svengali.. are you absolutely sure that's the correct snippet of code? I've worked my way, in multiples of 10, all the way to +/- 1000000 with no effect at all.

Just to be sure, we're talking about the case statements in the this.doBGSTimer function, located in the BGS-M.js script, yes?
Yes. It's the right part. If it doesn't work on your machine something else must interfere. As I've said, BGS checks the speed. If the speed changes engineUp or down gets played.

Hmm... have you hold the Shift-key while starting? (just to be sure it's not the cache...).
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: BGS - The BackgroundSet

Post by Diziet Sma »

.GNUstepdefaults is set to rebuild the cache on every start.. guess I'll have to dig deeper.
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
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Hey Dizzy .-)

Any news about the jitter?

If not you could place a line in the function (this.doBGSTimer) to log the values

Code: Select all

log(this.name,"Speed: "+player.ship.speed);
I need the range to make the setting available as property (and indeed adjustable via OXPConfig).
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: BGS - The BackgroundSet

Post by Diziet Sma »

Haven't had the time as yet.. will add that logging code and give it a shot today..
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: BGS - The BackgroundSet

Post by Diziet Sma »

Woohoo!.. we have liftoff! 8)

But first, I have to admit that I feel like a bit of a dill. In my trunk AddOns, I had somehow managed to have both BGS-A1.6-OXP and BGS-M1.5-OXP installed! The reason I had no luck when changing the +/- values in BGS-M.js was because Oolite was only loading the 1.5 version script.js from BGS-M1.5, and ignoring BGS-M.js altogether. I only twigged when I realised the BGS-M1.5 in the log should have read BGS-M1.6. :oops: :oops: :oops: :oops:

Once I sorted that out, and worked out that the logging code had to be inserted inside the case statements to work correctly, we were in business! (I added the logging to both the Up and Down cases, so some are rising values, and some are falling values)

Here's the logging results. As you can see, the values are very low, but not zero. In the roughly 80 seconds shown below, the highest value recorded was 0.000026524066925048828 (which translates to a forward speed of about 0.0265mm per second, in Oolite terms). Note also that the speed never actually falls to zero apart from two instances of a few milliseconds at the 23:28:38 and 23:28:45 marks.

Code: Select all

23:28:38.843 [BGS-M]: Speed: 0
23:28:38.844 [BGS-M]: Speed: 0
23:28:39.447 [BGS-M]: Speed: 5.960464477539063e-8
23:28:39.448 [BGS-M]: Speed: 5.960464477539063e-8
23:28:40.261 [BGS-M]: Speed: 0.0000013113021850585938
23:28:40.262 [BGS-M]: Speed: 0.0000013113021850585938
23:28:41.096 [BGS-M]: Speed: 4.76837158203125e-7
23:28:41.097 [BGS-M]: Speed: 4.76837158203125e-7
23:28:41.711 [BGS-M]: Speed: 5.364418029785156e-7
23:28:41.712 [BGS-M]: Speed: 5.364418029785156e-7
23:28:42.288 [BGS-M]: Speed: 4.76837158203125e-7
23:28:42.289 [BGS-M]: Speed: 4.76837158203125e-7
23:28:42.914 [BGS-M]: Speed: 0.0000017881393432617188
23:28:42.915 [BGS-M]: Speed: 0.0000017881393432617188
23:28:43.502 [BGS-M]: Speed: 0.0000011324882507324219
23:28:43.503 [BGS-M]: Speed: 0.0000011324882507324219
23:28:44.085 [BGS-M]: Speed: 5.364418029785156e-7
23:28:44.086 [BGS-M]: Speed: 5.364418029785156e-7
23:28:44.710 [BGS-M]: Speed: 4.76837158203125e-7
23:28:44.711 [BGS-M]: Speed: 4.76837158203125e-7
23:28:45.286 [BGS-M]: Speed: 0
23:28:45.287 [BGS-M]: Speed: 0
23:28:45.912 [BGS-M]: Speed: 0.0000010728836059570312
23:28:45.913 [BGS-M]: Speed: 0.0000010728836059570312
23:28:46.493 [BGS-M]: Speed: 0.0000010132789611816406
23:28:46.494 [BGS-M]: Speed: 0.0000010132789611816406
23:28:47.082 [BGS-M]: Speed: 0.0000018477439880371094
23:28:47.083 [BGS-M]: Speed: 0.0000018477439880371094
23:28:47.707 [BGS-M]: Speed: 6.556510925292969e-7
23:28:47.708 [BGS-M]: Speed: 6.556510925292969e-7
23:28:48.283 [BGS-M]: Speed: 5.960464477539062e-7
23:28:48.284 [BGS-M]: Speed: 5.960464477539062e-7
23:28:48.886 [BGS-M]: Speed: 7.152557373046875e-7
23:28:48.887 [BGS-M]: Speed: 7.152557373046875e-7
23:28:49.498 [BGS-M]: Speed: 9.5367431640625e-7
23:28:49.499 [BGS-M]: Speed: 9.5367431640625e-7
23:28:50.112 [BGS-M]: Speed: 7.152557373046875e-7
23:28:50.113 [BGS-M]: Speed: 7.152557373046875e-7
23:28:50.687 [BGS-M]: Speed: 0.0000011324882507324219
23:28:50.688 [BGS-M]: Speed: 0.0000011324882507324219
23:28:51.289 [BGS-M]: Speed: 0.0000034570693969726562
23:28:51.290 [BGS-M]: Speed: 0.0000034570693969726562
23:28:51.905 [BGS-M]: Speed: 0.000002682209014892578
23:28:51.906 [BGS-M]: Speed: 0.000002682209014892578
23:28:52.483 [BGS-M]: Speed: 0.0000045299530029296875
23:28:52.484 [BGS-M]: Speed: 0.0000045299530029296875
23:28:53.105 [BGS-M]: Speed: 0.000003337860107421875
23:28:53.106 [BGS-M]: Speed: 0.000003337860107421875
23:28:53.708 [BGS-M]: Speed: 0.0000033974647521972656
23:28:53.709 [BGS-M]: Speed: 0.0000033974647521972656
23:28:54.287 [BGS-M]: Speed: 0.0000025033950805664062
23:28:54.288 [BGS-M]: Speed: 0.0000025033950805664062
23:28:55.018 [BGS-M]: Speed: 0.000003337860107421875
23:28:55.018 [BGS-M]: Speed: 0.000003337860107421875
23:28:55.585 [BGS-M]: Speed: 0.000002562999725341797
23:28:55.590 [BGS-M]: Speed: 0.000002562999725341797
23:28:56.188 [BGS-M]: Speed: 0.000005662441253662109
23:28:56.190 [BGS-M]: Speed: 0.000005662441253662109
23:28:56.806 [BGS-M]: Speed: 0.000006854534149169922
23:28:56.806 [BGS-M]: Speed: 0.000006854534149169922
23:28:57.383 [BGS-M]: Speed: 0.000006496906280517578
23:28:57.384 [BGS-M]: Speed: 0.000006496906280517578
23:28:57.1000 [BGS-M]: Speed: 0.000006377696990966797
23:28:58.001 [BGS-M]: Speed: 0.000006377696990966797
23:28:58.609 [BGS-M]: Speed: 0.000007331371307373047
23:28:58.610 [BGS-M]: Speed: 0.000007331371307373047
23:28:59.185 [BGS-M]: Speed: 0.000007271766662597656
23:28:59.186 [BGS-M]: Speed: 0.000007271766662597656
23:28:59.795 [BGS-M]: Speed: 0.000006079673767089844
23:28:59.796 [BGS-M]: Speed: 0.000006079673767089844
23:29:00.381 [BGS-M]: Speed: 0.0000032186508178710938
23:29:00.382 [BGS-M]: Speed: 0.0000032186508178710938
23:29:00.984 [BGS-M]: Speed: 0.0000028014183044433594
23:29:00.985 [BGS-M]: Speed: 0.0000028014183044433594
23:29:01.598 [BGS-M]: Speed: 0.0000037550926208496094
23:29:01.599 [BGS-M]: Speed: 0.0000037550926208496094
23:29:02.171 [BGS-M]: Speed: 0.000003159046173095703
23:29:02.172 [BGS-M]: Speed: 0.000003159046173095703
23:29:02.785 [BGS-M]: Speed: 0.000006139278411865234
23:29:02.786 [BGS-M]: Speed: 0.000006139278411865234
23:29:03.395 [BGS-M]: Speed: 0.000006735324859619141
23:29:03.397 [BGS-M]: Speed: 0.000006735324859619141
23:29:03.978 [BGS-M]: Speed: 0.000007033348083496094
23:29:03.979 [BGS-M]: Speed: 0.000007033348083496094
23:29:04.592 [BGS-M]: Speed: 0.000006794929504394531
23:29:04.593 [BGS-M]: Speed: 0.000006794929504394531
23:29:05.174 [BGS-M]: Speed: 0.000006496906280517578
23:29:05.174 [BGS-M]: Speed: 0.000006496906280517578
23:29:05.779 [BGS-M]: Speed: 0.000006854534149169922
23:29:05.780 [BGS-M]: Speed: 0.000006854534149169922
23:29:06.400 [BGS-M]: Speed: 0.0000057220458984375
23:29:06.401 [BGS-M]: Speed: 0.0000057220458984375
23:29:07.010 [BGS-M]: Speed: 0.000006079673767089844
23:29:07.011 [BGS-M]: Speed: 0.000006079673767089844
23:29:07.585 [BGS-M]: Speed: 0.000006854534149169922
23:29:07.586 [BGS-M]: Speed: 0.000006854534149169922
23:29:08.185 [BGS-M]: Speed: 0.000007808208465576172
23:29:08.186 [BGS-M]: Speed: 0.000007808208465576172
23:29:08.796 [BGS-M]: Speed: 0.00000762939453125
23:29:08.797 [BGS-M]: Speed: 0.00000762939453125
23:29:09.408 [BGS-M]: Speed: 0.000007212162017822266
23:29:09.409 [BGS-M]: Speed: 0.000007212162017822266
23:29:09.984 [BGS-M]: Speed: 0.000007867813110351562
23:29:09.985 [BGS-M]: Speed: 0.000007867813110351562
23:29:10.587 [BGS-M]: Speed: 0.000007808208465576172
23:29:10.589 [BGS-M]: Speed: 0.000007808208465576172
23:29:11.209 [BGS-M]: Speed: 0.000007152557373046875
23:29:11.211 [BGS-M]: Speed: 0.000007152557373046875
23:29:11.785 [BGS-M]: Speed: 0.000006973743438720703
23:29:11.786 [BGS-M]: Speed: 0.000006973743438720703
23:29:12.403 [BGS-M]: Speed: 0.0000059604644775390625
23:29:12.404 [BGS-M]: Speed: 0.0000059604644775390625
23:29:13.008 [BGS-M]: Speed: 0.00000667572021484375
23:29:13.009 [BGS-M]: Speed: 0.00000667572021484375
23:29:13.587 [BGS-M]: Speed: 0.000006318092346191406
23:29:13.588 [BGS-M]: Speed: 0.000006318092346191406
23:29:14.175 [BGS-M]: Speed: 0.000006854534149169922
23:29:14.176 [BGS-M]: Speed: 0.000006854534149169922
23:29:14.794 [BGS-M]: Speed: 0.000009715557098388672
23:29:14.795 [BGS-M]: Speed: 0.000009715557098388672
23:29:15.396 [BGS-M]: Speed: 0.000007987022399902344
23:29:15.397 [BGS-M]: Speed: 0.000007987022399902344
23:29:15.971 [BGS-M]: Speed: 0.000008344650268554688
23:29:15.972 [BGS-M]: Speed: 0.000008344650268554688
23:29:16.584 [BGS-M]: Speed: 0.000008225440979003906
23:29:16.585 [BGS-M]: Speed: 0.000008225440979003906
23:29:17.202 [BGS-M]: Speed: 0.0000069141387939453125
23:29:17.203 [BGS-M]: Speed: 0.0000069141387939453125
23:29:17.805 [BGS-M]: Speed: 0.000007808208465576172
23:29:17.806 [BGS-M]: Speed: 0.000007808208465576172
23:29:18.382 [BGS-M]: Speed: 0.000008285045623779297
23:29:18.383 [BGS-M]: Speed: 0.000008285045623779297
23:29:18.994 [BGS-M]: Speed: 0.000009179115295410156
23:29:18.995 [BGS-M]: Speed: 0.000009179115295410156
23:29:19.606 [BGS-M]: Speed: 0.000011205673217773438
23:29:19.607 [BGS-M]: Speed: 0.000011205673217773438
23:29:20.190 [BGS-M]: Speed: 0.000013053417205810547
23:29:20.192 [BGS-M]: Speed: 0.000013053417205810547
23:29:20.800 [BGS-M]: Speed: 0.00001424551010131836
23:29:20.801 [BGS-M]: Speed: 0.00001424551010131836
23:29:21.374 [BGS-M]: Speed: 0.000014662742614746094
23:29:21.375 [BGS-M]: Speed: 0.000014662742614746094
23:29:21.995 [BGS-M]: Speed: 0.000016033649444580078
23:29:21.997 [BGS-M]: Speed: 0.000016033649444580078
23:29:22.604 [BGS-M]: Speed: 0.000017762184143066406
23:29:22.605 [BGS-M]: Speed: 0.000017762184143066406
23:29:23.185 [BGS-M]: Speed: 0.00001895427703857422
23:29:23.186 [BGS-M]: Speed: 0.00001895427703857422
23:29:23.801 [BGS-M]: Speed: 0.000019371509552001953
23:29:23.802 [BGS-M]: Speed: 0.000019371509552001953
23:29:24.380 [BGS-M]: Speed: 0.000020742416381835938
23:29:24.381 [BGS-M]: Speed: 0.000020742416381835938
23:29:24.982 [BGS-M]: Speed: 0.00002008676528930664
23:29:24.983 [BGS-M]: Speed: 0.00002008676528930664
23:29:25.602 [BGS-M]: Speed: 0.000018298625946044922
23:29:25.603 [BGS-M]: Speed: 0.000018298625946044922
23:29:26.170 [BGS-M]: Speed: 0.000019252300262451172
23:29:26.171 [BGS-M]: Speed: 0.000019252300262451172
23:29:26.788 [BGS-M]: Speed: 0.000018656253814697266
23:29:26.789 [BGS-M]: Speed: 0.000018656253814697266
23:29:27.398 [BGS-M]: Speed: 0.000019073486328125
23:29:27.398 [BGS-M]: Speed: 0.000019073486328125
23:29:27.976 [BGS-M]: Speed: 0.000020802021026611328
23:29:27.977 [BGS-M]: Speed: 0.000020802021026611328
23:29:28.597 [BGS-M]: Speed: 0.00002092123031616211
23:29:28.598 [BGS-M]: Speed: 0.00002092123031616211
23:29:29.188 [BGS-M]: Speed: 0.000020205974578857422
23:29:29.189 [BGS-M]: Speed: 0.000020205974578857422
23:29:29.805 [BGS-M]: Speed: 0.000020503997802734375
23:29:29.806 [BGS-M]: Speed: 0.000020503997802734375
23:29:30.398 [BGS-M]: Speed: 0.00002086162567138672
23:29:30.399 [BGS-M]: Speed: 0.00002086162567138672
23:29:30.980 [BGS-M]: Speed: 0.000021755695343017578
23:29:30.980 [BGS-M]: Speed: 0.000021755695343017578
23:29:31.606 [BGS-M]: Speed: 0.00002092123031616211
23:29:31.607 [BGS-M]: Speed: 0.00002092123031616211
23:29:32.173 [BGS-M]: Speed: 0.000019609928131103516
23:29:32.174 [BGS-M]: Speed: 0.000019609928131103516
23:29:32.792 [BGS-M]: Speed: 0.000020623207092285156
23:29:32.793 [BGS-M]: Speed: 0.000020623207092285156
23:29:33.376 [BGS-M]: Speed: 0.000021398067474365234
23:29:33.377 [BGS-M]: Speed: 0.000021398067474365234
23:29:33.998 [BGS-M]: Speed: 0.000021278858184814453
23:29:33.999 [BGS-M]: Speed: 0.000021278858184814453
23:29:34.573 [BGS-M]: Speed: 0.000020623207092285156
23:29:34.575 [BGS-M]: Speed: 0.000020623207092285156
23:29:35.204 [BGS-M]: Speed: 0.000020444393157958984
23:29:35.205 [BGS-M]: Speed: 0.000020444393157958984
23:29:35.798 [BGS-M]: Speed: 0.000018477439880371094
23:29:35.799 [BGS-M]: Speed: 0.000018477439880371094
23:29:36.392 [BGS-M]: Speed: 0.000021159648895263672
23:29:36.393 [BGS-M]: Speed: 0.000021159648895263672
23:29:36.998 [BGS-M]: Speed: 0.00002092123031616211
23:29:36.999 [BGS-M]: Speed: 0.00002092123031616211
23:29:37.587 [BGS-M]: Speed: 0.000022709369659423828
23:29:37.588 [BGS-M]: Speed: 0.000022709369659423828
23:29:38.176 [BGS-M]: Speed: 0.000023424625396728516
23:29:38.177 [BGS-M]: Speed: 0.000023424625396728516
23:29:38.798 [BGS-M]: Speed: 0.000022709369659423828
23:29:38.799 [BGS-M]: Speed: 0.000022709369659423828
23:29:39.409 [BGS-M]: Speed: 0.000025331974029541016
23:29:39.410 [BGS-M]: Speed: 0.000025331974029541016
23:29:39.997 [BGS-M]: Speed: 0.00002485513687133789
23:29:39.998 [BGS-M]: Speed: 0.00002485513687133789
23:29:40.583 [BGS-M]: Speed: 0.000026524066925048828
23:29:40.584 [BGS-M]: Speed: 0.000026524066925048828
23:29:41.200 [BGS-M]: Speed: 0.000025033950805664062
23:29:41.202 [BGS-M]: Speed: 0.000025033950805664062
23:29:41.801 [BGS-M]: Speed: 0.000025093555450439453
23:29:41.802 [BGS-M]: Speed: 0.000025093555450439453
23:29:42.381 [BGS-M]: Speed: 0.00002384185791015625
23:29:42.382 [BGS-M]: Speed: 0.00002384185791015625
23:29:43.604 [BGS-M]: Speed: 0.000023186206817626953
23:29:43.604 [BGS-M]: Speed: 0.000023186206817626953
23:29:44.192 [BGS-M]: Speed: 0.000021278858184814453
23:29:44.193 [BGS-M]: Speed: 0.000021278858184814453
23:29:44.776 [BGS-M]: Speed: 0.0000209808349609375
23:29:44.777 [BGS-M]: Speed: 0.0000209808349609375
23:29:45.408 [BGS-M]: Speed: 0.000020325183868408203
23:29:45.409 [BGS-M]: Speed: 0.000020325183868408203
23:29:45.999 [BGS-M]: Speed: 0.00001996755599975586
23:29:45.1000 [BGS-M]: Speed: 0.00001996755599975586
23:29:46.579 [BGS-M]: Speed: 0.000021636486053466797
23:29:46.580 [BGS-M]: Speed: 0.000021636486053466797
23:29:47.206 [BGS-M]: Speed: 0.00002181529998779297
23:29:47.207 [BGS-M]: Speed: 0.00002181529998779297
23:29:47.788 [BGS-M]: Speed: 0.00002294778823852539
23:29:47.789 [BGS-M]: Speed: 0.00002294778823852539
23:29:48.992 [BGS-M]: Speed: 0.000022470951080322266
23:29:48.993 [BGS-M]: Speed: 0.000022470951080322266
23:29:49.592 [BGS-M]: Speed: 0.000023543834686279297
23:29:49.593 [BGS-M]: Speed: 0.000023543834686279297
23:29:50.603 [BGS-M]: Speed: 0.00002396106719970703
23:29:50.604 [BGS-M]: Speed: 0.00002396106719970703
23:29:51.069 [BGS-M]: Speed: 0.000024020671844482422
23:29:51.070 [BGS-M]: Speed: 0.000024020671844482422
23:29:51.660 [BGS-M]: Speed: 0.00002294778823852539
23:29:51.661 [BGS-M]: Speed: 0.00002294778823852539
23:29:52.252 [BGS-M]: Speed: 0.000024080276489257812
23:29:52.253 [BGS-M]: Speed: 0.000024080276489257812
23:29:52.851 [BGS-M]: Speed: 0.000024199485778808594
23:29:52.852 [BGS-M]: Speed: 0.000024199485778808594
23:29:53.474 [BGS-M]: Speed: 0.000023543834686279297
23:29:53.476 [BGS-M]: Speed: 0.000023543834686279297
23:29:54.065 [BGS-M]: Speed: 0.00002294778823852539
23:29:54.066 [BGS-M]: Speed: 0.00002294778823852539
23:29:55.568 [BGS-M]: Speed: 0.000024020671844482422
23:29:55.568 [BGS-M]: Speed: 0.000024020671844482422
23:29:56.106 [BGS-M]: Speed: 0.00002372264862060547
23:29:56.107 [BGS-M]: Speed: 0.00002372264862060547
23:29:56.698 [BGS-M]: Speed: 0.000023424625396728516
23:29:56.699 [BGS-M]: Speed: 0.000023424625396728516
23:29:57.284 [BGS-M]: Speed: 0.00002288818359375
23:29:57.285 [BGS-M]: Speed: 0.00002288818359375
23:29:57.915 [BGS-M]: Speed: 0.000022590160369873047
23:29:57.916 [BGS-M]: Speed: 0.000022590160369873047
23:29:58.487 [BGS-M]: Speed: 0.000023543834686279297
23:29:58.488 [BGS-M]: Speed: 0.000023543834686279297
23:29:59.083 [BGS-M]: Speed: 0.000024139881134033203
23:29:59.084 [BGS-M]: Speed: 0.000024139881134033203
23:30:00.268 [BGS-M]: Speed: 0.000024199485778808594
23:30:00.269 [BGS-M]: Speed: 0.000024199485778808594
23:30:00.903 [BGS-M]: Speed: 0.00002390146255493164
23:30:00.904 [BGS-M]: Speed: 0.00002390146255493164
Last edited by Diziet Sma on Tue Nov 27, 2012 6:09 am, edited 5 times 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: BGS - The BackgroundSet

Post by Diziet Sma »

Now that I know why the dampening threshold wasn't working before, I set the threshold to 0.001 (overkill = good), and..

Aaaaaaaaaaahhhhhhhhhhhh.. blessed silence.. :D :lol:

Code: Select all

  case 1: if(cu>this.bgsCurrentSet[i].cmp + 0.001) this.changePlay(this.bgsCurrentSet[i],1); break;
  case -1: if(cu<this.bgsCurrentSet[i].cmp - 0.001) this.changePlay(this.bgsCurrentSet[i],1); break;

For non-trunk players with this problem, the code to change is in the script.js file, located in the Config folder of BGS-A1.5.oxp OR BGS-M1.5.oxp, as the case may be. Find the function named this.doBGSTimer and change the first two lines of this section of code as shown. (you may need to alter the 0.001 value upwards if your 'stick is particularly "noisy"..)

Code: Select all

					else if(this.bgsCurrentSet[i].change===1 && player.ship[a]>this.bgsCurrentSet[i].cmp +0.001) this.changePlay(this.bgsCurrentSet[i],1);
					else if(this.bgsCurrentSet[i].change===-1 && player.ship[a]<this.bgsCurrentSet[i].cmp +0.001) this.changePlay(this.bgsCurrentSet[i],1);
					else if(this.bgsCurrentSet[i].change===0 && player.ship[a]!==this.bgsCurrentSet[i].cmp) this.changePlay(this.bgsCurrentSet[i],1);
					else if(this.bgsCurrentSet[i].change===2 && player.ship[a]!==this.bgsCurrentSet[i].cmp) this.changePlay(this.bgsCurrentSet[i],1);
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
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Muchas gracias, Dizzy.
Diziet Sma wrote:
Here's the logging results. As you can see, the values are very low, but not zero.
Yes, I've expected it to be nearly zero, so I think a range of 0...0.1 (default 0) settable via OXPConfig should be fine then.
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: BGS - The BackgroundSet

Post by Diziet Sma »

My pleasure.. and thank you for the fix.. you have no idea how nice it is not to constantly hear the engines cycling up and down when stationary.. :D
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
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

BGS1.5.1 is online (BGS-A and BGS-M).

Changes:
- Added dampening for the speed checks.

The fix probably solves the jitter some users have experienced when using a joystick to handle the throttle when the ships should be at full stop. v1.5.1 uses a static dampening of 0.01 which will become adjustable in v1.6. I've also backported the cleaner approach of the code from v1.6.

Special thanks to Diziet Sma - I was not aware of the joystick deadzone jitter.

The development version (v1.6) may follow, but probably not this month anymore (94% bandwidth).
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: BGS - The BackgroundSet

Post by spara »

Diziet Sma wrote:
you have no idea how nice it is not to constantly hear the engines cycling up and down when stationary.. :D
Seconded. This was really annoying. For some reason I didn't realize it could be fixed, thus not reporting :roll:. Thanks a lot for fixing it.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: BGS - The BackgroundSet

Post by Svengali »

Yeah - I can imagine that it was pretty uncool, now Dizzy identified the source.

It's not the right place to 'fix' it though, because other OXPs may check for speed==0 as well.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: BGS - The BackgroundSet

Post by Commander McLane »

Svengali wrote:
It's not the right place to 'fix' it though, because other OXPs may check for speed==0 as well.
Yes, indeed. I know in fact of one.

EDIT: Fixed as well. :)
Post Reply