Fade blink momentum

13»

Comments

  • Fluid CoreFluid Core Join Date: 2007-12-26 Member: 63260Members, Reinforced - Shadow
    I took a look at the latest version of the fade mod that I found on <a href="http://www.duplexgaming.co.uk/" target="_blank">http://www.duplexgaming.co.uk/</a>

    To my surprise, I found a new draining function for energy!

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->        if t > 0 then
                local energyCost = math.pow(t,1.5)/( math.pow(0.1,1) + math.pow(t,1) ) *  kBlinkEnergyCost * input.time
                player:DeductAbilityEnergy(energyCost)
            end<!--c2--></div><!--ec2-->

    I had to look up the math.pow function, but if I understand it correctly, then math.pow(t,1.5) means t^(1.5). But why would you use the math.pow function if you raise it to the power of one, as you do in the denominator? I like the idea myself, just curious about the use.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    Can't speak for the author or purpose of that script, but sometimes I intentionally write code that doesn't make a lot of sense in terms of functionality, but is there to follow the flow so to speak (eg. improve the understanding of the algorithm). Sort of like code that tries to be its own documentation, sacrificing those insignificant CPU-cycles to help the programmer immidiately understand what is going on.
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    edited February 2012
    I used exponent of two at the beginning (it defines how sharp is the transition between low and high energy consumption, e.g. 4 <a href="http://www.wolframalpha.com/input/?i=plot+t%5E4.5%2F+%280.1%5E4+%2B+t%5E4%29+t%3D0..5)" target="_blank">http://www.wolframalpha.com/input/?i=plot+...E4%29+t%3D0..5)</a>, I just changed it to one after some testing.

    Thanks for the icon Skie, I don't know how to include it however (the mod loader is from Onos Ate Me).

    Here is some slow-motion shots from the last gather, with some nice moves from TreffNiX and a different style from Skie:

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/a0EQBH9xp8M"></param><embed src="http://www.youtube.com/v/a0EQBH9xp8M" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
  • swalkswalk Say hello to my little friend. Join Date: 2011-01-20 Member: 78384Members, Squad Five Blue
    Nice video!
    I like the fact that you cut it right after you missed that last skulk, it made me smile :D
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    It was a juicy one, I failed there :)

    I will try to extend skulk's lack of respect towards ladders to the fade :

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Skulks do not respect ladders due to their wall walking superiority.
    function Skulk:GetIsOnLadder()
        return false
    end<!--c2--></div><!--ec2-->
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    Ok, ladder bug should be fixed :

    <a href="http://www.duplexgaming.co.uk/downloads/mods/64/modfade/" target="_blank">http://www.duplexgaming.co.uk/downloads/mods/64/modfade/</a>
  • swalkswalk Say hello to my little friend. Join Date: 2011-01-20 Member: 78384Members, Squad Five Blue
    So fades does not get stuck on ladders anymore? :D
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    Yes, they just ignore ladders.
  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Ladder bug? Dejavu!
Sign In or Register to comment.