I've made several HUDs with several scanners. If there is such a restriction, it is new in trunk, not in 1.76.1.Rese249er wrote:Through experimenting with a hud.plist for the next version of HoloNumHUD, I discovered that only one scanner will be drawn at a time.
Scripters cove
Moderators: winston, another_commander
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: Scripters cove
Odd. Could you point one out?
Got all turned around, lost my nav connection... Where am I now?
Re: Scripters cove
Didn't work the way you wanted?Wildeblood wrote:spara wrote:Is this what you are looking for: f(x)=x*100^((x-4000)/36000), where 4000 <= x <= 40000 ?I think it is. Thank you.
- Commander McLane
- ---- 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: Scripters cove
So you want to make the range of 0 ... 36000 into the range of 0 ... 3996000? The only thing you need to know is the factor between these two ranges, which means the factor between 36000 and 3996000.Wildeblood wrote:An arithmetic question. I need a procedure that will take a number between 0 and 36000 (actually 4000 to 40000, but I think I can manage adding and subtracting 4000) and output a number between 0 and 3996000 (4000000-4000), such that there's no distortion at the bottom of the range, but a 100x exaggeration at the top of the range. So 4000 -> 4000, but 40000 -> 4000000, or 0 -> 0, but 36000 -> 3996000. I think this is called a geometric progression, but being the victim of a state school education, my mathematical ability is limited to basic addition and subtraction.
Thus: 3996000 / 36000 = 111.
Thus all you need to do is to multiply you original number by 111, and there you are.
And of course you need to subtract 4000 before the operation, and add them again after the operation. Which gives us:
Code: Select all
var newNumber = originalNumber - 4000;
newNumber *= 111;
newNumber += 4000;
Or, the same thing in one line, which we get by substituting the steps from back to front:
Code: Select all
var newNumber = ((originalNumber - 4000) * 111) + 4000
The values aren't distorted in any way. Only the steps of 1 between whole numbers are transformed into steps of 111. So instead of 4000, 4001, 4002 ... 40000 you get 4000, 4111, 4222 ... 4000000. If you feed real numbers into it, you'll of course get anything in-between as well.
Re: Scripters cove
Ah. I assumed it was exponential growth that was wanted not linear. Sorry for the hassle.
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
Yes.spara wrote:Ah. I assumed it was exponential growth that was wanted not linear.
This is what I am currently using:
Code: Select all
if (x > 40000) x = null;
if (x && x > 4000) x = (x * (x - 4000)/360 + 4000).toFixed(0);
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
Point what out - a HUD with two or ten scanners? No, take my word for it. You didn't answer the relevant question, did you try with 1.76.1 or with a trunk build?Rese249er wrote:Odd. Could you point one out?
- Rese249er
- ---- E L I T E ----
- Posts: 647
- Joined: Thu Jun 07, 2012 2:19 pm
- Location: Well, I WAS in G3...
Re: Scripters cove
It's a trunk build, r5555.
Got all turned around, lost my nav connection... Where am I now?
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
Well, there ya go. In 1.76 you can define ten scanners on the HUD centred on the same point, but all slightly different sizes, and it gives the appearance of each scanner contact being drawn as a line, instead of a dot, like an old-school radar display. But that trick no longer works in trunk, because it only draws one scanner. That's progress, I guess.Wildeblood wrote:I've made several HUDs with several scanners. If there is such a restriction, it is new in trunk, not in 1.76.1.Rese249er wrote:Through experimenting with a hud.plist for the next version of HoloNumHUD, I discovered that only one scanner will be drawn at a time.
- Commander McLane
- ---- 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: Scripters cove
Ah. I thought you wanted an equal distribution.Wildeblood wrote:Yes.spara wrote:Ah. I assumed it was exponential growth that was wanted not linear.
This is what I am currently using:The 360 divisor comes from previously having 36000 followed by a 100 multiplier.Code: Select all
if (x > 40000) x = null; if (x && x > 4000) x = (x * (x - 4000)/360 + 4000).toFixed(0);
The only problem with your formula is that it produces results > 4000000 for x > 39981. That's easy to fix by adjusting the divisor. Change it to 360.36036, and you're there.
Re: Scripters cove
Fixed in r5562.Wildeblood wrote:I've made several HUDs with several scanners. If there is such a restriction, it is new in trunk, not in 1.76.1.Rese249er wrote:Through experimenting with a hud.plist for the next version of HoloNumHUD, I discovered that only one scanner will be drawn at a time.
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
Well, there ya go. You know, I always thought it was a bit odd that you could include several scanners. It didn't surprise me at all when it was changed (and I knew it had been because I'd read the comment in HeadUpDisplay.m previously). Now it's back. Sometimes I wonder if you guys really have a clear idea of how you intend/anticipate people will use these features. Sometimes I think you're just making it up as you go along.cim wrote:Fixed in r5562.Wildeblood wrote:I've made several HUDs with several scanners. If there is such a restriction, it is new in trunk, not in 1.76.1.Rese249er wrote:Through experimenting with a hud.plist for the next version of HoloNumHUD, I discovered that only one scanner will be drawn at a time.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Scripters cove
Hehe, who knows what a bunch of nutters like us will do when given a newWildeblood wrote:Sometimes I wonder if you guys really have a clear idea of how you intend/anticipate people will use these features.
I think that's called 'Being innovative'Wildeblood wrote:Sometimes I think you're just making it up as you go along.
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Wildeblood
- ---- E L I T E ----
- Posts: 2457
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: Scripters cove
Except in this case it's not new. (And I've already said how I've used it.)Smivs wrote:Hehe, who knows what a bunch of nutters like us will do when given a newWildeblood wrote:Sometimes I wonder if you guys really have a clear idea of how you intend/anticipate people will use these features.toyfeature!
Are you sure it's not being 'indecisive'? Now a multi-shift galactic hyperdrive, that would be unambiguously innovative.Smivs wrote:I think that's called 'Being innovative'Wildeblood wrote:Sometimes I think you're just making it up as you go along.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Scripters cove
Sounds good...I'd get one!Wildeblood wrote:Now a multi-shift galactic hyperdrive, that would be unambiguously innovative.
Commander Smivs, the friendliest Gourd this side of Riedquat.