Jump to content

View more

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

What is this falloff function called?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
9 replies to this topic

#1 way2lazy2care   Members   

786
Like
0Likes
Like

Posted 05 March 2013 - 01:25 PM

I've seen this function used for falloff before, but I've never known it's name. It makes it very hard for me to find again, but I've used it many times.

 

Does anybody know if it has a name/what it is?

 

y = a + b*(c/(c+x))

 

It's nice because it's a very tweakable and simple function that doesn't do anything too crazy for unexpected values for x. Also open to knowing other cool falloff functions that might be interesting :)



#2 Álvaro   Members   

20912
Like
0Likes
Like

Posted 05 March 2013 - 01:32 PM

The graph of that function is called a "hyperbola". What are you going to do with these functions?

 

EDIT: I think you can also call it "inverse falloff".


Edited by Álvaro, 05 March 2013 - 01:36 PM.


#3 Cornstalks   Members   

7030
Like
0Likes
Like

Posted 05 March 2013 - 01:42 PM

Are you talking about functions with horizontal asymptotes (particularly ones that decrease as x gets larger)? Pretty much anything of the form:

 

y = a + b / (c + x)

 

and

 

y = a + bc - d * x (where d > 0)

 

and several other forms. If you're familiar with limits, you can come up with any function you want and find out if it has a horizontal asymptote.


[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#4 way2lazy2care   Members   

786
Like
0Likes
Like

Posted 05 March 2013 - 01:49 PM

Are you talking about functions with horizontal asymptotes (particularly ones that decrease as x gets larger)? Pretty much anything of the form:

 

y = a + b / (c + x)

 

and

 

y = a + bc - d * x (where d > 0)

 

and several other forms. If you're familiar with limits, you can come up with any function you want and find out if it has a horizontal asymptote.

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.



#5 way2lazy2care   Members   

786
Like
0Likes
Like

Posted 05 March 2013 - 01:54 PM

The graph of that function is called a "hyperbola". What are you going to do with these functions?

 

It's more like a sideways tan function isn't it? I'm not looking for anything in particular, I just noticed that this function tends to fit all of my needs when I am looking for falloff, but all the ones I find when I google "falloff functions" aren't anything close to what I want.

 

I guess the general use case is when you want a predictably bounded value with non-linear falloff.



#6 Cornstalks   Members   

7030
Like
0Likes
Like

Posted 05 March 2013 - 01:56 PM

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.

That function you posted has a vertical asymptote at x = -c (look at x = -5 in that graph). Also, yes, the log function's behavior is different for x < 1 than it is for x >=1, but also note that the log function doesn't have a horizontal asymptote (that is, log(infinity) = infinity).

 

Also, try searching for "decay" functions instead of "falloff" functions.


Edited by Cornstalks, 05 March 2013 - 01:58 PM.

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#7 Álvaro   Members   

20912
Like
0Likes
Like

Posted 05 March 2013 - 01:59 PM

Yea, but most specifically I like it because it lines up well when x=0 and it doesn't have a vertical asymptote. Like the log function get's really gross when x < 1.

That function you posted has a vertical asymptote at x = -c (look at x = -5 in that graph). Also, yes, the log function's behavior is different for x < 1 than it is for x >=1, but also note that the log function doesn't have a horizontal asymptote (that is, log(infinity) = infinity).

 

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.



#8 Cornstalks   Members   

7030
Like
0Likes
Like

Posted 05 March 2013 - 02:04 PM

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.

Yup, I concur. You just made me realize I messed up the general form for an exponential decay function when I was trying to post. I meant:

 

y = a + b * cd - e * x (where e > 0, and a, b, c, d, and e are some constants (note that I don't necessarily intend for e to be Euler's number))

 

Then that function you posted is the same as this one, but with a = 0, b = A, c = e (Euler's number), d = 0, e = 1 / B.


Edited by Cornstalks, 05 March 2013 - 02:05 PM.

[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#9 jwezorek   Members   

2634
Like
1Likes
Like

Posted 05 March 2013 - 02:24 PM

Waytolazy, still not sure  exactly what you want but ... if you are looking for a function that for postive values of x is monotonically increasing, defined everywhere, but approaches a constant as x goes to infinity i.e. has a horizontal asymptote, then you can use the positive-x part of any sigmoidal function scaled appropriately, e.g., the logistic function or arctangent.  


Edited by jwezorek, 05 March 2013 - 03:48 PM.


#10 way2lazy2care   Members   

786
Like
0Likes
Like

Posted 05 March 2013 - 02:43 PM

Waytolazy, still not your exactly what you want but ... if you are looking for a function that for postive values of x is monotonically increasing, defined everywhere, but approaches a constant as x goes to infinity i.e. has a horizontal asymptote, then you can use the positive-x part of any sigmoidal function scaled appropriately, e.g., the logistic function or arctangent.  

 

 

If he really wants those features, y = A * exp(-x / B) seems like a good candidate.

Yup, I concur. You just made me realize I messed up the general form for an exponential decay function when I was trying to post. I meant:

 

y = a + b * cd - e * x (where e > 0, and a, b, c, d, and e are some constants (note that I don't necessarily intend for e to be Euler's number))

 

Then that function you posted is the same as this one, but with a = 0, b = A, c = e (Euler's number), d = 0, e = 1 / B.

 

These are both great. SUPAH :)






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.